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.5.tar.gz (17.2 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.5-py3-none-any.whl (23.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: fastapi_core_utils-0.0.5.tar.gz
  • Upload date:
  • Size: 17.2 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.5.tar.gz
Algorithm Hash digest
SHA256 d4a43c5fa4280205d6dc6067742d41ff9b0c5d2ac52b558bb5d6dbabd3d0692d
MD5 f54526799df3dfcc961cf40716c3a575
BLAKE2b-256 cd37cae65b6d15fc7ff45b7da6555b152c984a5bd6ec36bce739c67447832fb2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for fastapi_core_utils-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 ad6df49a0d27705461bb6681c87a8b51c5f8b640ad0efee5ebe809e4f7ee0b21
MD5 9609122e7b36ec619a5f94d6f1702e2c
BLAKE2b-256 6bd65ad517ad118d1d7abc88f8d91b6b60b249513a297e0e6d52afb2d6340f7a

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