Skip to content

trahvex/MediaproBackendTest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Mediapro Backend Test

This project allows the management of a library via its users, bookings, and books. It is built using the FastAPI web framework and SQLAlchemy for database management.

Installation

Clone the repository:

git clone https://github.com/trahvex/MediaproBackendTest

Navigate to the project directory:

cd MediaproBackendTest

Install the required packages:

pip install -r requirements.txt

Usage

Start the library app using the following command:

uvicorn app:app --reload

Open your browser and go to http://localhost:8000/docs to access the Swagger UI for the API.

Use the API endpoints to manage users, bookings, and books in the library.

API Endpoints

The following API endpoints are available:

Users

- GET /users: Get all users
- GET /users/{user_id}: Get user by ID
- POST /users: Create a new user
- PUT /users/{user_id}: Update user by ID
- DELETE /users/{user_id}: Delete user by ID

Books

- GET /books: Get all books or search by name or author by adding the parameter search to the url. Results are paginated and can be sort by title or author.
- GET /books/{book_id}: Get book by ID
- POST /books: Create a new book
- PUT /books/{book_id}: Update book by ID
- DELETE /books/{book_id}: Delete book by ID

Bookings

- GET /bookings: Get all bookings
- GET /bookings/{booking_id}: Get booking by ID
- POST /bookings: Create a new booking
- PUT /bookings/{booking_id}: Update booking by ID
- DELETE /bookings/{booking_id}: Delete booking by ID

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages