A re-factor of some parts of weblayer for use within Pyramid.
Project description
Common / shared utilities for a [Pyramid][] web application. (Some originally
re-factored from the depreciated [weblayer][] micro-framework).
Provides:
* a subscriber to validate incoming requests against cross site request forgeries
* a subscriber that extends the template namespace with a `_()` function for
translating message strings
* an `hsts.force_https` configuration flag to force incoming requests to https
* a `join_to_transaction` function to hang function calls off an after commit hook
* some misc. request properties and utility functions
## Tests
The tests pass using Python2.6 and Python3.2, e.g.:
$ nosetests --with-coverage --with-doctest --cover-package pyramid_weblayer pyramid_weblayer
............................
Name Stmts Miss Cover Missing
--------------------------------------------------------
pyramid_weblayer 15 0 100%
pyramid_weblayer.csrf 26 0 100%
pyramid_weblayer.hsts 35 0 100%
pyramid_weblayer.i18n 12 0 100%
pyramid_weblayer.seen 10 0 100%
pyramid_weblayer.session 12 0 100%
pyramid_weblayer.tx 33 0 100%
pyramid_weblayer.utils 37 0 100%
--------------------------------------------------------
TOTAL 180 0 100%
----------------------------------------------------------------------
Ran 28 tests in 0.430s
OK
[pyramid]: http://pypi.python.org/pypi/pyramid
[weblayer]: http://github.com/thruflo/weblayer
re-factored from the depreciated [weblayer][] micro-framework).
Provides:
* a subscriber to validate incoming requests against cross site request forgeries
* a subscriber that extends the template namespace with a `_()` function for
translating message strings
* an `hsts.force_https` configuration flag to force incoming requests to https
* a `join_to_transaction` function to hang function calls off an after commit hook
* some misc. request properties and utility functions
## Tests
The tests pass using Python2.6 and Python3.2, e.g.:
$ nosetests --with-coverage --with-doctest --cover-package pyramid_weblayer pyramid_weblayer
............................
Name Stmts Miss Cover Missing
--------------------------------------------------------
pyramid_weblayer 15 0 100%
pyramid_weblayer.csrf 26 0 100%
pyramid_weblayer.hsts 35 0 100%
pyramid_weblayer.i18n 12 0 100%
pyramid_weblayer.seen 10 0 100%
pyramid_weblayer.session 12 0 100%
pyramid_weblayer.tx 33 0 100%
pyramid_weblayer.utils 37 0 100%
--------------------------------------------------------
TOTAL 180 0 100%
----------------------------------------------------------------------
Ran 28 tests in 0.430s
OK
[pyramid]: http://pypi.python.org/pypi/pyramid
[weblayer]: http://github.com/thruflo/weblayer
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
pyramid_weblayer-0.8.5.tar.gz
(22.7 kB
view details)
File details
Details for the file pyramid_weblayer-0.8.5.tar.gz
.
File metadata
- Download URL: pyramid_weblayer-0.8.5.tar.gz
- Upload date:
- Size: 22.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ae542f8b16538d892ddc655993bfa0063d9d576ee64ae45adb0d00d1d9d3c577 |
|
MD5 | 3f30db841ed1273c9cc7b4fc706522e8 |
|
BLAKE2b-256 | 7e9172603599b7c41c321d4ad02f93c0346f009e4a33c3ec3bb0595ec26ba022 |