{"categories":[{"label":"Security","url":"https://skillfed.io/packages/category/security/2"}],"enrichment":{"capability":"Secweb applies security headers (CSP, HSTS, X-Frame-Options, and 13 others) to FastAPI and Starlette applications with minimal configuration and no external runtime dependencies.","skillfed_tags":["starlette-middleware","http-security"],"use_cases":["Add CSP, HSTS, and clickjacking protection to a Starlette application in one call without writing middleware boilerplate.","Gradually roll out a Content-Security-Policy by enabling report-only mode to collect violations before enforcing.","Generate per-request nonces for inline scripts and styles in a template route to allow CSP while keeping inline code.","Protect a Starlette application with security headers when you cannot or do not want to use a reverse proxy.","Customize individual security policies (e.g., set HSTS max-age or Cache-Control directives) while keeping others at defaults."],"what_it_does":"Secweb is a middleware package that automatically injects security headers into Starlette-based application responses. It provides 16 security headers including Content-Security-Policy, HTTP Strict Transport Security, X-Frame-Options, and others, with sensible defaults aligned to MDN and OWASP recommendations. You can use it as a single SecWeb class that applies all headers at once, or import individual header functions to apply only what you need. Headers are customizable via an options dictionary, and some support advanced features like nonce generation for inline scripts and styles, or report-only modes for testing policies without enforcement.\n\nThe package has no external runtime dependencies beyond Starlette itself, making it lightweight to add to existing projects. Configuration is minimal\u2014often just a single line\u2014but flexible enough to disable specific headers or override defaults. It targets Python >= 3.10 and is actively maintained.","worth_installing":"Yes. Secweb is worth installing if you use Starlette and want security headers without external dependencies or complex configuration. It is actively maintained, has no known vulnerabilities, and offers both simplicity (one-line setup) and flexibility (per-header customization). The MPL-2.0 license is permissive for use; only modifications to the package itself trigger copyleft obligations. The main consideration is the Python >= 3.10 requirement."},"id":"secweb","links":{"html":"https://skillfed.io/packages/secweb","md":"https://skillfed.io/packages/secweb.md","pypi":"https://pypi.org/project/secweb/"},"maintenance":{"status":"active"},"meta":{"latest_release":"2026-07-30","license_spdx":"MPL-2.0","license_treatment":"copyleft","name":"Secweb","python_support":"supports_current","summary":"Secweb is a pack of security middlewares for fastApi and starlette servers it includes CSP, HSTS, and many more"},"popularity":{"monthly_downloads":361236,"position":7240,"tier":"top_15000"},"security":{"n_vulnerabilities":0},"version":"2.0.0"}
