Skip to main content

Python custom implementation of unit of work pattern

Project description

PyUoW

Downloads Formatter Build codecov Version License


Installation

PyUow package is available on PyPI:

$ python -m pip install pyuow

PyUow officially supports Python >= 3.8.

Usage examples

1) Raw example:

2) FastAPI example:

For Contributors

This project is managed with poetry. All python dependencies have to be specified inside pyproject.toml file. Don't use pip directly, as the installed dependencies will be overridden by poetry during next poetry install run.

  1. Install poetry globally:

    curl -sSL https://install.python-poetry.org | python -
    

    Optionally you can specify POETRY_HOME to install poetry to a custom directory:

    curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/install-poetry.py | POETRY_HOME=`pwd`/.poetry python -
    

    Follow the steps in the command's output to add poetry to PATH.

  2. Install dependencies to virtualenv:

    poetry env use python
    poetry shell
    poetry install
    

Commands

Run tests

make tests

Pre-commit hooks

The repo contains configuration for pre-commit hooks that are run automatically before git commit command. Inspect .pre-commit-config.yaml to learn which hooks are installed.

To enable hooks, just type once:

pre-commit install

Then changes staged for committing will be automatically fixed and styled.

To execute manually, run at any time:

pre-commit run

Project Layout


pyuow
├── pyuow                               # library sources
└── tests                               # tests package (structure is mirrored from src)

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

pyuow-0.1.4.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

pyuow-0.1.4-py3-none-any.whl (9.8 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