semvec/pypi-packages huggingface dataset:
pyblue 2022.8.1
PyBlue
License: MIT

Welcome to PyBlue
-----------------

A simple static site generator.

Why another one? There are `many static <https://www.staticgen.com/>`__
site generators already. I found most to be way too complicated, too
many conventions and rules: put this here or there, call it this or
that. It was too tiring to keep up.

PyBlue is different. Everything is optional, nothing is required, use
only what you need. It basically stays out of the way.

Simple things are very easy:

-  No configuration required.
-  Works with any existing site.
-  Easy to include ``markdown``.
-  Easy linking to other pages.
-  Tiny codebase, pyblue is around 500 lines in a single file!

Complicated tasks are easy:

-  PyBlue generates the correct links even if you move pages around.
-  Use `Django
   Templates <https://docs.djangoproject.com/en/1.9/ref/templates/language/>`__
   and all the features that it offers.
-  Easily add data into each page (title, link name, or any arbitrary
   content).

And you can go all the way out if you really want to:

-  Load python modules into each page.
-  Exposed data: database queries, results of online requests etc.
-  Run python code, access and modify data from inside of each page.
-  Extend the Django templates. Add your own ``templatetags``.

Documentation
~~~~~~~~~~~~~

-  The `PyBlue
   Documentation <https://ialbert.github.io/pyblue-central/>`__ was
   generated with PyBlue itself.

You can also browse the `help in source
format <https://github.com/ialbert/pyblue-central/tree/master/docs>`__
for examples.

Install
~~~~~~~

::

    pip install pyblue --upgrade

Or download it from the `PyBlue at
PyPI <https://pypi.python.org/pypi/pyblue/>`__.

Usage
~~~~~

Launch pyblue to serve a directory

::

    pyblue -r docs

View your site by visiting http:://localhost:8080

Edit your pages and make changes. Reload the page to see your edits
live. Generate static output with:

::

    pyblue -r docs -o html

That's all. Told you it was simple. To see extra help on options run:

::

    pyblue -h

Licensing
~~~~~~~~~

-  PyBlue is being developed by Istvan Albert see
   https://github.com/ialbert
-  PyBlue has been inspired by
   `PyGreen <https://github.com/nicolas-van/pygreen>`__ created by
   Nicolas Vanhoren see https://github.com/nicolas-van
-  PyBlue uses the `MIT
   license <https://github.com/ialbert/pyblue/blob/master/LICENSE.txt>`__.
hamqtt-fs-publisher 0.1.3
Publish file content as MQTT topic compatible with HomeAssistant.
License: MIT
Requires Python: >=3.8,<4.0

[![build](https://github.com/MarekPikula/homeassistant-mqtt-filesystem-publisher/workflows/build/badge.svg)](https://github.com/MarekPikula/homeassistant-mqtt-filesystem-publisher/actions?query=workflow%3Abuild+branch%3Amain)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hamqtt-fs_publisher.svg)](https://pypi.org/project/hamqtt-fs_publisher)

# HomeAssistant MQTT filesystem publisher

Publish file content as an MQTT topic compatible with HomeAssistant.

It can be useful, e.g., to publish system metrics from `/sys`.

## Quick start

1. Install the Python package: `pip install hamqtt-fs-publisher`. If you want to
   have support for YAML configuration format install with `ruamel` or `pyyaml`
   extras depending on the YAML library of choice (recommended `ruamel`, e.g.,
   `pip install hamqtt-fs-publisher[ruamel]`).
2. Create a configuration (example in `examples/config.example.yaml`). It can be
   in either YAML or JSON format. There is a pre-generated JSON schema in
   `hamqtt_fs_publisher/configuration.schema.json`, which can be used, e.g.,
   with VS Code (the current repository is pre-configured for `config.json` and
   `config.yaml`). Remember to set proper authorization details for the MQTT
   broker. If you are using the standard Mosquitto broker add-on in Home
   Assistant, please refer to the [official
   documentation](https://github.com/home-assistant/addons/blob/master/mosquitto/DOCS.md).
3. Run `hamqtt_fs_publisher --config <config_file_name>`.

> **Note:** The configuration file path could be either a relative/absolute
> path, or a file under `/etc/hamqtt_fs_publisher` or
> `~/.config/hamqtt_fs_publisher`.

## Systemd service

If you want to run this script as a systemd service you could copy the example
service file from `examples/hamqtt_fs_publisher@.service` to either
`/etc/systemd/system/` or `~/.config/systemd/user/` (if you want to run it in
user mode). Then copy the configuration file to one of the standard
configuration directories (i.e., `/etc/hamqtt_fs_publisher` or
`~/.config/hamqtt_fs_publisher`.)

To enable and start the unit in system mode run:

```shell
$ systemd daemon-reload
$ systemd enable --now hamqtt_fs_publisher@<config_file_name>
```

## Supported features

- Auto-discovery in HomeAssistant.
- Configuration with a simple YAML/JSON file.
- Possibility to create read-only sensor device entities with values taken
  from a file and published to the MQTT broker periodically with set intervals.

## TODO

- Add a logger to connect/disconnect events.
- Add an option to read a value on a button push in GUI (not only periodically).
- Add a switch endpoint (i.e., a file writer).
- Add a generic writer endpoint.