Skip to main content

Total.js v5 integration (Pypeline) with Python

Project description

Total.js integration

The Total.js Python library provides a predefined integration between the Total.js framework (Pypelines) and Python scripts.

import Total5
import sys

@Total5.on('data')
def data(payload):
	# @payload {JSON|String|Buffer} payload
	print("--->", payload)

@Total5.on('open')
def open():
	# Total.js is connected

@Total5.on('close')
def close():
	# Total.js is disconnected

@Total5.on('error')
def error(err):
	# Unexpected error
	print("ERROR", err)

# Total5.send(payload, [uid]);
# @payload {JSON|String|Buffer} payload
# @uid {Number} message identifier (optional)
# IMPORTANT: This method must be performed while Total.js is connected.
Total5.send({ "name": "Hello world!"})

# Total.listen(type, socket_path)
# @type {json|text|buffer} default "json"
# @socket_path {String} path to the socket (optional)
Total5.listen()

Python on MacOS:

python3 -m venv .venv
source .venv/bin/activate

Release package

Preinstallation:

pip install build
pip install twine
rm -rf dist/ build/ total.egg-info
python3 -m build
twine upload dist/*

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

total5-0.0.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

total5-0.0.2-py3-none-any.whl (3.2 kB view details)

Uploaded Python 3

File details

Details for the file total5-0.0.2.tar.gz.

File metadata

  • Download URL: total5-0.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for total5-0.0.2.tar.gz
Algorithm Hash digest
SHA256 80fba1dee058f5170b788c0324e3e4789b5980a8a70badd69bc7b83bd929b59e
MD5 088344e0972399bef306cf61e204d661
BLAKE2b-256 b5c929eca4cefb4c025150c27e6a60d9a86ebae706cae8f1096f1b30c55bd5dc

See more details on using hashes here.

File details

Details for the file total5-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: total5-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.3

File hashes

Hashes for total5-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 bada5a8274018c7799f2915e5b45657977a87ad89a0730ce863a5a782743d81e
MD5 62eba8fc5e8a73122d5f999765f2053b
BLAKE2b-256 5d18326f0c142a0931e9df814c9513f55615fb09ec199466b2659fe498b5c757

See more details on using hashes here.

Supported by

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