Skip to main content

A CLI tool for bootstrapping FastAPI projects and apps

Project description

Faster API

Faster API is a Python CLI tool for scaffolding and managing FastAPI projects with a Django-inspired developer experience. It boosts productivity for large-scale projects by offering modular project structure, built-in user authentication, and out-of-the-box support for PostgreSQL via Docker.

Features

  • Django-like commands: startproject, startapp, runserver, makemigrations, migrate, createsuperuser
  • Modular project/app structure for scalable codebases
  • Preconfigured with:
    • SQLAlchemy
    • Pydantic Settings module
    • User, profile, and preference models
    • Auth endpoints (OAuth2, registration, token refresh)
  • Integrated PostgreSQL dev server powered by Docker

Installation

pip install tle-faster-api

CLI Usage

fasterapi <command> [options]

Commands

  • startproject <name> [--db_port <port>]: Create a new FastAPI project
  • startapp <name>: Create a new app within the project
  • runserver [--host <host>] [--port <port>]: Launch the development server
  • makemigrations: Generate a new Alembic migration
  • migrate: Apply all migrations
  • createsuperuser: Create an admin user interactively
  • dbup: Start a local PostgreSQL container
  • dbdown: Stop the database container
  • dbreset: Remove the database container and volume

Getting Started

fasterapi startproject myproject
cd myproject
cp .env.example .env
fasterapi dbup
fasterapi makemigrations
fasterapi migrate
fasterapi runserver

Creating an App

fasterapi startapp blog

Then update:

  • alembic/env.py:

    import app.blog.models
    
  • app/core/routers/v1.py:

    from app.blog import views as blog_views
    api_router.include_router(blog_views.router, prefix="/blog", tags=["blog"])
    

Creating a Superuser

fasterapi createsuperuser

PostgreSQL Dev Database

Faster API includes a docker-compose file to spin up a local PostgreSQL instance:

fasterapi dbup     # Start DB
fasterapi dbdown   # Stop DB
fasterapi dbreset  # Destroy DB & volume

License

MIT

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

tle_faster_api-0.2.2.tar.gz (34.9 kB view details)

Uploaded Source

Built Distribution

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

tle_faster_api-0.2.2-py3-none-any.whl (49.7 kB view details)

Uploaded Python 3

File details

Details for the file tle_faster_api-0.2.2.tar.gz.

File metadata

  • Download URL: tle_faster_api-0.2.2.tar.gz
  • Upload date:
  • Size: 34.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for tle_faster_api-0.2.2.tar.gz
Algorithm Hash digest
SHA256 d4fca4565fc5d326d3969153ebb8b5df6c62607a02e7e2c61435ec57c1950aba
MD5 65d2b7481d7e41cd639a4ad635b8ca5a
BLAKE2b-256 446c48652d1c86a81620764886cd50a7bc4c1dc2cb2af5a9a4820cfa23e7e431

See more details on using hashes here.

File details

Details for the file tle_faster_api-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: tle_faster_api-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 49.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for tle_faster_api-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8bfc8f051d4ee3d6410f969ee9049dbeafe0bf11d118b6ffb47d01c95a960c40
MD5 cd8d909c46236b322e5d27f77b0bb502
BLAKE2b-256 900d4b8efd65abc881771f8c8cc40ce9ee2ed9790f1d64c7ee3743001ec99bbf

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