A FastAPI project generator and framework
Project description
Nexus-FastAPI
A powerful FastAPI project generator and framework that helps you create production-ready FastAPI applications with best practices and modern architecture.
Features
- ๐ Quick Start: Generate a complete FastAPI project structure in seconds
- ๐ฆ Modular Design: Built-in support for modular applications with separate apps
- ๐ Security: Built-in security features with JWT authentication
- ๐๏ธ Database: SQLAlchemy integration with automatic model generation
- ๐ Documentation: Automatic API documentation with Swagger UI
- ๐งช Testing: Built-in testing setup with pytest
- ๐จ Code Style: Consistent code formatting with black and isort
Installation
pip install nexus-fastapi
Quick Start
Create a new FastAPI project:
# Create a project with default settings
nexus-fastapi create_project my_app
# Create a project with custom configuration
nexus-fastapi create_project my_app --config config.json
Sample Configuration File (config.json)
{
"project_name": "my_app",
"description": "My FastAPI Application",
"version": "1.0.0",
"apps": [
{
"name": "users",
"models": [
{
"name": "User",
"fields": [
{
"name": "email",
"type": "string",
"nullable": false
},
{
"name": "username",
"type": "string",
"nullable": false
}
]
}
]
}
]
}
Project Structure
my_app/
โโโ apps/
โ โโโ users/
โ โ โโโ __init__.py
โ โ โโโ models.py
โ โ โโโ schemas.py
โ โ โโโ crud.py
โ โ โโโ service.py
โ โ โโโ routes.py
โ โโโ __init__.py
โโโ core/
โ โโโ config/
โ โ โโโ __init__.py
โ โ โโโ settings.py
โ โโโ database/
โ โ โโโ __init__.py
โ โ โโโ base.py
โ โโโ security/
โ โโโ __init__.py
โ โโโ auth.py
โโโ tests/
โ โโโ __init__.py
โโโ .env
โโโ main.py
โโโ requirements.txt
โโโ run.py
Running the Project
-
Navigate to your project directory:
cd my_app
-
Install dependencies:
pip install -r requirements.txt
-
Run the application:
python run.py -
Access the API documentation at: http://localhost:8000/docs
Development
Setting up the development environment
-
Clone the repository:
git clone https://github.com/meetvelani/nexus-fastapi.git cd nexus-fastapi
-
Install development dependencies:
pip install -r requirements.txt
-
Install the package in development mode:
pip install -e .
Running tests
pytest
Code formatting
# Format code
black .
# Sort imports
isort .
# Lint code
flake8
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add some amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
License
This project is licensed under the MIT License - see the LICENSE file for details.
Authors
- Meetkumar Velani - meetvelani2728@gmail.com
- Axay Patoliya - axaypatoliya2222@gmail.com
Acknowledgments
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file nexus_fastapi-0.1.1.tar.gz.
File metadata
- Download URL: nexus_fastapi-0.1.1.tar.gz
- Upload date:
- Size: 12.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
68aef791a86d2d686ecbe068f162922ad2d241ed3d2b89cc1ba0a53144640862
|
|
| MD5 |
3f48eb31cc028301df25f8a38cd8b7a4
|
|
| BLAKE2b-256 |
5550aa3cf4001ee93cbdd8dc660d85fa9753c81ee662ce16f19068d84ad5c6b0
|
File details
Details for the file nexus_fastapi-0.1.1-py3-none-any.whl.
File metadata
- Download URL: nexus_fastapi-0.1.1-py3-none-any.whl
- Upload date:
- Size: 9.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
da0661c987d82aebc884c24e7b390f73600b4aaa27cc4e387cfd129eb122fafd
|
|
| MD5 |
3cae7f602ee9872471b47d970910cda6
|
|
| BLAKE2b-256 |
21ad7df9e2dc76c3c1826d3cb8d704d22f2475ab404b9f73c70824c4958ded0e
|