secure.py¶

version Python 3 license black

secure.py 🔒 is a lightweight package that adds optional security headers for Python web frameworks.

Supported Python web frameworks:¶

aiohttp, Bottle, CherryPy, Django, Falcon, FastAPI, Flask, hug, Masonite, Pyramid, Quart, Responder, Sanic, Starlette, Tornado

Install¶

pip:

$ pip install secure

Pipenv:

$ pipenv install secure

After installing secure.py:

import secure

secure_headers = secure.Secure()

Documentation¶

Contents:

  • Secure Headers
    • Server
    • Strict-Transport-Security (HSTS)
    • X-Frame-Options (XFO)
    • X-XSS-Protection
    • X-Content-Type-Options
    • Content-Security-Policy (CSP)
    • Referrer-Policy
    • Cache-control
    • Permissions-Policy
    • Usage
    • Options
  • Policy Builder
    • ContentSecurityPolicy()
    • StrictTransportSecurity()
    • XFrameOptions()
    • ReferrerPolicy()
    • PermissionsPolicy()
    • CacheControl()
    • Usage
  • Supported Frameworks
    • Framework Agnostic
    • aiohttp
    • Bottle
    • CherryPy
    • Django
    • FastAPI
    • Falcon
    • Flask
    • hug
    • Masonite
    • Pyramid
    • Quart
    • Responder
    • Sanic
    • Starlette
    • Tornado
  • Resources
    • Frameworks
    • General
    • Policies

Indices and tables¶

  • Index
  • Module Index
  • Search Page

secure.py

Navigation

Contents:

  • Secure Headers
  • Policy Builder
  • Supported Frameworks
  • Resources

Related Topics

  • Documentation overview
    • Next: Secure Headers

Quick search

©2021, Caleb Kinney. | Powered by Sphinx 1.8.5 & Alabaster 0.7.12 | Page source