Skip to main content

Utility code for the rest of MoaT

Project description

This is a Python “util” submodule with code that I habitually use in so many projects that I decided to split it off into its own git archive.

This code is not a Python module. The idea is to add it as a submodule to your own Python code:

git submodule add git@github.com:smurfix/util-py.git src/your_module/util

and then relative-import:

from .util import attrdict

Feel free to extend and embrace. Patches welcome.

Features

A few. Read the code, I didn’t get around to documenting all of that yet.

times

This code implements calculating an offset to an under-specified future time. Like “how long until next Wednesday 8 am”?

The code also supports the inverse question, as in “how long until it’s no longer Wednesday 8 am”.

License

No restrictions. CC0 / public domain / MIT / GPLv3 / whatever, as long as you don’t want anybody (i.e. the author(s)) to pay for the effects of any bugs, features or “features” which this code might or might not have.

Please contribute any enhancements.

Dependencies

A few. Notable:

  • anyio, version 3. Required for ValueEvent, spawn (obviously) and as_service.

  • ruyaml. This is a fork of ruamel.yaml which is a fork of pyyaml. Fixes some bugs and has a more reasonable API. Required for yload/yprint/yformat.

  • msgpack, obviously required for pack/unpack and MsgReader/MsgWriter.

  • asyncclick, required for main_/wrap_main.

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

moat-util-0.24.10.tar.gz (32.2 kB view details)

Uploaded Source

Built Distribution

moat_util-0.24.10-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file moat-util-0.24.10.tar.gz.

File metadata

  • Download URL: moat-util-0.24.10.tar.gz
  • Upload date:
  • Size: 32.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.8.2 requests/2.25.1 setuptools/63.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.10.5

File hashes

Hashes for moat-util-0.24.10.tar.gz
Algorithm Hash digest
SHA256 9a3dd49c35253589a441a60c0b26d81c13690aa662fa1fa4c896f0926a3c8f3e
MD5 a108bddda0205a773154c76e37f17aac
BLAKE2b-256 6ea743eb2d135e0fc0275a8fb52a3692bbf63a1cc184b5814bf8d6458335cd46

See more details on using hashes here.

Provenance

File details

Details for the file moat_util-0.24.10-py3-none-any.whl.

File metadata

  • Download URL: moat_util-0.24.10-py3-none-any.whl
  • Upload date:
  • Size: 33.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.8.2 requests/2.25.1 setuptools/63.2.0 requests-toolbelt/0.9.1 tqdm/4.57.0 CPython/3.10.5

File hashes

Hashes for moat_util-0.24.10-py3-none-any.whl
Algorithm Hash digest
SHA256 28e3954b0457734e00a4afe8b915461835d3d82f1c20320685007e433602e90c
MD5 00d26aeabd320d84be2257661f4467f5
BLAKE2b-256 20c1d7d2d185a5ee21aa9d5b582963dbf4266e8a2261ad6a0e20edefb70abb2c

See more details on using hashes here.

Provenance

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