This project is a scalable, efficient Flask-based API designed to manage customers, products, and orders. The application utilizes a layered architecture, leveraging Flask blueprints for organized route management and structured service layers for business logic. The API supports full CRUD operations for customers, products, and orders, and includes a health check endpoint to ensure the service remains operational.
- Customers: Create, update, retrieve, and delete customer records.
- Products: Add, modify, fetch, and delete products.
- Orders: Place and fetch customer orders, with transaction management.
- Health Check: Ensure API uptime and service availability.
- Layered Architecture: Separation of concerns through services and route handlers.
- Flask Blueprints: Modular routing for scalable API design.
- Flask: Web framework for building the API.
- MySQL: Database for persisting customer, product, and order information.
- SQLAlchemy: ORM for database interaction (if applicable).
- Postman: API documentation and testing.
-
Clone the Repository
git clone https://github.com/gayanukabulegoda/Flask-Python-API.git
-
Install Dependencies
pip install -r requirements.txt
-
Set Up the Database
- Create a MySQL database and configure the database URI in the
config.py
file.
- Create a MySQL database and configure the database URI in the
-
Run the Application
flask run
-
Access the API
- The API will be accessible at
http://127.0.0.1:5001/
.
- The API will be accessible at
The full API documentation is available on Postman. It provides a detailed overview of all available endpoints, request formats, and response examples.
- Postman Documentation: Flask Python API Documentation
This project is licensed under the MIT License. See the LICENSE file for more details.
© 2024 Gayanuka Bulegoda