A lightweight SQL Querying package.
Project description
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file breezeblocks-0.3.2.tar.gz
.
File metadata
- Download URL: breezeblocks-0.3.2.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0945b0a2802f468367f87301e1f7ebea262a69f473c1ffabb44bbe739c11cbf4 |
|
MD5 | cf4227df764c0590869863aea90d38e2 |
|
BLAKE2b-256 | e5fe8e89237c01ecea7901d95e9eca78f294fd0543810c7a41e502de4ea7493d |