bh_database
Database wrapper classes for SQLAlchemy.
Installation
To install for MySQL using the mysql-connector-python driver, use the following command:
pip install bh-database[mysql-connector-python]
To install for PostgreSQL using the psycopg2 driver, use the following command::
pip install bh-database[psycopg2-binary]
Overview
Database wrapper classes for SQLAlchemy.
These classes currently support only two database types: MySQL and PostgreSQL. Drivers required, respectively:
These classes provide the following functionalities:
-
Database connection management.
-
A custom SQLAlchemy query class which implements paginating.
-
A generic base model (table), which should be the indirect base model for applications' models. This class encapsulates:
-
SQLAlchemy scoped session, thereby providing methods to implement transaction atomicity.
-
A custom base query with paginating ability mentioned above.
-
Fully implemented dunder methods str() and repr().
-
-
A generic SQLAlchemy declarative base class which should include all required metaclasses.
-
Some generic methods which run full text SQL statements.
-
A generic method to run stored procedures which return data.
-
A generic method which takes a list of records to be inserted, and records to be updated, and writes them to the target database table in a single call.
-
Transaction atomicity. Multiple database operations involving several different tables can be wrapped under a single transaction, so that all can be committed or rolled back as appropriate.
Please see Full documentation for more detail.
Documentation
License
Metadata
Release files for bh-database 0.0.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| bh_database-0.0.6.tar.gz | 22.6 kB | Without provenance | Details for bh_database-0.0.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| bh_database-0.0.6-py3-none-any.whl | Python 3 | none | any | Details for bh_database-0.0.6-py3-none-any.whl |
Total release size: 38.6 kB
Release files / bh_database-0.0.6.tar.gz
| Download URL | bh_database-0.0.6.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d0f24b905f8533b314fbbe9e9ccb3d30b7d900e7bd6c807a629fedcdcd499e7a
|
|
BLAKE2b-256 checksum How to use checksums |
415a026ae95381bd20e7c2fc2050ea4e7b04763fcd369a538f64680a326cd139
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.1
|
Release files / bh_database-0.0.6-py3-none-any.whl
| Download URL | bh_database-0.0.6-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2a224ef3d16640bf372d43072d508035ef8be5afdc4a433409f0e164c80c777d
|
|
BLAKE2b-256 checksum How to use checksums |
2cd620026d9383f6f877b388b615a054d88acb76ee11393e0115d829fbeb0236
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.1
|
Security for bh-database 0.0.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.