Skip to main content

TUIO for Python3

TUIO protokoll implementation based on OSC protocol. It is implemented with the python-osc libary.

TUIO spezification

http://www.tuio.org/?specification

OSC spezification

http://opensoundcontrol.org/spec-1_0 and https://python-osc.readthedocs.io/en/latest/

API example of C++

https://www.tuio.org/?cpp

Installation

pip3 install python-tuio

Usage

Server example with Cursor

    from pythontuio import TuioServer
    from pythontuio import Cursor

    server = TuioServer()
    cursor = Cursor(123) # sets session_id to 123

    cursor.velocity             = (0.2,0.1)
    cursor.motion_acceleration  = 0.1 

    server.cursors.append(cursor)
    i = 0
    while i < 10:
        i+=1
        cursor.position = (0.5+0.01*i,0.5)

        server.send_bundle()
        time.sleep(0.1)

Client example with class and extends

    from pythontuio import TuioClient
    from pythontuio import Cursor
    from pythontuio import TuioListener
    from threading import Thread

    class MyListener(TuioListener):
        def add_tuio_cursor(self, cursor: Cursor):
            print("detect a new Cursor")
        (...)


    client = TuioClient(("localhost",3333))
    t = Thread(target=client.start)
    listener = MyListener()
    client.add_listener(listener)

    t.start()

Client example with lamda

    from pythontuio import TuioClient
    from pythontuio import Cursor
    from pythontuio import TuioListener
    from threading import Thread

    def _add_tuio_cursor(self, cursor: Cursor):
        print("detect a new Cursor")
    (...)


    client = TuioClient(("localhost",3333))
    t = Thread(target=client.start)
    listener = TuioListener()
    listener.add_tuio_cursor = _add_tuio_cursor
    client.add_listener(listener)

    t.start()

Contribution

Feel free to contribute inputs. Just start a MR with your changes.

GitHub

Metadata

Release files for python-tuio 0.0.9

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

Source distribution (sdist)

Source distribution for python-tuio 0.0.9
File Size Uploaded Provenance Actions
python-tuio-0.0.9.tar.gz 5.7 kB Without provenance Details for python-tuio-0.0.9.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for python-tuio 0.0.9
File Interpreter ABI Platform Actions
python_tuio-0.0.9-py3-none-any.whl Python 3 none any Details for python_tuio-0.0.9-py3-none-any.whl

Total release size: 13.6 kB

Release files / python-tuio-0.0.9.tar.gz

Download URL python-tuio-0.0.9.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
12eeb9e62010d7b8db0baa6ea6cb23ca3e944963ae358994d8db7e3ceb24b97e
BLAKE2b-256 checksum
How to use checksums
2c83e963489c6de2bfb31cf78982c3bee216ba105de4ef52f4e70d843fe0079c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

Release files / python_tuio-0.0.9-py3-none-any.whl

Download URL python_tuio-0.0.9-py3-none-any.whl
Size 7.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
886a648a8d75e94ad68e8cb3baf1d956ed11d4080c0790dfc78679d0f363b390
BLAKE2b-256 checksum
How to use checksums
554b5b719b39c5f26ab0df56b6215c6e82a05b6655d5ed3c9b7c710ecff031ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/53.0.0 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.7.9

Security for python-tuio 0.0.9

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