Add is_live to your Pyramid requests
Project description
pyramid-is-live uses a tween to add an is_live property to Pyramid requests, which is True if the request came from a HTTP interaction and False otherwise, e.g. if the request came from pyramid.paster.bootstrap.
Getting Started
Install this package:
pip install pyramid-is-live
Include it in your application startup:
def main(global_config, **settings): config = Configurator(...) config.include("pyramid_is_live") ...
Use request.is_live in your views and scripts!
Contributing
We use tox to run our tests and linters.
Run tox to run all tests and linters.
Run tox -e format to reformat your code using Black and isort.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Close
Hashes for pyramid-is-live-0.1.0.post3.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b2c922a5f72de5338577a5d80bdfb4fe9afc7d8c2992ecf04dc65715feb8dd8 |
|
MD5 | 69b80374092e0c117212f3a5cba8951c |
|
BLAKE2b-256 | f8f3aa3dd42b6adbe580c1e81f5bd0e262ecb32eae7d7e9f59b0e8031de829d2 |
Close
Hashes for pyramid_is_live-0.1.0.post3-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0191c5e4e8bde63c2fb3e16c2673f9320ffe990c8e0d42f7645bba00b9e863a2 |
|
MD5 | 20f0907338dfd50f2d06b526bce707b6 |
|
BLAKE2b-256 | c8db181be772a461889af45324519ad97a56245893f1eb8e8b21cfa6022a71c7 |