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

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_middleware-1.0.2.tar.gz
Algorithm Hash digest
SHA256 823fb9191e6c73bf1d7e96c1187c189597b7a43565741ed05fe30360b55f4980
MD5 513e97704d50980e06c51cda216dfa36
BLAKE2b-256 0d675977cceb479210f8a93c560d4e4edb222252a5cfe7588f1d5ea724dc55ac

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for rodrigo0000_fastapi_core_middleware-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 759ed46ac8da63365e2f960af31a962fd51a6513eebe24e1c8c0c0c3b86258ca
MD5 a8f3e262df8a87045b408f1716a81ad1
BLAKE2b-256 aa8709a02495797d4f8a77d7c72a612a4611a836115dfc29c83437d21fdc0129

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