/wallace

Primary LanguagePythonBSD 3-Clause "New" or "Revised" LicenseBSD-3-Clause

Downloads

Latest Version

License

Wallace

Wallace wraps database adapters for easy connection handling and data modeling in Python apps. We extend the enterprise libraries but do not override or replace their functionality, so performance profiles etc. remain intact. Major features include:

  • Databases: Currently supports PostgreSQL (psycopg), Redis (redispy), and MongoDB (pymongo). More to come
  • Modeling: A bare-bones ORM, built around a consistent type interface to model attributes across backends. Use of the ORM is optional, other database and config utilities can be used without it.
  • Caching: Automatic connection pool sharing - set it and forget it

Basic Usage

To spin up a Postgres connection pool, pass DNS connection info and an optional min/max number of connections:

To use the standard interface, wrap a table:

And create a model to plug the table like so:

'push' to update a model:

'delete' to delete:

Download and Install

pip install wallace to install the latest stable release.

License

Code, tutorials, and documentation for wallace are all open source under the BSD license.

Enjoy your data.