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.0.tar.gz (50.9 kB view details)

Uploaded Source

Built Distribution

gridworks_proactor-0.2.0-py3-none-any.whl (62.4 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for gridworks_proactor-0.2.0.tar.gz
Algorithm Hash digest
SHA256 cfcf2a0d621ddf322985202d6d0394dacb8b4a3957fbf1ce4ee9d6182a832a71
MD5 0eb0e65c22dc514ee4a53e0342141b70
BLAKE2b-256 6dd8655c9d5c3fce76dfff63f1f3f6f53964073d85c8d660a2c2de55b8a44ccc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for gridworks_proactor-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0c524321a444682f022893168dc30885ee6d95004fe001e757acd0e2423a1c14
MD5 6247d956369beecc8c0c851b97d7e2d1
BLAKE2b-256 075ebd6008bc68c0586719837f5aefed39f8a92f3994a0edf02dd5ed42d93605

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