This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description

This module implements some nice common features for database access:

  • Common parameters for database setup (no more “db” vs. “database” when you switch back-ends)

  • Single-line SQL statements and single-row SELECTs:

    >>> db.Do("insert ...")
    >>> db.commit()
    >>> try: foo,bar = db.DoFn("select ... where id=123")
    >>> except sqlmix.NoData: print "Could not find your stuff"
    >>> else: print "Foo is",foo,"and bar is",bar,"-- happy now?"
  • SELECT statements which can be used as iterators:

    >>> for a,b in db.DoSelect("select ..."):
    >>>     ...
  • … or you can get the result as a dict, or through a callback.

  • A common and clear syntax for placing values in SQL statements. (The Python DBI supports five incompatible ones.)

    >>> foo,bar = db.DoFn("select ... where id=${key}", key=whatever)

An adapter for the Twisted framework is included. It runs all queries in long-lived threads, with minimal overhead, packages the results in Deferred objects or simply uses a callback from the DB thread.

Sqlmix supports transactions, retrying them, and callback-on-final-success.

This module makes no attempt whatsoever to hide database-specific SQL syntax.

Release History

Release History


This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting