Skip to main content

visitoolkit_eventsystem

minimalistic event system

Installation via pip
https://pypi.org/project/visitoolkit-eventsystem
(runs on Python 3)

description

Registered handlers (a bag of handlers) getting called when event gets fired
using ideas from "axel events" https://github.com/axel-events/axel
and "event system" from http://www.valuedlessons.com/2008/04/events-in-python.html

usage

from visitoolkit_eventsystem import eventsystem

# handlers are callback functions in your code,
# when firing an event visitoolkit_eventsystem will call them with the given argument(s)
def cb1(event_id, *arg, **args):
    if event_id > 0:
        # handle event...
        return True
    else:
        return False

# Default is synchronous execution of handlers (blocking main thread, collecting all results)
# sync_mode=False means asynchronous execution of handlers (one background thread calls all handlers) 
# =>Details about flag "exc_info"(default is True): https://docs.python.org/3/library/sys.html#sys.exc_info
# =>Flag "traceback" (default is False) controls verbosity of error_info when an exception occurred
es = eventsystem.EventSystem(sync_mode=True)

# adding or removing handlers in list-like syntax
es += cb1

#The execution result is returned as a list containing all results per handler having this structure:
#  exec_result = [
#      (True, result, handler),        # on success
#      (False, error_info, handler),   # on error
#      (None, None, handler), ...      # asynchronous execution
#  ]

# firing event
result = es(42)

Increasing logging level for bughunting:

import logging
logging.getLogger('visitoolkit_eventsystem').setLevel(logging.DEBUG)

background information

visitoolkit_eventsystem is used in visitoolkit_connector as core part of visitoolkit.

visitoolkit is written for the proprietary Building and Process Management System 'ProMoS NT' (c) MST Systemtechnik AG'
(also known as 'Saia Visi.Plus' (c) Saia-Burgess Controls AG)

Intention:
Support creator of visualisation projects...
Add efficiency...
Reduce manual error-prone processes...
Add missing features...

Disclaimer: Use 'visitoolkit' at your own risk!

Metadata

Release files for visitoolkit-eventsystem 0.1.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for visitoolkit-eventsystem 0.1.5
File Size Uploaded Provenance Actions
visitoolkit-eventsystem-0.1.5.tar.gz 22.6 kB Without provenance Details for visitoolkit-eventsystem-0.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for visitoolkit-eventsystem 0.1.5
File Interpreter ABI Platform Actions
visitoolkit_eventsystem-0.1.5-py3-none-any.whl Python 3 none any Details for visitoolkit_eventsystem-0.1.5-py3-none-any.whl

Total release size: 29.7 kB

Release files / visitoolkit-eventsystem-0.1.5.tar.gz

Download URL visitoolkit-eventsystem-0.1.5.tar.gz
Size 22.6 kB
Tags Source
SHA-256 checksum
How to use checksums
f3842a32cfc6e42c99f3bc5723e30b1ac605e462a2d94ebcd3582108d39f017c
BLAKE2b-256 checksum
How to use checksums
8a402b126caa647c5f5e5397a3e84410d9596c3c1ca801987f735c2adb9bdb25
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

Release files / visitoolkit_eventsystem-0.1.5-py3-none-any.whl

Download URL visitoolkit_eventsystem-0.1.5-py3-none-any.whl
Size 7.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
bcf8d7f038ab418a539ffb8d50bfc1c9661195c450b6eb11f584cc3d7a91e7c4
BLAKE2b-256 checksum
How to use checksums
95502961f8e80c22613db2cadfbe47da9e85871532753ce4ca00d874019893a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.26.0 CPython/3.6.5

Security for visitoolkit-eventsystem 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.5 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page