Skip to main content

For FastAPI Routing Class

Project description

FastAPI Namespace

fastapi 라우팅 관리를 위한 namespace class

USAGE

from fastapi import FastAPI
from fastapi_namespace import Namespace, Resource

namespace = Namespace()
@namespace.route(summary="test")
class CustomNamespace(Resource):
    
    @namespace.doc(summary="test1")
    def get(self):
        ...
    
    async def post(self):
        ...

app = FastAPI()

app.include_router(namespace)

if __name__ == "__main__":
    from uvicorn import run
    run(
        app=app
    )

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_namespace_vet1ments-0.1.11.tar.gz (12.7 kB view hashes)

Uploaded Source

Built Distribution

Supported by

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