Skip to main content

Python Tether agent

This module contains a Tether agent for Python.
It has been tested with Python 3.11 (the same version currently used by TouchDesigner)

Installation

pip install tether_agent

Usage

  • Create the Tether Agent instance
  • Connect
  • Create Inputs and/or Outputs
  • Define a message handler function if you expect to receive messages, and add it to each Input Plug
  • Call publish on the Output Plug each time you want to publish something (payload automatically encoded as messagepack)

Here is an example script that outputs an ever increasing digit every second and listens for it as well:

from time import sleep
from tether_agent import TetherAgent

def on_message(message):
    (topic, payload) = message
    print("*** Received from topic " + topic + ": " + str(payload))

agent = TetherAgent("test", "abc123")

in_plug = agent.create_input("test")
in_plug.add_listener(on_message)
out_plug = agent.create_output("test")

# Don't forget to connect!
agent.connect("127.0.0.1", 1883, "tether", "sp_ceB0ss!")

value = 0

while True:
    if agent.get_is_connected():
        sleep(1)
        out_plug.publish(None if value <= 0 else value)
        value += 1

Developer / packager notes

Create (if necessary) and activate a virtual environment for building/publishing, using pyenv and virtualenv:

pyenv virtualenv tether_build
pyenv activate tether_build

Upgrade (if necessary) Python Packaging build:

pip install --upgrade build

Actually build:

rm -rf dist
python -m build

Install Twine (distribution uploading):

pip install --upgrade twine

Upload to TEST pypi

python -m twine upload --repository testpypi dist/*

Upload to ACTUAL pypi

python -m twine upload dist/*

Install from TEST pypi

pip install install --index-url https://test.pypi.org/simple/ tether_agent
```tettether

Metadata

Release files for tether-agent 1.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 tether-agent 1.1.5
File Size Uploaded Provenance Actions
tether_agent-1.1.5.tar.gz 4.5 kB Without provenance Details for tether_agent-1.1.5.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tether-agent 1.1.5
File Interpreter ABI Platform Actions
tether_agent-1.1.5-py3-none-any.whl Python 3 none any Details for tether_agent-1.1.5-py3-none-any.whl

Total release size: 9.8 kB

Release files / tether_agent-1.1.5.tar.gz

Download URL tether_agent-1.1.5.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
76284cf4d6e7380b17bbd26694c417e8951e5a21e7ea3b85faea164ea06ac983
BLAKE2b-256 checksum
How to use checksums
2bc97ca86002adfd975a47375ec0db76d20ac4e1c2bd92091233ff7409ad58ac
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Release files / tether_agent-1.1.5-py3-none-any.whl

Download URL tether_agent-1.1.5-py3-none-any.whl
Size 5.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5c191955b77e0543e76284c5832aa747fcdd2a8ee24e47e7530b81770765ad2d
BLAKE2b-256 checksum
How to use checksums
0d09b6f0adaf8258b22d94e7b82d1240881ed5d53e74434aa1e1a3d905e257ae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.3

Security for tether-agent 1.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.

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