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!

annotation view mapper for pyramid

Project Description

rebecca.annotationmapper is viewmapper for pyramid web application. That processes annotations of view arguments.

INSTALL

$ pip install rebecca.annotationmapper

USAGE

rebecca.annotationmapper provides include fook.

config.include('rebecca.annotationmapper')

Annotate arguments using rebecca.annotationmapper.annotations

def hello(context, request, nane: FromMatchDict):
    request.response.text = "Hello, {name}".format(name=name)
    return request.response

config.add_route("hello", "/hello/{name}")
config.add_view(hello, route_name="hello")

The argument name annotated by FromMatchDict is given value from request.matchdict['name'] by rebecca.annotationmapper.AnnotationViewMapper.

For example, you access ‘http://localhost/hello/aodag’ and you get message ‘Hello, aodag’.

Annotations

FromMatchDict

provides value from request.matchdict.

FromParam

provides value from request.params.

FromSession

provides value from request.session.

FromHeader

provides value from request.headers.

FromAttr

provides value from attribute of request.

CHANGES

0.1

  • first release
Release History

Release History

This version
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
rebecca.annotationmapper-0.1-py3-none-any.whl (5.9 kB) Copy SHA256 Checksum SHA256 py3 Wheel Jul 11, 2015
rebecca.annotationmapper-0.1.zip (7.3 kB) Copy SHA256 Checksum SHA256 Source Jul 11, 2015

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