Skip to main content

A wrapper for database libraries which bakes in common database functionality.

Project description

DB Kit

Build Tests Lint Code Scanning

A wrapper for database packages which bakes in common database functionality.

Pre-requisites

  1. 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.
  2. Poetry is used for managing dependencies, ensure you have that setup locally.
  3. 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

  1. 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 for timestamps, soft deletions, auditable & more...
  • Utility functions for working with models and schema.

See usage examples here

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

sanctumlabs_dbkit-1.0.0.tar.gz (8.8 kB view details)

Uploaded Source

Built Distribution

sanctumlabs_dbkit-1.0.0-py3-none-any.whl (11.6 kB view details)

Uploaded Python 3

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

Hashes for sanctumlabs_dbkit-1.0.0.tar.gz
Algorithm Hash digest
SHA256 5b23667071efc1c00f56cce1c5333eaf9489452cec3ea07f45d1d303c5e3c4ab
MD5 e823761295188a920fbd3c2f0b3cd3d5
BLAKE2b-256 4e9896cdf28a41bd56db67668a359eecdf0dd7e05ed033c39f759667519cb4a1

See more details on using hashes here.

File details

Details for the file sanctumlabs_dbkit-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for sanctumlabs_dbkit-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4242ecdc70cb348668d738603341e13fe1c4b854c17e5857722db704d43370bf
MD5 df0f6e73b682abf888f4acea227e53b4
BLAKE2b-256 9869dd67a3a9601109ca2b2d1d877af1a71ab85e85a470073e4a0959a4be0a3b

See more details on using hashes here.

Supported by

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