# Utilities for Python

% start synopsis
% start main

This is the MoaT's "utilities" submodule.  It contains code that the rest
of MoaT uses rather extensively but which doesn't warrant packaging into
its own subrepository.

Feel free to extend, embrace, or split off. Patches welcome.

% end synopsis

## Features

A few. Read the code and the subpackages' documentation; I didn't get
around to documenting all of that yet.

% end main

## 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`.
