Skip to main content

fastapi_cls_controller

Project description

A decorator based router for FastAPI

# fruit_controller.py
from fastapi_cls_controller import controller, delete, get, post, put, ...

@controller(
    prefix="/fruits",
)
class FruitController:
    @post("")
    async def create(self, body: CreateFruit):
        ...


    @get("/{fruit_id}")
    async def get(self, fruit_id: str):
        ...
# main.py
app.include_router(FruitController())

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_cls_controller-0.0.3.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

fastapi_cls_controller-0.0.3-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file fastapi_cls_controller-0.0.3.tar.gz.

File metadata

  • Download URL: fastapi_cls_controller-0.0.3.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.8.10

File hashes

Hashes for fastapi_cls_controller-0.0.3.tar.gz
Algorithm Hash digest
SHA256 2f2050a8a4ddadbd58020553a29aecc8069aeca209ea7e9af1bd0b0fee8e16fa
MD5 3d2415297241b772be9221c6fb797bb4
BLAKE2b-256 c28880d86e925bfedb6ff8a000701a807ab2b4c6dd0fec9e366f548817d308aa

See more details on using hashes here.

File details

Details for the file fastapi_cls_controller-0.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for fastapi_cls_controller-0.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 b73a38f9c50f3258494a04e30e0e1faad655bf6839075fcd604735bc004a15e0
MD5 52f98462282b1d8f44c14ff6ac2124bc
BLAKE2b-256 3476aabe7f11eff17d62752256ec4ccfdcc7d5818fde4020d762d7aba28fc823

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