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.5.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.5.0
File Size Uploaded Provenance Actions
orbit_lang_sdk-0.5.0.tar.gz 13.4 kB Without provenance Details for orbit_lang_sdk-0.5.0.tar.gz

Built distribution (wheel)

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

Total release size: 26.4 kB

Release files / orbit_lang_sdk-0.5.0.tar.gz

Download URL orbit_lang_sdk-0.5.0.tar.gz
Size 13.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ba76385613f17261e0df502b1fa2002a848297095f4df9cda6c97c9e44bbaa5d
BLAKE2b-256 checksum
How to use checksums
455fe4d5a21c2699b51ecdfd90375e23e24b7b4aa3366e3cb9715cb5c147cc7c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

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

Download URL orbit_lang_sdk-0.5.0-py3-none-any.whl
Size 13.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a78673b8f4b2f7a39c03eaec59c3d21e3f3b58beb55ada7bbfb573b23bb0cde5
BLAKE2b-256 checksum
How to use checksums
91c5553307b5896384d4f147e3adfd92953530d06d08b3d2dc505989ba7eb0b2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.13.16

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