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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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