Skip to main content

orbit-lang-sdk (Python)

Python worker SDK for the ORBIT runtime. Standard library only, Python 3.9+.

pip install orbit-lang-sdk
from orbit_sdk import Worker, TaskError

worker = Worker("payments-worker", concurrency=8)   # server: $ORBIT_SERVER, token: $ORBIT_TOKEN

@worker.task("payments.charge", version="1.0.0")
def charge(input, ctx):
    if input["amount"] > 5000:
        raise TaskError("CARD_DECLINED", "limit exceeded", retryable=False)
    # ctx.idempotency_key is stable across retries and redeliveries
    return {"transaction_id": f"tx-{input['order_id']}", "status": "captured"}

worker.run()   # Ctrl-C / SIGTERM drains in-flight tasks and unregisters
  • Handlers receive (input: dict, ctx: Context) and return a dict. async def handlers are supported.
  • ctx exposes execution_id, step_id, attempt, idempotency_key, redelivery, deadline_ms, remaining_ms(), is_cancelled / cancelled (a threading.Event set when the runtime cancels the attempt) and log().
  • Raise TaskError(code, message, retryable=..., details=...) for business errors. Any other exception is reported as a retryable UNHANDLED_EXCEPTION with its traceback.
  • The SDK re-registers after a runtime restart and keeps retrying result delivery through outages, so results produced during a crash are not lost.

Starting workflows from Python:

from orbit_sdk import Client
c = Client()
eid = c.start("OrderProcessing", {"order_id": "A-1", ...}, execution_id="order-A-1")
print(c.wait(eid)["status"])

Credentials and TLS

Variable Purpose
ORBIT_SERVER runtime URL (default http://127.0.0.1:7233)
ORBIT_WORKER_TOKEN (or ORBIT_TOKEN) bearer token: a per-worker token from orbit token, or the shared worker token
ORBIT_CA_CERT PEM CA to trust when the runtime uses a private certificate
ORBIT_CLIENT_CERT, ORBIT_CLIENT_KEY PEM client certificate and key for mutual TLS

Metadata

Release files for orbit-lang-sdk 0.1.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 orbit-lang-sdk 0.1.0
File Size Uploaded Provenance Actions
orbit_lang_sdk-0.1.0.tar.gz 13.1 kB Without provenance Details for orbit_lang_sdk-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for orbit-lang-sdk 0.1.0
File Interpreter ABI Platform Actions
orbit_lang_sdk-0.1.0-py3-none-any.whl Python 3 none any Details for orbit_lang_sdk-0.1.0-py3-none-any.whl

Total release size: 25.8 kB

Release files / orbit_lang_sdk-0.1.0.tar.gz

Download URL orbit_lang_sdk-0.1.0.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
1b7b6330465f79a366b12b5cb9bc199a434e5ff637e4494dffd4c2ef7d67b4f4
BLAKE2b-256 checksum
How to use checksums
95b09df1da217c2376e504838e9e0eeb9ab8e3af519050c79690960f4db022fb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Release files / orbit_lang_sdk-0.1.0-py3-none-any.whl

Download URL orbit_lang_sdk-0.1.0-py3-none-any.whl
Size 12.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8c1953d6ac639fa49da44c99536e2a2e4828bf9758b06bcd96857eb40853a7d0
BLAKE2b-256 checksum
How to use checksums
91d3dff25e3e14fa8df11aa0d1a3856e8006543c46fc00ba6eb32a845941240b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.18

Security for orbit-lang-sdk 0.1.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