This repository follows best practices for clean architecture and component reusability while leveraging the power of FastAPI for building high-performance web applications. We at Fiftyfive Technologies follow the practices defined by SOLID principles and Clean Architecture.
- High Performance: Built on FastAPI, an asynchronous web framework for fast, modern, and efficient APIs.
- Scalability: Designed to handle high loads with ease.
- Readability: Clean architecture with modular components.
- Extensibility: Easily customizable and expandable.
- FastAPI - A modern web framework for high-performance APIs.
- Pydantic - Data validation and settings management.
- JWT/OAuth2 - Authentication and authorization.
- Pytest - Testing framework for unit and integration tests.
- MongoDb - A NoSQL database solution.
Ensure you have the following installed:
- Python 3+
- MongoDB (or any supported database)
- Clone the repository:
git clone https://github.com/your-repo/fastapi-project.git cd fastapi-project
- Create and activate a virtual environment:
python -m venv .venv source env/bin/activate # On Windows use `env\Scripts\activate`
- Install dependencies:
pip install -r requirements.txt
- Configure the environment variables by creating a
.env
file:MONGO_DB_URI=mongodb://localhost:27017/mydatabase MONGO_DB_USER_NAME=username MONGO_DB_USER_PASSWORD=pass SECRET_KEY=your_secret_key
- Start the FastAPI application:
uvicorn src.main:app --reload
- Start the FastAPI application:
uvicorn app.main:app --reload
- Access the API documentation at http://127.0.0.1:8000/docs.
fastapi-project/
├── src/
│ ├── api/ # Application endpoints
│ ├── constants/ # Authentication keys and constants
│ ├── exception/ # Custom exception handling
│ ├── service/ # Bussiness logic
│ ├── model/ # Database schemas and Pydantic models
│ ├── util/ # Helper functions and utilities
│
├── main.py # Entry point of the application
├── config.py # configuration and settings
├── requirements.txt # Python dependencies
├── README.md # Project documentation
└── .env # Environment variables
FastAPI provides interactive API documentation. Once the server is running, visit:
- Swagger UI: http://127.0.0.1:8000/docs
- Redoc UI: http://127.0.0.1:8000/redoc
55 Tech
We are relentlessly focusing on digital transformation. Dive deep into the customer cases to know more about the project which we delivered.