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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

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