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, uid):
	# @payload {JSON|String|Buffer} payload
	# @uid {Number} message identifier (optional)
	print("--->", payload, uid)

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

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

# 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}
# @socket_path {String} path to the socket (optional)
Total5.listen("json", "/tmp/total.sock")

Python on MacOS:

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

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.1.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.1-py3-none-any.whl (3.1 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: total5-0.0.1.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.1.tar.gz
Algorithm Hash digest
SHA256 986bbc14e1ba6e1554d1cd83cb47bf62c8dac197e1dda510773368c1f204d981
MD5 11c59fa278a51f0b3e9ef616709630a9
BLAKE2b-256 e9b4900fc050cb203a75e5a7160db8741632bf10dfc05affc9ca29f4dcfe591f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: total5-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.1 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 abc677a891eda82e2e235ebdb7a22d155ff2fcc313063ec8000f17107f8f8249
MD5 2d9df16f4f81591cd84225ae6b9a112d
BLAKE2b-256 78956429f4cc0728f4ca0263ca9a0e12c1c40ddad308fb310d7faa49fb92e32d

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