A collection of python utils used by the DPN FinNet
Project description
DPN Python Utils
A collection of python utils used by the DPN.
Target minimum python version: 3.8.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
- Optimise code for readability and maintainability
- Design for intended eventual backwards compatibility
Major versions of dpn_pyutils releases track major Python versions in general availability
Modules
Module Name | Module Description |
---|---|
cli |
Methods relating to commandline 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.8
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.8.11
pyenv virtualenv 3.8.11 dpn_pyutils
pyenv activate dpn_pyutils
pip install --upgrade pip
pip install -r requirements.txt
Upgrade versions
Upgrading is done by uninstalling the package and installing the upgraded version
pip uninstall dpn_pyutils
pip install dpn_pyutils
Building
Building dpn_pyutils can be done with python 3, setuptools and wheel.
python -m pip install --upgrade build
python -m 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
Edit setup.cfg
and bump the version number
pip freeze > requirements.txt
pip install --upgrade -r requirements.txt
git commit -am"Updated requirements, pyproject and bumping version number for release"
Distribute
rm -r dist/ && python -m build
python -m twine upload --repository pypi dist/*
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
Hashes for dpn_pyutils-3.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1d4da79d795c4697b48f62851339fad7353ad0fe949c8d7470362b248bd80a76 |
|
MD5 | e28f26ac430535889c4b8cdfff716162 |
|
BLAKE2b-256 | 638a9126e6c10ab89e33d9f36252d975d99577b8029343fd4d83a01a898e8a85 |