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 compute / get_ui_fragment; job and lifecycle hooks ship as no-op defaults. There is no register() to call — a plugin's metadata lives in its [tool.tlc-compute] manifest, 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. A plugin pins the SDK (3lc-compute-plugin-sdk>=X,<Y) and declares the contract it targets via its manifest. The compute service implements a contract range, and the SDK version is the shared reference both sides agree on. 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 only required dependencies are uvicorn and litestar; the 3lc data plane is an optional extra (3lc-compute-plugin-sdk[shared]), pulled in only by the shared.* helpers. 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.2 is the released contract line. Within 0.x the contract evolves additively only: symbols and schemas that exist keep working, and anything breaking 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

3lc_compute_plugin_sdk-0.2.3.tar.gz (212.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

3lc_compute_plugin_sdk-0.2.3-py3-none-any.whl (70.5 kB view details)

Uploaded Python 3

File details

Details for the file 3lc_compute_plugin_sdk-0.2.3.tar.gz.

File metadata

File hashes

Hashes for 3lc_compute_plugin_sdk-0.2.3.tar.gz
Algorithm Hash digest
SHA256 467d099f843736b9b15be67d6610a3cf3417ff994277adf295aa22b5e0448580
MD5 23b9de929d1f096a5d7311f9eb410615
BLAKE2b-256 133dd9ff9f062c37022726df73487ef839c4c16f1c9e13902da7835acdd0bae7

See more details on using hashes here.

File details

Details for the file 3lc_compute_plugin_sdk-0.2.3-py3-none-any.whl.

File metadata

File hashes

Hashes for 3lc_compute_plugin_sdk-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 94c8089305a51165365365e9716b2029bbbdf2688b6902be30cd6dd7b6e42e90
MD5 182db4e2ca4a858078b68e27cf1fbc2a
BLAKE2b-256 de52e1fa538912b3aba683304ec4433d29293cc2c80d331d2890cc335df837b2

See more details on using hashes here.

Release history Release notifications | RSS feed

0.4.0

2 files

0.3.3

2 files

0.3.2

2 files

0.3.1

2 files

0.3.0

2 files

This release

0.2.3 This release

2 files

0.2.2

2 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