A Python library for the TrueConf Room API
Project description
python-trueconf-room
Python library for the TrueConf Room API
English / Русский / Deutsch / Español
TrueConf Room — a software terminal for meeting rooms and conference halls of any size. It is installed on PCs running Windows or Linux OS, and provides a convenient control interface via a web interface or smartphone and tablet application based on Android. For more details, see the documentation for TrueConf Room.
This library currently supports API v1 only. Support for API v2 will be added in a future update.
🚀 How to use python-trueconf-room
-
Download and install TrueConf Room using the direct link.
-
Launch TrueConf Room with the
--pinparameter:Windows:
"C:\Program Files\TrueConf\Room\TrueConfRoom.exe" --pin some_pin
Linux:
trueconf-room --pin some_pin
-
You can now connect to TrueConf Room using the following example:
import trueconf_room from trueconf_room.methods import Methods from trueconf_room.consts import EVENT, METHOD_RESPONSE import trueconf_room.consts as C room = trueconf_room.open_session(ip = "127.0.0.1", port = 80, pin = "some_pin") methods = Methods(room) @room.handler(EVENT[C.EV_appStateChanged]) def on_state_change(response): print(f' Application state is {response["appState"]}') # Need to login if (response["appState"] == 2): methods.login("john_doe@video.example.com", "my_very_strong_password") if __name__ == '__main__': # Try to connect to TrueConf Server methods.connectToServer("video.example.com") room.run()
🧩 Library overview
python-trueconf-room is a Python library for controlling TrueConf Room via the TrueConf Room API. Communication is organized around a “command → response” workflow, plus events that are delivered automatically when the application state changes. Data is exchanged over WebSocket in JSON format, but you don’t need to manually assemble or parse JSON payloads—the library handles that for you.
📦 Module imports
In most cases, four imports are sufficient:
import trueconf_room
from trueconf_room.methods import Methods
from trueconf_room.consts import EVENT, METHOD_RESPONSE
import trueconf_room.consts as C
-
trueconf_roomis the main module. It is used to create a session (open_session), register handlers (handler), and start the incoming message loop (run). -
Methodsis a class that exposes TrueConf Room API commands as Python methods. It provides a convenient abstraction that lets you call commands by name without manually preparing requests. -
EVENTandMETHOD_RESPONSEare input notification types used when registering handlers:EVENT— asynchronous events (e.g., incoming call, application state change, etc.),METHOD_RESPONSE— responses to commands you invoked viamethods.
-
import trueconf_room.consts as Cimports all constants under the short aliasC. This keeps the code readable: instead of long constant paths, you writeC.EV_...andC.M_..., making it immediately clear that these are API event or method identifiers.
🔌 Creating a session and objects
Work begins by creating the room object. This is an active session that maintains a connection to TrueConf Room and receives all incoming messages:
room = trueconf_room.open_session(ip="127.0.0.1", port=80, pin="some_pin")
Next, create the methods object. It uses the existing room session to send commands to the TrueConf Room API:
methods = Methods(room)
🪝 Handlers
TrueConf Room continuously sends notifications—either responses to your commands or events that occur independently. To avoid manually processing the entire stream, the library provides handlers.
A handler is a regular function that the library calls automatically when a matching event or response arrives. Handlers are registered via the @room.handler(...) decorator.
Key rules:
- For events, use
EVENT[...]withC.EV_...constants. - For command responses, use
METHOD_RESPONSE[...]withC.M_...constants.
Example: handling an application state change and an incoming call:
@room.handler(EVENT[C.EV_appStateChanged])
@room.handler(METHOD_RESPONSE[C.M_getAppState])
def on_state_change(response):
print(response["appState"])
@room.handler(EVENT[C.EV_inviteReceived])
def on_invite(response):
print("Incoming call from:", response["peerId"])
methods.accept()
A handler function always takes a single
responseargument—this is already-parsed JSON represented as a Python dictionary.
⚡️ Calling commands
Commands are invoked through the methods object. Method names match the original TrueConf Room API command names, so mapping from the documentation is straightforward: find a command in the API docs and call the method with the same name in Methods.
Example command call:
methods.getHardware()
The response will arrive as a separate notification. To process it, register a handler for METHOD_RESPONSE[C.M_getHardware].
🏃♂️ Starting the message loop
After registering handlers and (optionally) sending initial commands, start the processing loop:
room.run()
run() keeps the session active and allows the library to receive responses and events until the connection is closed.
📚 Documentation
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file python_trueconf_room-1.0.0.tar.gz.
File metadata
- Download URL: python_trueconf_room-1.0.0.tar.gz
- Upload date:
- Size: 1.1 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
848a148dd617bbf98bbc71a1b4026936432e9c1a8fb6f9baa73400dcb2c8a94a
|
|
| MD5 |
b97366285f92f3417441b7479c5a3ccc
|
|
| BLAKE2b-256 |
133bcf96e16db78a1c0def47eb988d7b24e1da007705a986bdee3e43a631ee6d
|
Provenance
The following attestation bundles were made for python_trueconf_room-1.0.0.tar.gz:
Publisher:
release.yml on TrueConf/python-trueconf-room
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_trueconf_room-1.0.0.tar.gz -
Subject digest:
848a148dd617bbf98bbc71a1b4026936432e9c1a8fb6f9baa73400dcb2c8a94a - Sigstore transparency entry: 779134384
- Sigstore integration time:
-
Permalink:
TrueConf/python-trueconf-room@5a4583f11c5a2331b84eb44d39d5ab49d6f9c562 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/TrueConf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a4583f11c5a2331b84eb44d39d5ab49d6f9c562 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file python_trueconf_room-1.0.0-py3-none-any.whl.
File metadata
- Download URL: python_trueconf_room-1.0.0-py3-none-any.whl
- Upload date:
- Size: 28.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
42936fef261fc04e4e60e53d6d896d8fe4a4e4c7b86e7f6e50bb7143bb4695d2
|
|
| MD5 |
209b9a8c6fae3b5c8a1cecb4e548e26a
|
|
| BLAKE2b-256 |
9946f856426b8d161ef94d1f342083bc1131942b51cf66ba8173d286a8950a1d
|
Provenance
The following attestation bundles were made for python_trueconf_room-1.0.0-py3-none-any.whl:
Publisher:
release.yml on TrueConf/python-trueconf-room
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
python_trueconf_room-1.0.0-py3-none-any.whl -
Subject digest:
42936fef261fc04e4e60e53d6d896d8fe4a4e4c7b86e7f6e50bb7143bb4695d2 - Sigstore transparency entry: 779134388
- Sigstore integration time:
-
Permalink:
TrueConf/python-trueconf-room@5a4583f11c5a2331b84eb44d39d5ab49d6f9c562 -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/TrueConf
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5a4583f11c5a2331b84eb44d39d5ab49d6f9c562 -
Trigger Event:
workflow_dispatch
-
Statement type: