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.2.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.2-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.2.tar.gz.

File metadata

  • Download URL: perfact_api_wh_fastapi-0.2.tar.gz
  • Upload date:
  • Size: 2.5 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.2.tar.gz
Algorithm Hash digest
SHA256 06059a8902e156655e2d64d42345ae3291ad04c0a0b7098c3ecdb368ca454ce0
MD5 d47f5cee0c48594717126579c2d91fe1
BLAKE2b-256 b890bf9cb17f735eef5615210d07e2ffde9fab2edde1e68e344b621daea19b04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for perfact_api_wh_fastapi-0.2-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 513f12b2055d817ce00bd3b66f1eebfb7e4df2764bef5d03736cd902e30e0386
MD5 d12ac89b42665cfbea1230f5c1de2335
BLAKE2b-256 02054d280030c3686c69f22c38f2546572b8caa03fb0167fe74600181baeafdf

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