Skip to main content

Sqlalchemy utilities for Takumi

Project description

Sqlachmey utilities for Takumi.

Add Settings

The setting DB_SETTINGS must be defined in settings module.

    'test_db': {'dsn': 'sqlite:///:memory:'}

Init App

It’s not required to init app before using db. But it’s recommended to init app first:


Query Database

The object db should be used to query database. And the only preferred way to query database is to use the context manager:

with db['test_db'] as session:

# or to use a different binding
with db['test_db'].using_bind('master') as s:

# or to tag the query
with db['test_db'].tag(hello=123, world=90) as s:

Project details

Download files

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

Source Distribution

takumi_sqlalchemy-0.1.5.tar.gz (4.3 kB view hashes)

Uploaded source

Built Distribution

takumi_sqlalchemy-0.1.5-py2.py3-none-any.whl (6.9 kB view hashes)

Uploaded py2 py3

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page