This application allows you to manage items through CRUD (Create, Read, Update, Delete) operations. It provides a set of API endpoints to interact with the items stored in the system.
- Create: Add new items to the system.
- Read: Retrieve information about existing items.
- Update: Modify the details of existing items.
- Delete: Remove items from the system.
- Backend Framework: FastAPI
- Database: PostgreSQL
- API Documentation: Swagger UI
- Authentication: JWT (JSON Web Tokens)
- Python 3.9 or higher
- PostgreSQL database
- Virtual environment (optional, but recommended)
- Clone the repository:
git clone https://github.com/your-username/item-management-app.git
- Navigate to the project directory:
cd item-management-app
- Create and activate a virtual environment (optional):
- Linux/Mac:
python3 -m venv venv && source venv/bin/activate
- Windows:
python -m venv venv && venv\Scripts\activate
- Linux/Mac:
- Install the required dependencies:
pip install -r requirements.txt
- Set up the database connection:
- Update the database configuration in the
config.py
file.
- Update the database configuration in the
- Run the application:
python main.py
- Access the API documentation:
http://localhost:8000/docs
Once the application is up and running, you can use any HTTP client (e.g., cURL, Postman) to interact with the API endpoints.
Send a POST request to /items
with the item details in the request body.
Send a GET request to /items/{item_id}
to retrieve information about a specific item.
Send a PUT request to /items/{item_id}
with the updated item details in the request body.
Send a DELETE request to /items/{item_id}
to remove an item from the system.
Some routes may require authentication to access. You need to obtain a JWT token by sending a POST request to /login
with valid credentials. Include the token in the Authorization
header for authenticated routes (Bearer Token).
This project is licensed under the MIT License.