Skip to main content

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

Project description

Baka model add-ons

`Baka_tenshi <>`_. 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``.


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

.. code:: python

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_tenshi, you can apply dependency injection method for model that has been created.

.. code:: python

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}


Install with ``.ini`` file

.. code:: bash
pyramid.includes =

Install with code

.. code:: python

def includeme(config):

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
baka_tenshi-1.0.3-py3-none-any.whl (14.5 kB) Copy SHA256 hash SHA256 Wheel py3
baka_tenshi-1.0.3.tar.gz (11.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page