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.1.tar.gz (2.5 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.1-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.1.tar.gz.

File metadata

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

File hashes

Hashes for perfact_api_wh_fastapi-0.1.tar.gz
Algorithm Hash digest
SHA256 7cbf4876ba47d061bf7f6a9890e2708a30845fca38bf5b224e32c5b60d2c33be
MD5 b64b4703640e44ef2df988f18c895527
BLAKE2b-256 f29edb3aac4a3c6ca14ef18c8c8f074db4650521ca676e25196b9ed34646691b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for perfact_api_wh_fastapi-0.1-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 b8861d978e0f5eb73504652d8f29d1af5b78dcd56c068a5d26d8940664fbdbca
MD5 ad6c04417afd4eb0c7b17c9f9d5679ac
BLAKE2b-256 b2b83f28bf1ebbd6c918ef83a00376bb2623f9f7e9b8127f815842e54e518d0c

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