Skip to main content

Common / shared utilities for a [Pyramid][] web application. (Some originally re-factored from the depreciated [weblayer][] micro-framework).

I generally use this package as a home for simple bits of code that are reusable across Pyramid applications, i.e.: stuff I’ve written once for a project and then extracted for use across multiple projects.

Highlights include:

  • 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

  • a whole bunch of other request properties and utility functions

Read the source for more info.

## Tests

I tend to add things too fast to keep 100% coverage and test against multiple Python versions. So expect code to be tested against python2.7 and to have decent but not exhaustive coverage. Patches to increase compatibility and coverage are very welcome.

To run the tests, pip install mock nose coverage WebTest and e.g.:

$ nosetests pyramid_weblayer –with-doctest –with-coverage –cover-tests –cover-package pyramid_weblayer … Ran 40 tests in 0.297s

OK

[pyramid]: http://pypi.python.org/pypi/pyramid [weblayer]: http://github.com/thruflo/weblayer

Metadata

Release files for pyramid_weblayer 0.14.7

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_weblayer 0.14.7
File Size Uploaded
pyramid_weblayer-0.14.7.tar.gz 26.6 kB Details

Release files / pyramid_weblayer-0.14.7.tar.gz

Download URL pyramid_weblayer-0.14.7.tar.gz
Size 26.6 kB
Tags Source
SHA-256 checksum
How to use checksums
21478c7e9bff0a4f0ab0746c92bb3b188fba521a4699da9a47f9599b753af970
BLAKE2b-256 checksum
How to use checksums
902d62ff5c453d802123e7509b5de39e29e884f3b01da8e61ac04509a4114142
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.14.7 This release

1 release file

0.14.6

1 release file

0.14.5

1 release file

0.14.4

1 release file

0.14.3

1 release file

0.14.2

1 release file

0.14.1

1 release file

0.14

1 release file

0.13.2

1 release file

0.13.1

1 release file

0.13

1 release file

0.12.5

1 release file

0.12.4

1 release file

0.12.3

1 release file

0.12.2

1 release file

0.12.1

1 release file

0.12.0

1 release file

0.11.4

1 release file

0.11.3

1 release file

0.11.2

1 release file

0.11.1

1 release file

0.11

1 release file

0.10.2

1 release file

0.10.1

1 release file

0.10

1 release file

0.9.2

1 release file

0.9.1

1 release file

0.9

1 release file

0.8.5

1 release file

0.8.1

1 release file

0.7

1 release file

0.6.1

1 release file

0.6

1 release file

0.5

1 release file

0.4

1 release file

0.3

1 release file

0.2.1

1 release file

0.2

1 release file

0.1

1 release file

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