Skip to main content

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.

Metadata

Release files for moat-util 0.30.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for moat-util 0.30.2
File Size Uploaded
moat-util-0.30.2.tar.gz 37.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for moat-util 0.30.2
File Interpreter ABI Platform
moat_util-0.30.2-py3-none-any.whl Python 3 none any Details

Total release size: 75.6 kB

Release files / moat-util-0.30.2.tar.gz

Download URL moat-util-0.30.2.tar.gz
Size 37.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6fed28c33354a4e999aa5ab2414111331eb43d0a90b09f60392c2eab45d633a7
BLAKE2b-256 checksum
How to use checksums
9eaf81c606c0bbff649c593b8fc8da44b858bcad1d63ce1cf3b9bfa5cab2fa00
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release files / moat_util-0.30.2-py3-none-any.whl

Download URL moat_util-0.30.2-py3-none-any.whl
Size 38.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
88307f44f73cb8971ebaed400cbd97c792e92b5842c45825bc6de20e8fe0ca23
BLAKE2b-256 checksum
How to use checksums
fcb065cef93f1ae098b08fa7594561f548e4f20696ca48ea14b33173f9bad33f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.2

Release history Release notifications | RSS feed

0.63.9

2 release files

0.63.8

2 release files

0.63.6

2 release files

0.63.5

2 release files

0.63.4

2 release files

0.63.3

2 release files

0.63.2

2 release files

0.62.7

2 release files

0.62.6

2 release files

0.62.1

2 release files

0.62.0

2 release files

0.61.1

2 release files

0.61.0

2 release files

0.60.9

2 release files

0.60.8

2 release files

0.60.7

2 release files

0.58.2

2 release files

0.58.1

2 release files

0.58.0

2 release files

0.57.9

2 release files

0.57.8

2 release files

0.57.7

2 release files

0.57.0

2 release files

0.56.4

2 release files

0.56.2

2 release files

0.55.5

2 release files

0.55.4

2 release files

0.55.3

2 release files

0.55.1

2 release files

0.54.1

2 release files

0.53.1

2 release files

0.52.1

2 release files

0.51.3

2 release files

0.49.2

2 release files

0.44.0

2 release files

0.43.2

2 release files

0.41.4

2 release files

0.41.2

2 release files

0.41.1

2 release files

0.38.1

2 release files

0.38.0

2 release files

0.36.0

2 release files

0.35.0

2 release files

0.31.0

2 release files

This release

0.30.2 This release

2 release files

0.30.1

2 release files

0.27.0

2 release files

0.24.9

2 release files

0.24.8

2 release files

0.24.6

1 release file

0.24.0

1 release file

0.23.3

1 release file

0.23.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page