Skip to content

Latest commit

 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HOW TO RUN USING DOCKER

  • run sudo docker compose up --build

HOW TO RUN USING UVICORN (OPTIONAL)

  • run uvicorn api.main:my_app --reload

TO CREATE A BOOK USING CURL

  • curl -X POST -H "Content-Type: application/json" -d '{"title": "TITLE", "author": "AUTHOR", "isbn": "342wwe34", "year": 0000}' http://localhost:8000/books

N/B - you can change the TITLE, AUTHOR, '342WWE34, 0000, to any data you want

TO GET ALL BOOKS

TO UPDATE A BOOK

n/b replace {book_id} with a specifc number of a book out of the books created and also the datas too if necessary

GET A SEPCIFIC BOOK

DELETE A BOOK

TO RUN UNITTESTS

  • cd into tests
  • run python3 -m unittest test_main.py

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages