Skip to main content

sqldict - dict with sqlalchemy database-agnostic back-end

Project description

sqldict - dict with sqlalchemy database-agnostic backend

Usage:
from sqldict import sqldict
d = sqldict(dburi="mysql://user:pass@localhost/dbname",
tablename="hoho",
create=1)
d["asd"] = 123
for key,val in d.iteritems():
assert d["asd"] == 123

from sqlalchemy import *
engine = create_engine('sqlite://')
conn = engine.connect()
d2 = sqldict(engine=engine, tablename='hihi')
d3 = sqldict(conn=conn, tablename='haha')
d4 = sqldict(conn=conn, tablename='haha', ns='OtherNamespace')

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

sqldict-0.1.1.tar.gz (2.9 kB view hashes)

Uploaded Source

Supported by

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