Metadata-Version: 2.4
Name: uun-iot
Version: 0.12.14
Summary: Modular framework for communication with UuApp and utility functionality
Home-page: https://uuapp.plus4u.net/uu-bookkit-maing01/38c7532545984b3797c5719390b523a8/book/page?code=71150832
Author: (UUN) Tomáš Faikl
Author-email: tomas.faikl@unicornuniversity.net
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.md
Requires-Dist: requests>=2.24.0
Requires-Dist: requests_toolbelt>=0.9.1
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# uunIot Framework

The uunIoT Framework is a library primarily for use with Unicorn uuApp server, however it can be used as a standalone. It provides functionality frequently needed in IoT applications such as dynamic configuration, events, persistence and basic telemetry, if needed.

- for newest information and documentation, see [UuBookKit](https://uuapp.plus4u.net/uu-bookkit-maing01/38c7532545984b3797c5719390b523a8/book/page?code=71150832)
- for quick start, see `examples/` folder inside this repository and *Getting started* in the aforementioned BookKit.

## Documentation

- the code is self-documented, meaning that documentation can be automatically generated from comments in the code and the code itself via Sphinx.
- the documentation needs to be generated first. To do this, first install [Sphinx](https://www.sphinx-doc.org/en/master/usage/installation.html) and then install the [ReadTheDocs theme](https://github.com/readthedocs/sphinx_rtd_theme) and ``cd docs && make html``. Documentation for users is located in ``docs`` and for developers in ``docs-dev``. The two differ mostly only in showing private class members (names starting with an underscore ``_``).
- see Sphinx documentation in `docs` and `docs-dev` for user and library-developer documentation respectively. After building, the HTML output is present in `build/html` subdirectories.

Example snippets are located in ``examples`` directory. Further examples can be found in applications built with ``uun-iot``, such as ``uun-weatherstation``, ``uun-guardman``, ``uun-livecam`` or ``uu-fvekit``.


## For developers
### Testing
- create virtual environment for all uun applications, if you want to test your local version of library, otherwise create separate environments for each application and the library
    - `python3 -m venv env`
    - `. env/bin/activate`
    - cd to library directory (directory where is setup.py)
    - `pip3 install -e .`
    - cd to application directory
    - `pip3 install -e .`
    - install pytest `pip3 install pytest`
    - reactivate environment `deactivate && . env/bin/activate`
- `cd` to main repository directory of the project you want to test and run `pytest`
- `pytest --log-cli-level=DEBUG` for additional information and with lib logger output
- testing involves
	- static phase - test basic observations that should hold about the structure of certain objects
	- dynamic phase - try modules' functionality: heartbeat and config updating
        - config updating can be turned on/off in `tests/conftest.py`, also be sure to introduce change in server configuration with respect to config file `tests/config.json`

## Versioning

- 0.#.#
	- initial releases changing rapidly

