Skip to main content

A tween to force HTTPS.

Project description


pyramid_force_https is a tween for Pyramid to redirect all HTTP requests to HTTPS.


Just do

pip install pyramid_force_https


easy_install pyramid_force_https


pyramid_force_https runs with pyramid>=1.7 and python>=2.7 and python>=3.5. Other versions might also work.


Usage example:

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

See tests for more examples.

If you use structlog, add the following configuration setting to your INI file to enable structlog-like logging:

pyramid_force_https.structlog = true


  1. Update CHANGES.rst.
  2. Update version.
  3. Run bin/longtest.
  4. Run bin/mkrelease -d pypi.



  • Better structlog variable names. [zupo]


  • Initial release. [zupo]

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for pyramid_force_https, version 0.1.1
Filename, size File type Python version Upload date Hashes
Filename, size pyramid_force_https-0.1.1.tar.gz (4.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page