Skip to main content

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

Documentation and Examples

📚 Comprehensive Examples and Documentation

Looking to get the most out of dpn_pyutils? Extensive documentation provides:

  • Detailed Module Guides: In-depth explanations of each module's purpose and capabilities
  • Practical Code Examples: Copy-pasteable examples showing real-world usage patterns
  • Architecture Insights: Design decisions, best practices, and integration guidance
  • Getting Started: Quick-start guides for both beginners and advanced users

Whether you're implementing CLI color formatting, secure token generation, robust file operations, powerful logging, or timezone-aware scheduling, examples will help you integrate dpn_pyutils effectively into your projects.

Start hereexamples/README.md for comprehensive usage guidance!

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

Getting Started

The fastest way to get start is with Astral uv.

Otherwise, use pip install dpn_pyutils in your virtual environment.

With uv installed on the system, create an environment

uv init
uv add dpn_pyutils
uv sync

This will create a virtual environment with dpn_pyutils installed.

Upgrade versions

Upgrading is done by uninstalling the package and installing the upgraded version

uv sync --upgrade-package dpn_pyutils

Testing

This project uses uv and tox via the tox-uv plugin. Set it up via:

uv tool install tox --with tox-uv

Building

Building dpn_pyutils can be done with python 3 and poetry

uv run pytest tests/
tox
uv 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
uv lock
uv run bumpver update --dry --patch
uv run bumpver update --patch
git push

Distribute

uv build
uv publish

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

dpn_pyutils-3.12.4.tar.gz (21.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dpn_pyutils-3.12.4-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file dpn_pyutils-3.12.4.tar.gz.

File metadata

  • Download URL: dpn_pyutils-3.12.4.tar.gz
  • Upload date:
  • Size: 21.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.13

File hashes

Hashes for dpn_pyutils-3.12.4.tar.gz
Algorithm Hash digest
SHA256 0164b9f01d06c77e2f0c862330072fbb550e91559e6da9ef3d0879f7018ec80b
MD5 2c8f0d98092c835e6581ad9f8025321e
BLAKE2b-256 2d4ec7035fa5dd7453afeef74fa77d4be2c6eb52faa38d0018fc703de5c1f720

See more details on using hashes here.

File details

Details for the file dpn_pyutils-3.12.4-py3-none-any.whl.

File metadata

File hashes

Hashes for dpn_pyutils-3.12.4-py3-none-any.whl
Algorithm Hash digest
SHA256 979b9dbd5fe439fa5f7e03ad57d6e5032c9f24f1151cf1d6b0a8a841f7cbfc03
MD5 4cc6da8dcd1a9a6f93afeabd94b1be09
BLAKE2b-256 81c68ee48ffe5bdac1dd0a4e9a2bb8fe47986b17fbb5dca818362a2e5e79725d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page