Skip to main content

A lightweight SQL Querying package.

Project description

Documentation Status

BreezeBlocks is a lightweigt SQL abstraction layer that seeks to allow users to interact with their database as a relational store. The user constructs Python objects which represent the structure of the database, but these are then used to build SQL statements and do not also represent records.

In other words, BreezeBlocks attempts to avoid or delay, depending on how you see it, establishing an object-relation mapping. Eventually any query result will need to be instantiated as a Python object in the isinstance(o, object) sense, but not always in the class-based object- oriented sense. BreezeBlocks does use Python classes, but by not making a 1:1 correspondence of database tables to classes it can allow for more natural use of the other paradigms Python provides.

BreezeBlocks is designed as a statement builder rather than an ORM. SQL Syntax is exposed in Python classes which are passed into methods for query construction. Query results are plain-old-data types similar to a C struct. They provide access to fields of the row by name, but are still compact and don’t have as much usage overhead as most Python objects.

The contrasting approach is an ORM implementing something similar to the Active Record pattern. A class is defined for each table, with class-level properties representing the columns. Rows in the table become instances of their class.

This package is meant to help you use databases, not manage databases. Querying, inserting, updating, and deleting (row-level operations) are within scope of the project. Creating tables, views, and triggers is not.

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 breezeblocks, version 0.3.2
Filename, size File type Python version Upload date Hashes
Filename, size breezeblocks-0.3.2.tar.gz (20.8 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page