Skip to main content

trueconf

trueconf-eraser

A CLI utility that finds and stops stale conferences on TrueConf Server

PyPI Downloads

English / Русский

It scans all active conferences and terminates the ones that match the configured criteria:

  • the conference has been running longer than allowed;
  • the number of registered users and/or guests does not exceed the configured limits.

📋 How it works

  1. Fetches all active conferences (state=running).
  2. Determines the session start time from /sessions; if it is unavailable, falls back to the conference created_at (or start_time).
  3. For every conference, checks the elapsed time and the participants.
  4. Logs what is being stopped and why. With --dry-run nothing is actually stopped.

💻 Requirements

  • Operating system: Linux, macOS or Windows.
  • TrueConf Server with the API v4.
  • An OAuth 2.0 application with the required permissions (see below).
  • HTTPS access to the server's /api/v4.

⚙️ Setting up TrueConf Server

Before the first run, create an OAuth 2.0 application on the server and grant it the following permissions:

  • conferences:read
  • conferences:write
  • conferences.participants:read
  • conferences.sessions:read

See the TrueConf Server API documentation for details.

📦 Installation

With pip:

pip install trueconf-eraser

or with uv:

uv tool install trueconf-eraser

🛠 Usage

The tool ships two equivalent commands that do exactly the same thing:

  • tc-erase — the primary command;
  • tc-clean — a short alias.

Parameters

Parameter Short Description Required
--host -h TrueConf Server host, e.g. host.example.com (https:// is added automatically) or a full HTTPS URL yes
--client-id -id OAuth 2.0 application ID yes
--client-secret -s OAuth 2.0 application secret yes
--max-users -u Max registered server users in a conference yes
--max-guests -g Max guest participants in a conference yes
--max-session-duration -d Max session duration in seconds yes
--dry-run Simulate the run without stopping anything no
--verbose Verbose output with debug information no
--no-verify-ssl Disable TLS certificate verification no
--lang -l Output language: en or ru (default: en) no

Certificate verification

TLS certificate verification is enabled by default (the bundled CA store is used).

  • Public certificate (e.g. Let's Encrypt) — works out of the box, no extra flags needed.
  • Self-signed certificate — not present in the default trust store, so verification fails. To use one, pass --no-verify-ssl; note that this disables TLS certificate verification entirely and exposes the connection to MITM attacks, so use it only on trusted networks.

Stop criteria

A conference is stopped when BOTH conditions are met:

  1. Its duration exceeds --max-session-duration.
  2. One of the participant conditions holds:
    • only registered server users and their count is ≤ --max-users;
    • only guests and their count is ≤ --max-guests;
    • both groups: registered users ≤ --max-users AND guests ≤ --max-guests.

Examples

Dry run (recommended before the real run) — 1 or fewer registered users, 15 or fewer guests, sessions older than one hour:

# Dry run: shows what would be stopped, but does not stop anything
tc-erase --host host.example.com --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET \
  --max-session-duration 3600 --max-users 1 --max-guests 15 --dry-run

Stop conferences with the same criteria:

# Real run: actually stops the conferences that match the criteria
tc-erase --host host.example.com --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET \
  --max-session-duration 3600 --max-users 1 --max-guests 15

Short flags:

# The same command using short flags (-h, -id, -s, -d, -u, -g)
tc-erase -h host.example.com -id YOUR_CLIENT_ID -s YOUR_CLIENT_SECRET \
  -d 3600 -u 1 -g 15

Output in Russian:

# Force the Russian output with --lang ru
tc-erase --host host.example.com --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET \
  --max-session-duration 3600 --max-users 1 --max-guests 15 --lang ru

An unsupported language falls back to English:

# Unsupported language code: the output automatically falls back to English
tc-erase --lang fr --host host.example.com --client-id YOUR_CLIENT_ID --client-secret YOUR_CLIENT_SECRET \
  --max-session-duration 3600 --max-users 1 --max-guests 15

🌍 Localization

Supported languages: en (default) and ru. If an unsupported language code is passed to --lang, the output falls back to English.

To add a new language:

  1. Create app/locales/<code>.yml (see en.yml and ru.yml for the structure).
  2. Add the code to SUPPORTED_LANGS in app/localization.py.

🩺 Troubleshooting

Problem Solution
Authentication error Check --client-id and --client-secret; make sure the application has the required permissions
TLS/SSL certificate error Only for self-signed certificates: add --no-verify-ssl
No session times available The tool automatically falls back to the conference created_at/start_time
“No active conferences.” Nothing to clean up right now — that is fine

Metadata

Release files for trueconf-eraser 1.0.0

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

Source distribution (sdist)

Source distribution for trueconf-eraser 1.0.0
File Size Uploaded
trueconf_eraser-1.0.0.tar.gz 256.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for trueconf-eraser 1.0.0
File Interpreter ABI Platform
trueconf_eraser-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 269.2 kB

Release files / trueconf_eraser-1.0.0.tar.gz

Download URL trueconf_eraser-1.0.0.tar.gz
Size 256.6 kB
Tags Source
SHA-256 checksum
How to use checksums
236160b55ebea52939814e1c6516284189fe1e474f05faa19f3db852446548b7
BLAKE2b-256 checksum
How to use checksums
ea1333bcbcecfff15cc49f4b3587b4772eada61a70f11205e7219d6de3de4009
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release files / trueconf_eraser-1.0.0-py3-none-any.whl

Download URL trueconf_eraser-1.0.0-py3-none-any.whl
Size 12.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d4acbc5ad269b4b321fcab7a646f93c89d5345f4dd1ad0c023f2f91dbd529623
BLAKE2b-256 checksum
How to use checksums
d52e67672f1e58dc5e841a13717f7a8e0de4bc4fbd8cb3aefe6d1d8ede746930
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 16, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

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