Skip to main content

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

  1. Navigate to your project directory:

    cd my_app
    
  2. Install dependencies:

    pip install -r requirements.txt
    
  3. Run the application:

    python run.py
    
  4. Access the API documentation at: http://localhost:8000/docs

Development

Setting up the development environment

  1. Clone the repository:

    git clone https://github.com/meetvelani/nexus-fastapi.git
    cd nexus-fastapi
    
  2. Install development dependencies:

    pip install -r requirements.txt
    
  3. Install the package in development mode:

    pip install -e .
    

Running tests

pytest

Code formatting

# Format code
black .

# Sort imports
isort .

# Lint code
flake8

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.

Authors

Acknowledgments

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

nexus_fastapi-0.1.1.tar.gz (12.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

nexus_fastapi-0.1.1-py3-none-any.whl (9.5 kB view details)

Uploaded Python 3

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

Hashes for nexus_fastapi-0.1.1.tar.gz
Algorithm Hash digest
SHA256 68aef791a86d2d686ecbe068f162922ad2d241ed3d2b89cc1ba0a53144640862
MD5 3f48eb31cc028301df25f8a38cd8b7a4
BLAKE2b-256 5550aa3cf4001ee93cbdd8dc660d85fa9753c81ee662ce16f19068d84ad5c6b0

See more details on using hashes here.

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

Hashes for nexus_fastapi-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 da0661c987d82aebc884c24e7b390f73600b4aaa27cc4e387cfd129eb122fafd
MD5 3cae7f602ee9872471b47d970910cda6
BLAKE2b-256 21ad7df9e2dc76c3c1826d3cb8d704d22f2475ab404b9f73c70824c4958ded0e

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page