Skip to main content
Warning: You are using the test version of PyPI. This is a pre-production deployment of Warehouse. Changes made here affect the production instance of TestPyPI (
Help us improve Python packaging - Donate today!

Baka: Skeleton framework built top of pyramid, baka_model for sqlalchemy

Project Description
## Baka model add-ons

[Baka_model]( is add-ons baka framework built top of pyramid that provides an SQLAlchemy
declarative `Base` alias model.Model and a add method on `request.db`.

# Usage

You can use these as base classes for declarative model definitions, e.g.::

from base_model.model import Model

class MyModel(Model):
"""Example model class."""

__tablename__ = 'base.mymodel'

def do_first(cls, session):
instance = session.query(cls).first()

# Register Model

using baka_model, you can apply dependency injection method for model that has been created.

def includeme(config):

# in view handler request
@route('/my.model', renderer='json')
def view_mymodel(request):
MyModel = request.find_model('base.mymodel')
mymodel = MyModel() = 'user model'
mymodel.address = 'user address' = '0089800-998'

return {'success': True}

Release History

Release History

This version
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
baka_model-0.17.1.tar.gz (12.5 kB) Copy SHA256 Checksum SHA256 Source Mar 17, 2017

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