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.post4.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | fb838dc29f3cf3906fd57365f80dfc68ffa7a61433112bc216a432451ab1cd3a |
|
MD5 | 274265d491d2d5d68b7a6afe7901c580 |
|
BLAKE2b-256 | 1733a4e6ee9f349fd9a8c4b7018261f12e3754b3fc8005d82a0e7e7bbde6e686 |
Close
Hashes for pyramid_is_live-0.1.0.post4-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23cb1cd65da83919c58bb9d47bb026d268cf109a6542c55718d2cacc43232b12 |
|
MD5 | e8ac31542641464ef3cd6be5d3ca7188 |
|
BLAKE2b-256 | 86f16581f6bb8d98967183fff8dec8f8793d4e90fcd159f3998a94ba4b1fa8e4 |