Skip to main content

Gridworks Proactor

Project description

Gridworks Proactor

PyPI Status Python Version License

Read the documentation at https://gridworks-proactor.readthedocs.io/ Tests Codecov

pre-commit Black

This packages provides "live actor" and "application monitored communication" infrastructure for the GridWorks SpaceHeat SCADA project. This separation allows the scada code to be more focussed on on application specific details and provides the potential to re-use the "live actor" and "application monitored" infrastructure.

Features

  • , a single threaded event loop running on asyncio, for exchanging messages between the main application object, "live actor" subobjects and MQTT clients.
  • A communication state ("active" or not) for each external communications link is available to the proactor and sub-objects. "Active" communications is defined as ALL of the following:
    • The underlying communications mechanism (MQTT) is connected.
    • All input channels of underlying mechanism (MQTT topics) are established.
    • A application messages requiring acknowledgement have been ACKed in timely fashion (by default 5 seconds).
    • A message has been received "recently" (by default within 1 minute).
  • Reliable delievery of "Events" generated locally. Generated Events are stored locally until they are acknowledged and unacknowledged Events are retransmitted when the "Active" communication state is restored.
  • , a test package for development and test environments of projects that implement a class derived from , allowing the derived class to be tested with the base-class tests.

Requirements

Testing requires an MQTT broker. This can be installed on a mac with:

brew install mosquitto
brew services restart mosquitto

Alternatively, the MQTT broker used by tests be controlled by .env file as described in .

Installation

You can install Gridworks Proactor via pip from PyPI:

$ pip install gridworks-proactor

Contributing

Contributions are very welcome. In order to develop, do this:

$ poetry install --all-extras

To learn more, see the Contributor Guide.

License

Distributed under the terms of the MIT license, Gridworks Proactor is free and open source software.

Issues

If you encounter any problems, please file an issue along with a detailed description.

Credits

This project was generated from @cjolowicz's Hypermodern Python Cookiecutter template.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gridworks_proactor-0.2.2.tar.gz (49.7 kB view details)

Uploaded Source

Built Distribution

gridworks_proactor-0.2.2-py3-none-any.whl (60.9 kB view details)

Uploaded Python 3

File details

Details for the file gridworks_proactor-0.2.2.tar.gz.

File metadata

  • Download URL: gridworks_proactor-0.2.2.tar.gz
  • Upload date:
  • Size: 49.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.11.4

File hashes

Hashes for gridworks_proactor-0.2.2.tar.gz
Algorithm Hash digest
SHA256 791435101e7d0a410ff1ca8eb1e5a2308c01c8bdaf3193744bef9908d6778e0d
MD5 306dfe2d696e068f05e25e97d9b63218
BLAKE2b-256 8d7caa164effaad27a83383c0162d00b7f51045f4e228a752d287a73016146a0

See more details on using hashes here.

File details

Details for the file gridworks_proactor-0.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for gridworks_proactor-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4ae3c9415671e44470e545e0479934c97d6721561648dc1f516ded5139630c39
MD5 f2fe8e9cf1aa3476cca749dda20f3984
BLAKE2b-256 d90e5e34cbc936126f3e37e122d1e0135106fa6216d6b3fd5da21805b792ef1b

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page