Skip to main content

FastAPI utilities for rapid development

Project description

FastAPI Utils

FastAPI utilities for rapid development.

Features

  • Database Management

    • Easy database initialization
    • Entity base class with common fields
    • YAML/JSON configuration support
  • Router Management

    • Decorator-based routing
    • Auto-scanning controllers
    • Easy route grouping

Installation

pip install fastapi-core-utils

Quick Start

from fastapi import FastAPI
from fastapi_core_utils.router import RouterManager, controller, route
from fastapi_core_utils.database import DBManager

app = FastAPI()

# Initialize database
await DBManager.init_db(
  app=app,
  config="config/database.yaml",
  entity_dir="fastapi_core_utils/entity"
)


# Define controller
@controller(prefix="/api", tags=["example"])
class ExampleController:
  @route.get("/hello")
  async def hello(self):
    return {"message": "Hello World"}


# Auto include controllers
RouterManager.auto_include_routers(
  app=app,
  controllers_dir="app/src/controllers"
)

Documentation

For more details, please visit our GitHub repository.

License

This project is licensed under the MIT License.

rm -rf dist/ build/ *.egg-info/
python -m build
python -m twine upload dist/*

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

fastapi_core_utils-0.0.6.tar.gz (17.5 kB view details)

Uploaded Source

Built Distribution

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

fastapi_core_utils-0.0.6-py3-none-any.whl (23.7 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_core_utils-0.0.6.tar.gz.

File metadata

  • Download URL: fastapi_core_utils-0.0.6.tar.gz
  • Upload date:
  • Size: 17.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.9

File hashes

Hashes for fastapi_core_utils-0.0.6.tar.gz
Algorithm Hash digest
SHA256 2391de795f56fbc400212053a01f7503b2ffb4191294b7dd3154af40bf272370
MD5 abcf0c283f1cf66d5752def8d0dca91e
BLAKE2b-256 ae4f1ff7f13ae004668a3af8480bd59ad132dd279969c200a38bb02ef65e9ed9

See more details on using hashes here.

File details

Details for the file fastapi_core_utils-0.0.6-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_core_utils-0.0.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a32b1c3435056f24af570c9b1b27be2518ea768e9504a5cf586c0387e472e378
MD5 ca064cc46587802cb4c26690f56dbc1b
BLAKE2b-256 ae60d7c603751499b68d5576985bafebdf5ec0fc5bd855ab25a7bc9704053f34

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