Skip to main content

Tyko Client - Python SDK

Official Python SDK for Tyko Labs.

Track experiments, manage models, and version datasets with a simple, intuitive API.

Hierarchy

Tyko uses a three-level hierarchy to organize your ML work:

Project → Experiment → Run
  • Project: Top-level container for your ML project (e.g., "mnist-classifier")
  • Experiment: Groups related runs for comparison (e.g., "hyperparameter-search")
  • Run: A single training execution with parameters, metrics, and artifacts

Installation

Install via pip:

pip install tyko

Quick Start

from tyko import TykoClient

client = TykoClient()

# Simplest usage - just project name (uses "default" experiment)
# Environment info (Python version, CPU, GPU, etc.) is auto-captured
with client.start_run(project="my-ml-project") as run:
    run.params["learning_rate"] = 0.001
    run.params["batch_size"] = 32
    # ... your training code ...

# With params at creation time
with client.start_run(
    project="my-ml-project",
    experiment="hyperparameter-search",
    params={"learning_rate": 0.01, "batch_size": 64}
) as run:
    # Params are already set, can add more during the run
    run.params["epochs"] = 100
    # ... your training code ...

Environment Capture

Environment information is automatically captured when you start a run:

  • Python version
  • Operating system/platform
  • CPU count
  • RAM size (if psutil is installed)
  • GPU count and names (if torch is available)

You can also manually add environment details:

with client.start_run(project="ml-experiments") as run:
    # Add custom environment info
    run.environment["git_commit"] = "abc123"
    run.environment["cuda_version"] = "12.1"

To use the standalone function:

from tyko import capture_environment

env = capture_environment()
print(env)  # {'python_version': '3.12.1', 'platform': 'Linux-...', ...}

Metric Logging

Log metrics during training using run.log():

with client.start_run(project="image-classifier") as run:
    run.params["learning_rate"] = 0.001
    run.params["batch_size"] = 32

    for epoch in range(100):
        train_loss = train_epoch()       # your training step
        val_loss, val_acc = evaluate()   # your eval step

        # Log multiple metrics at once
        run.log({
            "train/loss": train_loss,
            "eval/loss": val_loss,
            "eval/accuracy": val_acc,
            "epoch": epoch,
        })

Metric Naming Conventions

Use prefixes with slashes for grouped visualization in the dashboard:

Pattern Example Dashboard Grouping
prefix/metric train/loss, train/accuracy Grouped under "train"
prefix/metric eval/loss, eval/accuracy Grouped under "eval"
Plain name epoch, step Ungrouped

This allows the dashboard to organize metrics into logical groups automatically.

Configuration

API Key

Set your API key via environment variable (recommended):

export TYKO_API_KEY="your-api-key"

Or pass it explicitly:

client = TykoClient(api_key="your-api-key")

If the server has anonymous signup enabled (ANONYMOUS_SIGNUP=on, the default), no API key is needed. Anonymous use is limited, and unclaimed data is deleted 30 days after the last write:

client = TykoClient(api_url="https://your-server.com")

Server URL

For self-hosted deployments, set the server URL:

export TYKO_API_URL="https://your-server.com"

Or:

client = TykoClient(api_url="https://your-server.com")

Development

Prerequisites

  • Python 3.11+
  • uv package manager

Setup

cd packages/tyko-client
uv sync

Testing

moon run tyko-client:test

Linting

# Check code style
moon run tyko-client:ruff

# Format code
moon run tyko-client:black

# Type checking
moon run tyko-client:mypy

# All three
moon run tyko-client:lint

Building

moon run tyko-client:build

Metadata

Release files for tyko 0.1.61

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

Source distribution (sdist)

Source distribution for tyko 0.1.61
File Size Uploaded Provenance Actions
tyko-0.1.61.tar.gz 73.9 kB Without provenance Details for tyko-0.1.61.tar.gz

Built distribution (wheel)

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

Total release size: 124.0 kB

Release files / tyko-0.1.61.tar.gz

Download URL tyko-0.1.61.tar.gz
Size 73.9 kB
Tags Source
SHA-256 checksum
How to use checksums
e075ca1c9f8d31ab238e6d88cbcfe8832bb9c6fda1fb1b4ca7212ae8a9b2cf7b
BLAKE2b-256 checksum
How to use checksums
d58b8ddac78e40487e1f4670c112a9489979898a53a6bb4aae0fff952f82c907
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.2 {"ci":true,"cpu":"x86_64","distro":{"id":"bookworm","libc":{"lib":"glibc","version":"2.36"},"name":"Debian GNU/Linux","version":"12"},"implementation":{"name":"CPython","version":"3.14.10"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.9 29 Sep 2026","python":"3.14.10","system":{"name":"Linux","release":"6.12.113+"}} HTTPX2/2.16.0

Release files / tyko-0.1.61-py3-none-any.whl

Download URL tyko-0.1.61-py3-none-any.whl
Size 50.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5e50659aac91abfde7b66a8abd8e86a51f088cb298941dd057212c1694d11666
BLAKE2b-256 checksum
How to use checksums
37db228b1ac6d490d52c9025c3d947336fa43b8eac108c6ff16732441c666f41
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Hatch/1.18.2 {"ci":true,"cpu":"x86_64","distro":{"id":"bookworm","libc":{"lib":"glibc","version":"2.36"},"name":"Debian GNU/Linux","version":"12"},"implementation":{"name":"CPython","version":"3.14.10"},"installer":{"name":"hatch","version":"1.18.2"},"openssl_version":"OpenSSL 3.5.9 29 Sep 2026","python":"3.14.10","system":{"name":"Linux","release":"6.12.113+"}} HTTPX2/2.16.0

Security for tyko 0.1.61

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.

Release history Release notifications | RSS feed

This release

0.1.61 This release

2 release files No provenance

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