Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Common / reusable utilities for a Pyramid web application.

Project Description

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

Release History

Release History

This version
History Node

0.14.7

History Node

0.14.6

History Node

0.14.5

History Node

0.14.4

History Node

0.14.3

History Node

0.14.2

History Node

0.14.1

History Node

0.14

History Node

0.13.2

History Node

0.13.1

History Node

0.13

History Node

0.12.5

History Node

0.12.4

History Node

0.12.3

History Node

0.12.2

History Node

0.12.1

History Node

0.12.0

History Node

0.11.4

History Node

0.11.3.1

History Node

0.11.3

History Node

0.11.2

History Node

0.11.1

History Node

0.11

History Node

0.10.2

History Node

0.10.1

History Node

0.10

History Node

0.9.2

History Node

0.9.1

History Node

0.9

History Node

0.8.5

History Node

0.8.1

History Node

0.7

History Node

0.6.1

History Node

0.6

History Node

0.5

History Node

0.4

History Node

0.3

History Node

0.2.1

History Node

0.2

History Node

0.1

Download Files

Download Files

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

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
pyramid_weblayer-0.14.7.tar.gz (26.6 kB) Copy SHA256 Checksum SHA256 Source Jan 18, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting