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.

Source Distribution

breezeblocks-0.3.1.dev0.tar.gz (18.5 kB view details)

Uploaded Source

File details

Details for the file breezeblocks-0.3.1.dev0.tar.gz.

File metadata

File hashes

Hashes for breezeblocks-0.3.1.dev0.tar.gz
Algorithm Hash digest
SHA256 d10b7355452a92e64d4d03aa9a5ccd70303423304e7bec16f21fd2b15dd668d9
MD5 b8703ec1bbc224cb50aaa702cf567611
BLAKE2b-256 47bd56a91d1246966185322f00651a7092fc0e60259ab6558ed46263f06effe6

See more details on using hashes here.

Supported by

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