Se

Secure.py – Simplify HTTP Security Headers for Python Web Apps

Hacker News

Secure.py – Simplify HTTP Security Headers for Python Web Apps

Hi HN, I'm excited to share a major update to secure.py, a Python library designed to make adding essential HTTP security headers to web apps easier than ever. This release is a complete rewrite, leveraging modern Python 3.10+ features to enhance usability and performance. Why secure.py? Adding headers like Content Security Policy (CSP), HSTS, and X-Frame-Options is crucial for protecting web applications from attacks like XSS and clickjacking. However, managing these headers across different frameworks and ensuring adherence to best practices can be cumbersome. secure.py removes that friction by providing: - Out-of-the-Box Security Presets: Apply BASIC or STRICT security configurations with a single line of code. - Full Customization: Take control over headers like CSP, HSTS, X-Frame-Options, Referrer-Policy, and more to tailor security to your app's needs. - Multi-Framework Support: Works with popular frameworks including Flask, Django, FastAPI, Starlette, and more—both synchronous and asynchronous. - Modern Pythonic Design: Utilizes Python 3.10+ features like structural pattern matching and improved type hinting for cleaner and more efficient code. - No External Dependencies: Lightweight and easy to include in any project. - Best Practice Compliance: Follows recommendations from the OWASP Secure Headers Project and MDN Web Docs for robust security. Requirements: - Python 3.10 or higher If you're tired of manually adding security headers and worrying about consistency, give secure.py a try. It's open source and designed to help developers add the kind of security that every app should have by default. GitHub: https://github.com/TypeError/secure I welcome any feedback, ideas for improvement, or contributions from the community! Thanks for checking it out!

Share card

Actual performance

4points
Did not reach leaderboard

Launch Intel predictions

Analyze your own launch →
Indie HackersFits the IH revenue-focused audience · Strong signals: including · Missing: supports, reddit linkedin, podcasting
87%87% predicted probability of success on Indie Hackers, based on ML models trained on real launch data.
best fitHighest predicted score across all platforms for this description.
Product HuntOn track for Day 1 leaderboard · Strong signals: apps, single, code · Missing: mac, agents, macos
54%54% predicted probability of success on Product Hunt, based on ML models trained on real launch data.
Hacker NewsStrong engagement from HN community · Strong signals: excited, open source, ide · Missing: https docs, just released, exist
51%51% predicted probability of success on Hacker News, based on ML models trained on real launch data.
nativeThis product was originally launched on this platform.
TrustMRRLess likely to generate early MRR · Strong signals: apps · Missing: mobile apps, ios, personal
49%49% predicted probability of success on TrustMRR, based on ML models trained on real launch data.
AppSumoMay struggle as an AppSumo deal · Strong signals: efficient · Missing: plus, platform, intuitive
44%44% predicted probability of success on AppSumo, based on ML models trained on real launch data.
Acquire.comPre-revenue stage for this audience · Missing: arr, mrr, revenue
12%12% predicted probability of success on Acquire.com, based on ML models trained on real launch data.
BetaListMay not resonate with beta-testers · Missing: web3, chat, crypto
0%0% predicted probability of success on BetaList, based on ML models trained on real launch data.

Incorrect prediction on native model

Similar products

fa
fallback() – write web apps in Solidity and serve HTTP over Ethereum58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

fallback() – write web apps in Solidity and serve HTTP over Ethereum

Hacker News9
HT
HTTP/2 Python-Asyncio Web Microframework70%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

HTTP/2 Python-Asyncio Web Microframework

Hacker News173
Ai
Aioquic – A QUIC and HTTP/3 Implementation in Python58%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Aioquic – A QUIC and HTTP/3 Implementation in Python

Hacker News5
Hi
Hishel – HTTP Caching for Python53%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Hishel – HTTP Caching for Python

Hacker News3
Beagle Security
Beagle Security62%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Get to know how secure your web apps, APIs and GraphQL are

Indie Hackers6ai
Py
Pynecone – Web Apps in Pure Python75%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Pynecone – Web Apps in Pure Python

Hacker News209
De
Declarative Abstraction for Assembling Web Apps (WIP)51%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Declarative Abstraction for Assembling Web Apps (WIP)

Hacker News3
Na
Narrativ - HTML5 multimedia authoring for web & apps71%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Narrativ - HTML5 multimedia authoring for web & apps

Hacker News1
Ap
AppCoral – Yelp for Web Apps65%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

AppCoral – Yelp for Web Apps

Hacker News1
We
Web Apps for Researchers61%Launch Intel prediction score: how likely this product is to succeed on its source platform, based on its name, tagline, and description.

Web Apps for Researchers

Hacker News1