Skip to main content

Warning SDK middleware for FastAPI

Project description

Warning SDK (FastAPI)

Install

pip install warning-sdk-fastapi

Usage

from fastapi import FastAPI

from warning_sdk_fastapi import WarningSDKConfig, WarningSDKMiddleware

app = FastAPI()
app.add_middleware(
    WarningSDKMiddleware,
    config=WarningSDKConfig(
        url="https://warning-sdk.gdani.eu/collect/v1",
        project_id="YOUR_PROJECT_ID",
    ),
)

API key extraction (optional)

from warning_sdk_fastapi import WarningSDKApiKeysConfig

WarningSDKConfig(
    url="https://warning-sdk.gdani.eu/collect/v1",
    project_id="YOUR_PROJECT_ID",
    api_keys=WarningSDKApiKeysConfig(scheme="bearer"),
)

Or a named key (checked in header, then query string, then JSON body):

WarningSDKConfig(
    url="https://warning-sdk.gdani.eu/collect/v1",
    project_id="YOUR_PROJECT_ID",
    api_keys=WarningSDKApiKeysConfig(scheme="query", name="api_key"),
)

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

warning_sdk_fastapi-2.0.3.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

warning_sdk_fastapi-2.0.3-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file warning_sdk_fastapi-2.0.3.tar.gz.

File metadata

  • Download URL: warning_sdk_fastapi-2.0.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.11

File hashes

Hashes for warning_sdk_fastapi-2.0.3.tar.gz
Algorithm Hash digest
SHA256 c42952e919014ae2e509277d41aa83c352fd14dddfe88537ca9b87e52ede9726
MD5 5a31c67d3390740e3b422d12271584ed
BLAKE2b-256 aef7aa7ca2a571d6c2b30d2796a262ceb019ca616d3d892ed5e76b718fd8ae7f

See more details on using hashes here.

File details

Details for the file warning_sdk_fastapi-2.0.3-py3-none-any.whl.

File metadata

File hashes

Hashes for warning_sdk_fastapi-2.0.3-py3-none-any.whl
Algorithm Hash digest
SHA256 76781b14a1b884b2182a7fa0484b924f1dc031724307d7296d5a1b61590a7286
MD5 076b3c94a4ced344807f2e26498caebc
BLAKE2b-256 7545f0f537fe5587743ce1c2b06267c0deb32431efe4c69c3fcce726e84a698f

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