Bot releases are hidden (Show)
Published by iwpnd 10 months ago
Published by iwpnd over 1 year ago
drop python 3.7 support
Published by iwpnd over 1 year ago
update dependencies
Published by iwpnd over 1 year ago
fix: fastapi dependency
Published by iwpnd over 1 year ago
bump dependencies
Published by iwpnd over 1 year ago
bump dependencies
thanks @francbartoli
Published by iwpnd over 2 years ago
bump FastAPI
dependency range to >=0.70.0,<0.85.0
Published by iwpnd over 2 years ago
bump FastAPI
dependency range to >=0.70.0,<0.78.0
bump starlette
dependency to ^0.19.0
Published by iwpnd over 2 years ago
Fix FastAPI dependency range to >=0.70.0,<0.76.0
Published by iwpnd over 2 years ago
bump fastapi dependency
Published by iwpnd almost 3 years ago
fastapi ^0.71.0
starlette ^0.17.1
Published by iwpnd over 3 years ago
As Dependency
from fastapi import FastAPI, Depends
from fastapi_key_auth import AuthorizerDependency
authorizer = AuthorizerDependency(key_pattern="API_KEY_")
# either globally or in a router
app = FastAPI(dependencies=[Depends(authorizer)])
Published by iwpnd over 3 years ago
public_path
from fastapi Import FastAPI
from fastapi_key_path import AuthorizerMiddleware
app = FastAPI()
app.add_middleware(AuthorizerMiddleware, public_paths=["/ping", "^/public"])
Published by iwpnd over 3 years ago
public_paths
validationPublished by iwpnd over 3 years ago
exclude path from x-api-key
requirement.
from fastapi import FastAPI
from fastap_key_auth import AuthorizerMiddleware
app = FastAPI()
app.add_middleware(AuthorizerMiddleware, public_paths=["/health"])
Published by iwpnd over 3 years ago
Secure your FastAPI with a middleware validating x-api-key
in the header of incoming requests. Is the x-api-key
present in your applications environment they will be authorized, else not. 🤩
Example:
from fastapi import FastAPI
from fastapi_key_auth import AuthorizerMiddleware
app = FastAPI()
app.add_middleware(AuthorizerMiddleware)