A wrapper for database libraries which bakes in common database functionality.
Project description
DB Kit
A wrapper for database packages which bakes in common database functionality.
Pre-requisites
- Ensure that you have Python version 3.12.0 setup locally, you can set this up using pyenv if you have multiple versions of Python on your local development environment.
- Poetry is used for managing dependencies, ensure you have that setup locally.
- Virtualenv Not a hard requirement as poetry should setup a virtual environment for you, but can be used as well to setup a virtual environment.
Setup
-
After cloning the project, install the dependencies required with:
poetry install
When using poetry
Or
make install
When using GNU Make, this is a wrapper around the top commend
Installation
poetry add sanctumlabs_dbkit
Features
on_commit
hooks for a when a transaction is committed.- A DAO pattern for common methods such as
find
,find_or_raise
,all
... - A
BaseModel
with baked in mixins fortimestamps
,soft deletions
,auditable
& more... - Utility functions for working with models and schema.
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
Built Distribution
File details
Details for the file sanctumlabs_dbkit-1.0.0.tar.gz
.
File metadata
- Download URL: sanctumlabs_dbkit-1.0.0.tar.gz
- Upload date:
- Size: 8.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b23667071efc1c00f56cce1c5333eaf9489452cec3ea07f45d1d303c5e3c4ab |
|
MD5 | e823761295188a920fbd3c2f0b3cd3d5 |
|
BLAKE2b-256 | 4e9896cdf28a41bd56db67668a359eecdf0dd7e05ed033c39f759667519cb4a1 |
File details
Details for the file sanctumlabs_dbkit-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: sanctumlabs_dbkit-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.12.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4242ecdc70cb348668d738603341e13fe1c4b854c17e5857722db704d43370bf |
|
MD5 | df0f6e73b682abf888f4acea227e53b4 |
|
BLAKE2b-256 | 9869dd67a3a9601109ca2b2d1d877af1a71ab85e85a470073e4a0959a4be0a3b |