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

Elixir plugin for cherrypy

Project Description

CherrypyElixir is a cherrypy plugin that provides elixir functionalities on top of sqlalchemy , within cherrypy as a process bus plugin.


import cherrypy
import CherrypyElixir
from elixir import Entity, String, Field, OneToMany, Unicode, ManyToOne

# define models
class Person(Entity):
    name = Field(String(128))
    addresses = OneToMany('Address')

class Address(Entity):
    email = Field(Unicode(128))
    owner = ManyToOne('Person')

class Root(object):

    def index(self):
        yield '<ul>'
        for p in Person.query:
            yield '<li>'
            yield ' '
            yield ','.join([ for a in p.addresses])
            yield '</li>'
        yield '</ul>'

    def add(self,name=None,address=None):
        p = Person(name = name)
        for addr in address.split(','):

        'server.socket_host'  : '',
        'server.socket_port'  : 1919,
        'engine.elixir.on'    : True,
        'engine.elixir.echo'    : True,
        'engine.elixir.db_uri'    : 'sqlite://test.db'

if __name__ == '__main__':
    cherrypy.quickstart(Root(), '', config=_cp_config)

To access sqlalchemy’s scoped_session directly , you can use cherrypy.request.db

Release History

Release History

This version
History Node


History Node


History Node


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
CherrypyElixir-0.5.1-py2.7.egg (5.4 kB) Copy SHA256 Checksum SHA256 2.7 Egg Dec 23, 2012
CherrypyElixir-0.5.1.tar.gz (3.2 kB) Copy SHA256 Checksum SHA256 Source Dec 23, 2012

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