A collection of python utils used by the DPN
Project description
DPN Python Utils
A collection of python utils used by the DPN.
Target minimum python version: 3.12.x
High-level Design Notes
To be broadly compatible with running in synchronous or asynchronous mode.
The principles behind the modules are to:
- Be dependable and provide least surprise
- Fail safe and raise informative exceptions
- Optimize code for readability and maintainability
- Design for backwards compatibility
Major versions of dpn_pyutils releases track major Python versions in general availability
Modules
Module Name | Module Description |
---|---|
cli |
Methods relating to command line input and output |
common |
Methods relating to logging and shared system services |
crypto |
Methods relating to cryptography and encoding |
exceptions |
Exception classes for all modules |
file |
Methods relating to file and path operations |
http |
Methods relating to general HTTP/REST |
money |
Methods relating to money, transactions, and formatting |
time |
Methods relating to time management |
Getting Started
The fastest way to get start is with a pyenv.
With pyenv installed on the system, check the latest version of the target python version.
pyenv update && pyenv install -l | grep 3.12
Install
Install with pip using:
pip install dpn_pyutils
Install manually
Install the target python version into pyenv and set up the virtualenv
pyenv install 3.12.1
pyenv virtualenv 3.12.1 dpn_pyutils
pyenv activate dpn_pyutils
pip install --upgrade pip poetry
poetry install
Upgrade versions
Upgrading is done by uninstalling the package and installing the upgraded version
pip install --upgrade dpn_pyutils
Building
Building dpn_pyutils can be done with python 3 and poetry
tox run-parallel
poetry build
The distribution-ready files will be in the dist/
directory.
Packaging and Distribution
Packaging after changes need the following to be executed:
Update the version number
Bump the version number
- The MAJOR and MINOR versions should always match the minimum Python versions
- The PATCH version should be an incremental counter of library versions
poetry check --lock
git commit -am"Updated requirements, pyproject and bumping version number for release"
Distribute
poetry build
poetry publish
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 dpn_pyutils-3.12.3.tar.gz
.
File metadata
- Download URL: dpn_pyutils-3.12.3.tar.gz
- Upload date:
- Size: 14.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/5.15.0-94-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | abb6fb66839d172ec2f0071d91992d3a1ae8bf9e3d10685bd1812751d2d4a25b |
|
MD5 | 878ca722b1c01f74fe9abf5c48512eff |
|
BLAKE2b-256 | 070142829e05d8a6a03d8ab126f8e1af07725d0b948026fe00ae8c9b4358ce51 |
File details
Details for the file dpn_pyutils-3.12.3-py3-none-any.whl
.
File metadata
- Download URL: dpn_pyutils-3.12.3-py3-none-any.whl
- Upload date:
- Size: 15.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.7.1 CPython/3.12.2 Linux/5.15.0-94-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5b773e7402698ff226fc089dfcf5365e5df40f6561cb32500fd7892f680d13c6 |
|
MD5 | da4f17d6312c8467d6ff114bbacbfee6 |
|
BLAKE2b-256 | db35c11cb990644b8384442ee44e85d3b4b4ba7f2cb6a9e4ee4bd0e041292118 |