Skip to main content

Middleware components for FastAPI applications

Project description

rodrigo0000-fastapi-core-middleware

Middleware components for FastAPI applications.

Features

  • CORS middleware configuration
  • Request logging middleware
  • Request tracing and ID generation
  • Security headers middleware
  • Error handling middleware

Installation

pip install rodrigo0000-fastapi-core-middleware

Usage

from rodrigo0000_fastapi_core_middleware import setup_middleware
from fastapi import FastAPI

app = FastAPI()
setup_middleware(app)

Components

  • CORS Middleware: Cross-Origin Resource Sharing configuration
  • Logging Middleware: Request/response logging
  • Tracing Middleware: Request ID generation and tracking
  • Security Middleware: Security headers (CSP, HSTS, etc.)
  • Error Handler: Centralized error handling

Requirements

  • Python >= 3.8
  • FastAPI >= 0.104.0
  • Starlette >= 0.27.0

License

MIT License

Author

R Firm - Professional SaaS Development

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

rodrigo0000_fastapi_core_middleware-1.0.1.tar.gz (2.1 kB view details)

Uploaded Source

Built Distribution

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

File details

Details for the file rodrigo0000_fastapi_core_middleware-1.0.1.tar.gz.

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_middleware-1.0.1.tar.gz
Algorithm Hash digest
SHA256 4ead1deb08d4647eb5a7f3a2c9461cf6ca7b5f500cfb999afcb8b6a20d4b9989
MD5 c81a5288ecc352e267e884c67a341a9e
BLAKE2b-256 3a8f634fa9d76c6601f0819fd73014856cb683f12f109f4bc44a1e573871f5aa

See more details on using hashes here.

File details

Details for the file rodrigo0000_fastapi_core_middleware-1.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_middleware-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 47ec48c74e1550eb1c70f538b39fd987fab413745b88fbf865d2a224d736a96a
MD5 1d74b3755abca2b66c9ffa52717e4283
BLAKE2b-256 736c9706047359cbc84bec881365102836f1579482a680b0da01051f1cd5a739

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