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

perfact_api_wh_fastapi-0.3-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.3.tar.gz.

File metadata

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

File hashes

Hashes for perfact_api_wh_fastapi-0.3.tar.gz
Algorithm Hash digest
SHA256 a211bd210ec34cb6383c525e0229ffafe7c09e8cbeb71a6af28fc2fe599d9af8
MD5 9fd84605077506f043831abfaebfa827
BLAKE2b-256 cd9fc801013e139fa8fcf216a77c574a855c346023082399dbbec1af5d5efe89

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for perfact_api_wh_fastapi-0.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 29ed006caa1646f118d065197d7d78874796214d03578a735563728d8873db1b
MD5 0118814c91660fb216a280256cc9ec0f
BLAKE2b-256 090db6be40eeb579ce8f390db534b51085c09fec5244ecbae071bc437d94f86c

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