repo_name stringclasses 1
value | repo_url stringclasses 1
value | repo_description stringclasses 1
value | repo_stars int64 667 667 | repo_forks int64 26 26 | repo_last_updated stringclasses 1
value | repo_created_at stringclasses 1
value | repo_size int64 160 160 | repo_license stringclasses 1
value | language stringclasses 6
values | text stringclasses 22
values | avg_line_length float64 0 47.6 | max_line_length int64 0 630 | alphnanum_fraction float64 0 0.82 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Config | /build
/dist
/secure.egg-info
.DS_Store
__pycache__
docs/build
docs/source/_build
.idea
.vscode
.flake8
*.pyc | 9 | 18 | 0.724771 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | YAML | # .readthedocs.yaml
# Read the Docs configuration file
# See https://docs.readthedocs.io/en/stable/config-file/v2.html for details
# Required
version: 2
# Build documentation in the docs/ directory with Sphinx
sphinx:
configuration: docs/conf.py
# Optionally build your docs in additional formats such as PDF
format... | 22.157895 | 83 | 0.769932 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | YAML | language: python
python:
- "3.6"
cache:
- pip
install:
- pip install -r dev-requirements.txt
script:
- python -m pytest
| 11.9 | 39 | 0.664063 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Misc | MIT License
Copyright (c) 2021 Caleb Kinney
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, dist... | 47.636364 | 78 | 0.805426 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Misc | include README.md LICENSE
prune tests*
prune docs* | 16 | 25 | 0.82 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Misc | # Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS =
SPHINXBUILD = sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $... | 29.789474 | 72 | 0.686644 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Misc | Supported Frameworks
=====================
Framework Agnostic
--------------------
| Return Dictionary of Headers:
| ``secure.Secure().headers()``
.. _example-4:
**Example:**
.. code:: python
csp = secure.ContentSecurityPolicy()
secure_headers = secure.Secure(csp=csp)
print(secure_headers.headers())... | 14.908549 | 330 | 0.627172 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Misc | Secure Headers
----------------
Security Headers are HTTP response headers that, when set, can enhance
the security of your web application by enabling browser security
policies.
You can assess the security of your HTTP response headers at
`securityheaders.com <https://securityheaders.com>`__
*Recommendations used b... | 38.85 | 630 | 0.694873 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Misc | .. secure.py documentation master file, created by
sphinx-quickstart on Wed Dec 19 05:31:56 2018.
You can adapt this file completely to your liking, but it should at least
contain the root `toctree` directive.
secure.py
==========
|version| |Python 3| |license| |black|
secure.py π is a lightweight package ... | 22.795181 | 99 | 0.656535 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Misc | @ECHO OFF
pushd %~dp0
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set SOURCEDIR=source
set BUILDDIR=build
if "%1" == "" goto help
%SPHINXBUILD% >NUL 2>NUL
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure ... | 21 | 75 | 0.701643 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Misc | secure
======
.. toctree::
:maxdepth: 4
secure
| 6 | 15 | 0.509091 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Misc | Policy Builder
----------------
ContentSecurityPolicy()
^^^^^^^
**Directives:** ``base_uri(sources)``,
``child_src(sources)``, ``connect_src(sources)``,
``default_src(sources)``, ``font_src(sources)``,
``form_action(sources)``, ``frame_ancestors(sources)``,
``frame_src(sources)``, ``img_src(sources)``,
``manifest_src... | 23.625 | 145 | 0.628808 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Misc | .. _resources-1:
Resources
==================
Frameworks
----------------------
- `aiohttp <https://github.com/aio-libs/aiohttp>`__ - Asynchronous HTTP
client/server framework for asyncio and Python
- `Bottle <https://github.com/bottlepy/bottle>`__ - A fast and simple
micro-framework for python web-applicati... | 46.609756 | 121 | 0.695619 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Misc | secure package
==============
Submodules
----------
secure.headers module
---------------------
.. automodule:: secure.headers
:members:
:undoc-members:
:show-inheritance:
secure.secure module
--------------------
.. automodule:: secure.secure
:members:
:undoc-members:
:show-inheritance:
Module ... | 13.133333 | 30 | 0.560284 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Misc | 0 | 0 | 0 | |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Markdown | # secure.py
[](https://pypi.org/project/secure/)
[](https://www.python.org/downloads/)
[](https://pypi.org/project/secure/)
[
# - MDN Web Docs (https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers#security)
# - web.dev (https://web.dev)
# - The World Wide Web Consortium (W3C) (https://www.w3.org)
im... | 30.657321 | 115 | 0.621256 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Python | from typing import Any, Dict, List, Optional, Tuple, Union
from .headers import (
CacheControl,
ContentSecurityPolicy,
PermissionsPolicy,
ReferrerPolicy,
ReportTo,
Server,
StrictTransportSecurity,
XContentTypeOptions,
XFrameOptions,
XXSSProtection,
)
class Secure:
"""Set S... | 31.354167 | 92 | 0.587713 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Python | #!/usr/bin/env python
# -*- coding: utf-8 -*-
# Note: To use the 'upload' functionality of this file, you must:
# $ pip install twine
# Credits:
# https://github.com/kennethreitz/setup.py
# Copyright <YEAR> <COPYRIGHT HOLDER>
# Permission is hereby granted, free of charge, to any person obtaining a copy of this so... | 33.006944 | 462 | 0.661969 |
secure | https://github.com/cak/secure | Secure π headers for Python web frameworks | 667 | 26 | 2023-12-12 05:57:53+00:00 | 2018-11-27 00:59:09+00:00 | 160 | MIT License | Python | import unittest
import secure
class TestDefaultHeaders(unittest.TestCase):
def test_headers(self):
secure_headers = secure.Secure().headers()
self.assertEqual(
secure_headers["Strict-Transport-Security"],
"max-age=63072000; includeSubdomains",
)
self.assertE... | 30.808081 | 85 | 0.584816 |
README.md exists but content is empty.
- Downloads last month
- 6