Skip to main content

Database interaction utilities for the SPARC platform

Project description


Database interaction utilities for the SPARC platform.

SQL Databases
Interactions to SQL databases are provided via SQLAlchemy (
In addition, z3c.saconfig ( is
provided to allow connection configuration andintegration of SQLAlchemy in ZCA.

### Usage - SQLite memory DB connection
These steps will give you access to a SQLAlchemy session, see the SQLAlchemy
docs to understand how to interact with this object.
>>> import sparc.db
>>> from sparc.common import Configure
>>> from zope.component import getUtility
>>> from z3c.saconfig.interfaces import IEngineFactory, IScopedSession
>>> Configure((sparc.db, 'memory.zcml',))
>>> myEngine = getUtility(IEngineFactory, name="memory_engine")
>>> mySession = getUtility(IScopedSession, name="memory_session")

The above example gives access to a in-memoery SQLite instance. In practice,
you would create your own db.zcml with the appropriate connection information.
See SAConfig documentation on how to create the ZCML configu file.


* pypi packaging update


* include zcml configuration files in packaging


* initial release

Project details

Download files

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

Files for sparc.db, version 0.0.3
Filename, size File type Python version Upload date Hashes
Filename, size sparc.db-0.0.3.tar.gz (9.1 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page