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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c42952e919014ae2e509277d41aa83c352fd14dddfe88537ca9b87e52ede9726
|
|
| MD5 |
5a31c67d3390740e3b422d12271584ed
|
|
| BLAKE2b-256 |
aef7aa7ca2a571d6c2b30d2796a262ceb019ca616d3d892ed5e76b718fd8ae7f
|
File details
Details for the file warning_sdk_fastapi-2.0.3-py3-none-any.whl.
File metadata
- Download URL: warning_sdk_fastapi-2.0.3-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
76781b14a1b884b2182a7fa0484b924f1dc031724307d7296d5a1b61590a7286
|
|
| MD5 |
076b3c94a4ced344807f2e26498caebc
|
|
| BLAKE2b-256 |
7545f0f537fe5587743ce1c2b06267c0deb32431efe4c69c3fcce726e84a698f
|