rebecca.view
rebecca.view is helper classes for pyramid views.
BasicView methods and properties
properties
context view context passed to constructor
request request passed to constructor
response response attribute of request
body body attribute of request
methods
redirect(url) create HTTPFound object from url
redirect_route(route_name, **values) create HTTPFound object with route_url
action_dispatch call method named *_action with request param.
Softification
Softification is context manager to replace Exceptions to the other Exceptions.
with Softification(NoResultFound, HTTPNotFound):
item = DBSession.query(Item).filter(Item.id==id).one()
If one() method raises NoResultFound exception, the context manager catch that and raises the HTTPNotFound exception. You can use tuple for target Exception classes.
USAGE
BasicView
To use BasicView, inherit that simply.:
class Greeting(BasicView):
def __call__(self):
return self.redirect_route('top', v=1)
Contributors
Atsushi Odagiri, Original Author
Changelog
0.2 (2013-03-11)
add softification API
0.1 (2013-03-10)
first release
Metadata
Release files for rebecca.view 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| rebecca.view-0.2.tar.gz | 3.8 kB | Without provenance | Details for rebecca.view-0.2.tar.gz |
Release files / rebecca.view-0.2.tar.gz
| Download URL | rebecca.view-0.2.tar.gz |
|---|---|
| Size | 3.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d128708f7814e397a89adc25300497ab468e5a1a35f1cf74f9f526b80c8438dc
|
|
BLAKE2b-256 checksum How to use checksums |
8d964d96dee273f0cfe9bee2f846429c52868474101fd17f2d318230fa3036df
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for rebecca.view 0.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.