Skip to main content

PerFact API - WH FastAPI integration

Project description

perfact-api-wh-fastapi

FastAPI integration for the WH domain. Mounts WH routes into a perfact-api-main application as a plugin. Part of the perfact.api.wh_fastapi namespace.

How it works

This package registers itself via the perfact.api entry point group. When perfact-api-main starts, it discovers and calls mount(app) automatically:

INFO - try to include plugin: perfact.api.wh_fastapi.routes:mount
INFO - finished plugin discovery, included 1 plugins

Routes are declared in perfact.api.wh_fastapi.routes using the Auth and DBSession dependencies from perfact-api-main:

from perfact.api.main.auth import require_roles, Auth
from perfact.api.main.dbsession import DBSession

@router.get("/wh/something")
@require_roles("WHRole")
def my_endpoint(auth: Auth, session: DBSession) -> ...:
    ...

Dependencies

  • perfact-api-wh
  • perfact-api-main

Maintainers

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

perfact_api_wh_fastapi-0.4.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.

perfact_api_wh_fastapi-0.4-py2.py3-none-any.whl (2.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file perfact_api_wh_fastapi-0.4.tar.gz.

File metadata

  • Download URL: perfact_api_wh_fastapi-0.4.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for perfact_api_wh_fastapi-0.4.tar.gz
Algorithm Hash digest
SHA256 13fc64bf570818263c38bad4a137e629838179eabb2ecae81f1f057139614488
MD5 671123ea8abe50c5dd9c864fb29a5893
BLAKE2b-256 09d14b08a46789e0f1d529347cc3de1ea52e3a339a9d8901d5df9df7ae424952

See more details on using hashes here.

File details

Details for the file perfact_api_wh_fastapi-0.4-py2.py3-none-any.whl.

File metadata

File hashes

Hashes for perfact_api_wh_fastapi-0.4-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 c68190185e5d1037228803bafeba9afc68f6533b2f6f411e76164a8961647a51
MD5 9d069d5e88d49200252cf2d7ad832397
BLAKE2b-256 0bb528e25b9cd7e37029c96dd474e57cc7e78c28ca66f182f56aedcfc6f68e57

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