3lc-compute-plugin-sdk
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· importtlc_plugin_sdk.
What it gives you
ComputePlugin— the base class you subclass. Implementget_ui_fragment(andcomputeif you expose a synchronous endpoint); job and lifecycle hooks ship as safe defaults. There is noregister()to call — a plugin's metadata lives in itsplugin.tomlmanifest (or a[tool.tlc-compute]table inpyproject.toml), and the Hub discovers it from there.JobContext— the surface a long-running job programs against:progress/metric/log/resultfor the generic job panel,emitfor your plugin's own rich UI, and cooperativecancelled.- 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).
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 3lc_compute_plugin_sdk-0.3.3.tar.gz.
File metadata
- Download URL: 3lc_compute_plugin_sdk-0.3.3.tar.gz
- Upload date:
- Size: 238.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
43d077fe7af6c11006bac42896a8a0519f12ced66cb781ea80e4342963959dd6
|
|
| MD5 |
d573431f7dd0c140f5c66d9703999035
|
|
| BLAKE2b-256 |
ebd6de0b3264645ffd500bb7a918357fafb2c064698bd18419012585452eb61a
|
File details
Details for the file 3lc_compute_plugin_sdk-0.3.3-py3-none-any.whl.
File metadata
- Download URL: 3lc_compute_plugin_sdk-0.3.3-py3-none-any.whl
- Upload date:
- Size: 75.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.8.15
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
01d8357c08d0f4fea6b0ad013739d3e65f0dabe75c16b09117f5cc5c27ab46dc
|
|
| MD5 |
595568ddfb3c67c42013cf519991fab3
|
|
| BLAKE2b-256 |
0415bf7b84604c354ff3ce96a715ce07882536cb39a90625cfa645bb9d3a3cb4
|