{"categories":[{"label":"Libraries","url":"https://skillfed.io/packages/category/software-development-libraries/3"}],"enrichment":{"capability":"Applies HTTP security headers to Python web responses through a single configurable object, supporting both WSGI and ASGI frameworks with preset policies and custom builder options.","skillfed_tags":["security-headers","middleware","web-framework"],"use_cases":["Apply HSTS, CSP, and referrer policies consistently across a web application via middleware.","Tune specific security headers for compliance or hardening without rewriting header strings in every route.","Start with BALANCED preset for a modern baseline and upgrade to STRICT when deploying a high-security application.","Validate and normalize dynamically composed headers before emission to catch policy drift.","Migrate legacy applications from ad hoc header code to a centralized, maintainable policy object."],"what_it_does":"Secure centralizes HTTP security header management for Python web applications, replacing ad hoc header strings scattered across routes and middleware. Instead of copying header policy into view code, you configure one Secure instance with an opinionated preset (BALANCED, BASIC, or STRICT) and apply it consistently across all responses. The package handles Content-Security-Policy, Strict-Transport-Security, referrer policy, permissions policy, and browser protection headers.\n\nIt supports both synchronous and asynchronous response objects through a small public API and typed builders for custom policies. Middleware integrations for WSGI and ASGI let you apply headers app-wide rather than per-route. The package has no external dependencies and is fully typed, making it straightforward to integrate into existing frameworks.","worth_installing":"Yes. Secure solves a real problem\u2014header policy drift in web applications\u2014with zero dependencies, active maintenance, and a clean API. The MIT license and support for current Python versions (3.10+) make it a low-risk addition. Install it if you manage HTTP security headers in any Python web framework; the preset defaults are sensible and the builder API scales to custom policies."},"id":"secure","links":{"html":"https://skillfed.io/packages/secure","md":"https://skillfed.io/packages/secure.md","pypi":"https://pypi.org/project/secure/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-04-22","license_spdx":"MIT","license_treatment":"permissive","name":"secure","python_support":"supports_current","summary":"A lightweight package that adds security headers for Python web frameworks."},"popularity":{"monthly_downloads":2109290,"position":3289,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"2.0.1"}
