Skip to content

Latest commit

 

History

11 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

# Simple API Demo using Flask

Restfull API using Python with Flask as a framework

Instalation

run this command on terminal to install Flask

pip install flask

and run the project with command

python app.py

The server will start running at http://127.0.0.1:5000/.

Endpoints

  1. GET /books - Retrieve a list of all books.
    http://127.0.0.1:5000/books
  2. GET /books/ - Retrieve a specific book by ID.
    http://127.0.0.1:5000/books/<id>
  3. POST /books - Create a new book.
    bash http://127.0.0.1:5000/books
    

Under the Body tab, select raw and choose JSON from the dropdown. Enter the user data as JSON, for example:

{
    "title": "Negeri Para Bedebah",
    "author": "Tere Liye",
    "year": 2021
}
  1. PUT /books/ - Update an existing book by ID.
  2. DELETE /books/ - Delete a book by ID.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages