This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description


rebecca.sqla is utility to load model made on SQLAlchemy.


Install using pip or easy_install:

$ pip install rebecca.sqla
$ easy_install rebeca.sqla


rebecca.sql needs sqlalchemy.orm.scoped_session.

specify session object and dsn string in settings:

sqlalchemy.url = 'sqlite:///'
rebecca.sqla.session =

rebecca.sqla has include hook:


this hook sets up the bind configuration of DBSession to sqlalchemy.url.

ModelLoader and SAContext

rebecca.sqla creates attribute named “sa” to request.context. is SAContext to load models from ModelLoader registered by config.add_model_loader.

here is example models:

class Person(Base):
    __tablename__ = 'person'
    id = Column(Integer, primary_key=True)
    name = Column(Unicode(255))

and example route:

config.add_route('person', '/person/{person1_id}/{person2_id}')

register model loaders:

config.add_model_loader('person1', Person, [('person1_id', 'id')])
config.add_model_loader('person2', Person, [('person2_id', 'id')])

add_model_loader takes 3 arguments. first is attr name of SAContext, second is a model loaded from ModelLoader and last is mappings that matchdict param to model attribute.

second argument can be dotted name.

in view, context has SAContext named “sa” attribute, that has properties of registered models. ModelLoader s load model with query using matchdict parameters.

def person(context, request):
    person1 =
    person2 =


  • Atsushi Odagiri, Original Author


0.1 (2013-03-14)

  • first release
Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
rebecca.sqla-0.1.tar.gz (6.4 kB) Copy SHA256 Checksum SHA256 Source Mar 14, 2013

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