Skip to main content

TokTagger

TokTagger Logo

An open source, interactive annotation platform for Tokamak diagnostic data.

Workflow: CI Workflow: Dependabot License: MIT Linting: ruff Testing: pytest

What It Does

TokTagger is a web-based platform for curating labeled datasets from tokamak diagnostics. It lets users browse shots, inspect signals and images, apply consistent labels, and manage annotations in one place. The Python API and React UI support local or team workflows, making it straightforward to create datasets for downstream analysis and machine-learning models.

It currently supports the following features:

  • Data Browsing: Explore tokamak shots, signals, and images through an intuitive interface.
  • Annotation Tools: Apply consistent labels to signals and images using a customizable tagging system.
  • ML Models: Train and infer from ML models within the UI.
  • Dataset Management: Organize and manage annotations in a central repository.
  • Multi-User Support: Role-based access control with per-project membership, suitable for team annotation workflows.
  • Extensible API: A Python API for integrating with existing workflows and tools.

Installation

To run the application locally:

Install via pip

To install the package via pip (or similarly via Poetry or uv package managers):

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

To install the package for labelling only (without ML Model functionality):

pip install toktagger

Or to include the ML models:

pip install toktagger[models]

If you intend to add custom data loaders or models to your TokTagger instance, this is the recommended route.

Install as a uv tool

Alternatively, it can be installed as a tool using uv. To install the package for labelling only (without ML Model functionality):

uv tool install --python 3.12.6 toktagger

Or to include the ML models:

uv tool install --python 3.12.6 toktagger[models]

Quick Start

To start a local single-user instance:

toktagger

This starts a single-process instance at http://localhost:8002. On the first start, TokTagger creates a local identity provider and prints the user name and the password of the first administrator to the terminal. See User Management.

Options

Flag Default Description
--workers N 1 Number of uvicorn worker processes
--host HOST localhost Host to bind to
--port PORT 8002 Port to listen on
--no-browser off Suppress automatic browser launch
--reload off Auto-reload on code changes (single-worker dev mode only)

Development Mode

For local development with automatic reload on code changes, use a single worker:

toktagger --workers 1 --reload

Multi-User / Team Deployment

For server deployments, run with multiple workers and disable the automatic browser launch. Multiple workers operate on Linux, macOS and Windows:

toktagger --workers 4 --no-browser

The default host is localhost. Only the local machine can connect to it. To let other users on the network connect, add --host 0.0.0.0.

Or directly via uvicorn (use python -m uvicorn to make sure that the correct virtual environment is used):

python -m uvicorn toktagger.api.asgi:app --workers 4 --host 0.0.0.0 --port 8002

docker-compose.yml is the production stack. It runs TokTagger with Keycloak, MongoDB and a Caddy proxy that handles TLS. See the Deployment guide.

See the User Management guide for creating accounts, assigning roles, and managing project membership.

Metadata

Release files for toktagger 0.4.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 toktagger 0.4.0
File Size Uploaded Provenance Actions
toktagger-0.4.0.tar.gz 2.5 MB With provenance Details for toktagger-0.4.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for toktagger 0.4.0
File Interpreter ABI Platform Actions
toktagger-0.4.0-py3-none-any.whl Python 3 none any Details for toktagger-0.4.0-py3-none-any.whl

Total release size: 5.0 MB

Release files / toktagger-0.4.0.tar.gz

Download URL toktagger-0.4.0.tar.gz
Size 2.5 MB
Tags Source
SHA-256 checksum
How to use checksums
59ea79a52b3831443a94755cfcf27028d66b8e51ea031a20764de3297ccac4f7
BLAKE2b-256 checksum
How to use checksums
f1d2331e541a0fffd1095c2007eb2565fb51618ca070fc7b16d6983bb2635910
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 27, 2026.

Transparency log

Release files / toktagger-0.4.0-py3-none-any.whl

Download URL toktagger-0.4.0-py3-none-any.whl
Size 2.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
550b420a3920cc6589b409e75b380ca78eecc2cf4407d9ddd833b1f02a86d674
BLAKE2b-256 checksum
How to use checksums
8c05cf2b17bbf7eff27ba4adb0c176c940807d389585c4c6e7525e625e5690e2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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 Oct 27, 2026.

Transparency log

Security for toktagger 0.4.0

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for toktagger-0.4.0.tar.gz

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 Oct 27, 2026.

Transparency log

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