Skip to main content

Reusable Python, Django and PostgreSql utilities.

Project description

Zut

Reusable Python, Django and PostgreSql utilities.

Installation

From PyPI, with optional dependencies:

pip install zut[credentials,django,flexout,postgresql,winhttp]

From a Git branch or tag (using https or ssh):

pip install git+https://gitlab.com/ipamo/zut.git@main#egg=zut[credentials,django,flexout,postgresql,winhttp]
pip install git+ssh://git@gitlab.com/ipamo/zut.git@main#egg=zut[credentials,django,flexout,postgresql,winhttp]

Note: use zut[all] to install all optional dependencies.

Usage examples

As a command-line application:

zut --help

As a Python library:

from zut import configure_env
BASE_DIR = configure_env()

Quick start guide for development

Create Python virtual environment (example for Windows):

python -m venv .venv      # Debian: python3 -m venv .venv
.\.venv\Scripts\activate  # Linux: source .venv/bin/activate
pip install .[all]

Create test postgresql database (defined in tests/__init__.py). Example:

createdb test_zut --encoding UTF-8 --locale en_US.UTF8 --template "template0"

Under Linux, initialize pass.

Run unit tests:

python -m unittest

Run command-line application :

python -m zut --help

Publish library on PyPI

Configure ~/.pypirc (see example).

Install and configure Twine if necessary:

pip install twine
$env:HTTPS_PROXY=...
$env:TWINE_CERT=...ca-certificates.crt"

Build and upload distribution:

python -m zut build --upload

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

zut-0.5.0-py3-none-any.whl (37.4 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