Skip to main content

pyramid_cloudflare_access

Introduction

Installation

Just do

pip install pyramid_cloudflare_access

or

easy_install pyramid_cloudflare_access

Compatibility

pyramid_cloudflare_access runs with pyramid>=1.7 and python>=3.6. Other versions might also work.

Review Apps skip the Cloudflare Access check, as their domains are dynamic and as such can’t be configured in Cloudflare dashboard in advance. *.herokuapp.com is skipped by default. To name the hostnames yourself, for example on Fly.io:

pyramid_cloudflare_access.bypass_hosts = fly.dev

Several are allowed, whitespace separated:

pyramid_cloudflare_access.bypass_hosts =
    herokuapp.com
    fly.dev

Setting this replaces the default rather than adding to it, so an app that has left Heroku can have *.herokuapp.com verified like any other hostname.

A bypassed hostname is served without authentication, so protect it another way, such as the IP allowlist in pyramid_heroku.herokuapp_access. This matters most on platforms that route by TLS SNI rather than by Host, because there the Host header is whatever the caller sends.

Usage

Add Cloudfalre config to a production.ini:

pyramid_cloudflare_access.policy_audience = "my_audience"
pyramid_cloudflare_access.team = "https://team.cloudfare-access.com"

More information can be found at https://developers.cloudflare.com/cloudflare-one/identity/users/validating-json#python-example

Usage example for the tween:

def main(global_config, **settings):
    config = Configurator(settings=settings)
    config.include('pyramid_cloudflare_access')
    return config.make_wsgi_app()

Releasing

  1. Update CHANGES.rst.

  2. Update pyproject.toml version.

  3. Run poetry check.

  4. Run poetry publish --build.

We’re hiring!

At Niteo we regularly contribute back to the Open Source community. If you do too, we’d like to invite you to join our team!

Metadata

Release files for pyramid_cloudflare_access 1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyramid_cloudflare_access 1.3
File Size Uploaded Provenance Actions
pyramid_cloudflare_access-1.3.tar.gz 7.7 kB Without provenance Details for pyramid_cloudflare_access-1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for pyramid_cloudflare_access 1.3
File Interpreter ABI Platform Actions
pyramid_cloudflare_access-1.3-py3-none-any.whl Python 3 none any Details for pyramid_cloudflare_access-1.3-py3-none-any.whl

Total release size: 16.8 kB

Release files / pyramid_cloudflare_access-1.3.tar.gz

Download URL pyramid_cloudflare_access-1.3.tar.gz
Size 7.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ac79194b4ad04e5779017b162251356e2c85c5e03aa2afcef6f8a4df0ecdcebb
BLAKE2b-256 checksum
How to use checksums
d0669a8cc5982ffe3da5038f74f6363af2048b3079ba404e9b3bfc5dcca4f3c6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.13.15 Darwin/25.6.0

Release files / pyramid_cloudflare_access-1.3-py3-none-any.whl

Download URL pyramid_cloudflare_access-1.3-py3-none-any.whl
Size 9.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a35655ef6c6dd410985daa32b622fb2ae0d81ea6aae92b91fc10f1b655c812f
BLAKE2b-256 checksum
How to use checksums
4fc2448af91595a56921de7c6ac95d4b2df0ddbcb33b6b6ca2de5a550c9e3168
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/2.4.1 CPython/3.13.15 Darwin/25.6.0

Security for pyramid_cloudflare_access 1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page