Skip to main content

Yet another python utilities, with the goal of collecting useful bicycles and crutches in one place ;).

Project description

pure-utils

Build Status PyPI Version Code Coverage Maintainability

Yet another python utilities, with the goal of collecting useful bicycles and crutches in one place ;).

Main principles:

  1. No third party dependencies (standart library only).
  2. Mostly pure functions without side effects.
  3. Interfaces with type annotations.
  4. Comprehensive documentation with examples of use.
  5. Full test coverage.

For detail information read the doc.

Available utilities

  • common - The common purpose utilities.
    • Singleton - A metaclass that implements the singleton pattern for inheritors.
  • strings - Utilities for working with strings.
    • genstr - Generate ASCII-string with random letters.
    • gzip - Compress string (or bytes string) with gzip compression level.
    • gunzip - Decompress bytes (earlier compressed with gzip) to string.
  • dt - Utilities for working with datetime objects.
    • apply_tz - Apply timezone context to datetime object.
    • iso2format - Convert ISO-8601 datetime string into a string of specified format.
    • iso2dmy - Convert ISO-8601 datetime string into a string of DMY (DD.MM.YYYY) format.
    • iso2ymd - Convert ISO-8601 datetime string into a string of YMD (YYYY-MM-DD) format.
    • round_by - Round datetime, discarding excessive precision.

License

MIT License.

Copyright (c) 2024 Peter Bro <p3t3rbr0@gmail.com || peter@peterbro.su>

See LICENSE file for more information.

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

pure-utils-0.3.0.tar.gz (7.5 kB view hashes)

Uploaded Source

Built Distribution

pure_utils-0.3.0-py3-none-any.whl (6.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