Skip to main content

3lc-compute-plugin-sdk

PyPI Docs Try it

Plugins are how you extend the 3LC Hub — your own importers, exporters, training jobs, and data tools, appearing in the Hub right next to the built-ins. This SDK is everything a plugin needs: one small Python package to program against, while the Hub takes care of discovery, isolation, serving, and job orchestration.

pip install 3lc-compute-plugin-sdk          # import name: tlc_plugin_sdk

Distribution 3lc-compute-plugin-sdk · import tlc_plugin_sdk.

What it gives you

  • ComputePlugin — the base class you subclass. Implement get_ui_fragment (and compute if you expose a synchronous endpoint); job and lifecycle hooks ship as safe defaults. There is no register() to call — a plugin's metadata lives in its plugin.toml manifest (or a [tool.tlc-compute] table in pyproject.toml), and the Hub discovers it from there.
  • JobContext — the surface a long-running job programs against: progress / metric / log / result for the generic job panel, emit for your plugin's own rich UI, and cooperative cancelled.
  • The worker (python -m tlc_plugin_sdk.worker) — serves your plugin's Litestar route handlers + the generic reserved routes as an ASGI app, out-of-process in the plugin's own venv.
  • tlc_plugin_sdk.shared.* — batteries the heavy plugins share: URL-alias registration, config storage/UI, the generic-job helpers, image/label/modality utilities, script injection.

Quickstart

See docs/plugin-guide.md for the full author guide (manifest format, custom routes, the job model, UI fragment, checklist).

The contract version

tlc_plugin_sdk.SDK_CONTRACT_VERSION is this package's own version — one source of truth, one contract axis (both the Python and the browser surface). A plugin pins the SDK (3lc-compute-plugin-sdk>=X,<Y); the compute service and frontend implement a range and compare compatibility on MAJOR.MINOR. Versions are SemVer; see Status below for the 0.x stability stance.

How it fits

This SDK sits at the root of the plugin dependency graph. Its dependencies are uvicorn, litestar, and the 3lc data plane (3lc[pandas]) — so installing the SDK is all a plugin needs to use tlc and the shared.* helpers built on it. All three are imported lazily; import tlc_plugin_sdk stays cheap. It never depends on the compute service itself or on any plugin. A plugin built against tlc_plugin_sdk alone is therefore portable across service versions and runs in its own isolated environment.

Status

0.3 is the current contract line. Within 0.x the contract still evolves — mostly additively, but a coordinated breaking change may land on a MINOR bump while the fleet re-pins in lockstep (0.3 did: JobContext.result took a positional url, and the PY_CONTRACT/JS_CONTRACT axes collapsed into SDK_CONTRACT_VERSION). Anything reshaping the core still waits for a major bump. In the browser bridge, PLUGIN_API.libs.io is a stable part of the contract; the other bundled libs are best-effort (see the guide).

Metadata

Release files for 3lc-compute-plugin-sdk 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 3lc-compute-plugin-sdk 0.4.0
File Size Uploaded Provenance
3lc_compute_plugin_sdk-0.4.0.tar.gz 255.5 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for 3lc-compute-plugin-sdk 0.4.0
File Interpreter ABI Platform
3lc_compute_plugin_sdk-0.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 338.2 kB

Release files / 3lc_compute_plugin_sdk-0.4.0.tar.gz

Download URL 3lc_compute_plugin_sdk-0.4.0.tar.gz
Size 255.5 kB
Tags Source
SHA-256 checksum
How to use checksums
c6cf0c0b987af533c07ff75deed1374e5d6a574f31a5812eca432afc43e4e4a8
BLAKE2b-256 checksum
How to use checksums
6cefa7eef13702eb67073e3c9a6bf2f68a5e478ff78a229e0367cedcdaf283f3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.15

Release files / 3lc_compute_plugin_sdk-0.4.0-py3-none-any.whl

Download URL 3lc_compute_plugin_sdk-0.4.0-py3-none-any.whl
Size 82.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
56ec68ac304faf5ed598170552e8cb562347f7a8b99f189745d173b895bc01b6
BLAKE2b-256 checksum
How to use checksums
d7fc8624fd77c0d8944684655aa259556c7618840dc8d5fc6f897ad32c12133a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.8.15

Security for 3lc-compute-plugin-sdk 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.

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