====================
Utilities for Python
====================
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.
Feel free to extend and embrace. Patches welcome.
Features
========
A few. Read the code and the subpackages' documentation; I didn't get
around to documenting all of that yet.
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`.
* asyncclick, required for `main_`/`wrap_main`.
* Optionally: msgpack.
MoaT does not depend on:
* cbor2. Our implementation is shared with a version running on
MicroPython and thus needs to be minimal. Also, we want to support
efficient async streaming.
CBOR tags
=========
see `ref:../common/cbor.rst`.
Paths
=====
MoaT uses `Path` objects as hierarchical object accessors.
A Path is a list of text strings and/or integers that identify an object or
subroutine. For instance, `moat.micro` may connect to an external node
named "ext" with three binary outputs, so you'd call ``"ext" -> 1 -> "set"
(True)`` to turn the second port on.
Since that's somewhat awkward, MoaT paths are typically entered and
displayed as single strings with dots as separators, ``ext:1.set`` in this
case. There's also a secondary representation that uses slashes (``ext/:1/set``)
for interfacing with the file system or MQTT.
See ``pydoc moat.util.path.Path`` for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "moat-util",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "MoaT",
"author": null,
"author_email": "Matthias Urlichs <matthias@urlichs.de>",
"download_url": "https://files.pythonhosted.org/packages/c4/68/7fc444e005057827103140380b35ba034108be321c7ed4d784583077f99a/moat_util-0.57.14.tar.gz",
"platform": null,
"description": "====================\nUtilities for Python\n====================\n\nThis is a Python \"util\" submodule with code that I habitually use in so\nmany projects that I decided to split it off into its own git archive.\n\nFeel free to extend and embrace. Patches welcome.\n\n\nFeatures\n========\n\nA few. Read the code and the subpackages' documentation; I didn't get\naround to documenting all of that yet.\n\n\nLicense\n=======\n\nNo restrictions. CC0 / public domain / MIT / GPLv3 / whatever, as long as\nyou don't want anybody (i.e. the author(s)) to pay for the effects of any\nbugs, features or \"features\" which this code might or might not have.\n\nPlease contribute any enhancements.\n\n\nDependencies\n============\n\nA few. Notable:\n\n* anyio, version 3. Required for `ValueEvent`, `spawn` (obviously) and\n `as_service`.\n\n* ruyaml. This is a fork of ruamel.yaml which is a fork of pyyaml.\n Fixes some bugs and has a more reasonable API. Required for\n `yload`/`yprint`/`yformat`.\n\n* asyncclick, required for `main_`/`wrap_main`.\n\n* Optionally: msgpack.\n\nMoaT does not depend on:\n\n* cbor2. Our implementation is shared with a version running on\n MicroPython and thus needs to be minimal. Also, we want to support\n efficient async streaming.\n\n\nCBOR tags\n=========\n\nsee `ref:../common/cbor.rst`.\n\n\nPaths\n=====\n\nMoaT uses `Path` objects as hierarchical object accessors.\n\nA Path is a list of text strings and/or integers that identify an object or\nsubroutine. For instance, `moat.micro` may connect to an external node\nnamed \"ext\" with three binary outputs, so you'd call ``\"ext\" -> 1 -> \"set\"\n(True)`` to turn the second port on.\n\nSince that's somewhat awkward, MoaT paths are typically entered and\ndisplayed as single strings with dots as separators, ``ext:1.set`` in this\ncase. There's also a secondary representation that uses slashes (``ext/:1/set``)\nfor interfacing with the file system or MQTT.\n\nSee ``pydoc moat.util.path.Path`` for details.\n",
"bugtrack_url": null,
"license": null,
"summary": "Utility code for the rest of MoaT",
"version": "0.57.14",
"project_urls": {
"homepage": "https://m-o-a-t.org",
"repository": "https://github.com/M-o-a-T/moat"
},
"split_keywords": [
"moat"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "5b0447805b4edde824930ced12181cd112bceb1470a1328e7c9f0cd0b38ba37b",
"md5": "09682c56e6fad2fc652fd7d97e37a96b",
"sha256": "590c3094dd8e42ca54267d5c59433a0b973ef04f59441c5aac7e8afe8bd7f654"
},
"downloads": -1,
"filename": "moat_util-0.57.14-py3-none-any.whl",
"has_sig": false,
"md5_digest": "09682c56e6fad2fc652fd7d97e37a96b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 65151,
"upload_time": "2025-07-25T17:52:33",
"upload_time_iso_8601": "2025-07-25T17:52:33.640226Z",
"url": "https://files.pythonhosted.org/packages/5b/04/47805b4edde824930ced12181cd112bceb1470a1328e7c9f0cd0b38ba37b/moat_util-0.57.14-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "c4687fc444e005057827103140380b35ba034108be321c7ed4d784583077f99a",
"md5": "f0d1989491bed450b671f9bced184cf4",
"sha256": "47f4c5b4e002f66e1033a9a498fc9ad14f3ba363f309f2df12c4c5d63e9e5759"
},
"downloads": -1,
"filename": "moat_util-0.57.14.tar.gz",
"has_sig": false,
"md5_digest": "f0d1989491bed450b671f9bced184cf4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 58593,
"upload_time": "2025-07-25T17:52:35",
"upload_time_iso_8601": "2025-07-25T17:52:35.261189Z",
"url": "https://files.pythonhosted.org/packages/c4/68/7fc444e005057827103140380b35ba034108be321c7ed4d784583077f99a/moat_util-0.57.14.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-25 17:52:35",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "M-o-a-T",
"github_project": "moat",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"requirements": [
{
"name": "anyio",
"specs": []
},
{
"name": "anyio_serial",
"specs": []
},
{
"name": "trio",
"specs": []
},
{
"name": "asyncclick",
"specs": []
},
{
"name": "asyncscope",
"specs": []
},
{
"name": "git",
"specs": []
},
{
"name": "msgpack",
"specs": []
},
{
"name": "simpleeval",
"specs": []
},
{
"name": "ruyaml",
"specs": []
},
{
"name": "cffi",
"specs": []
},
{
"name": "packaging",
"specs": []
},
{
"name": "pymodbus",
"specs": []
},
{
"name": "tomlkit",
"specs": []
}
],
"lcname": "moat-util"
}