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.2.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.2.0
File Size Uploaded Provenance Actions
orbit_lang_sdk-0.2.0.tar.gz 13.2 kB Without provenance Details for orbit_lang_sdk-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 26.2 kB

Release files / orbit_lang_sdk-0.2.0.tar.gz

Download URL orbit_lang_sdk-0.2.0.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
5d04e1df7332e0e9f855153391c880e266a66b193eb89239d2b6b465ae1c4280
BLAKE2b-256 checksum
How to use checksums
ef45138968032c6e9796ae5005d460dd85df16005a79e60fce295d1c2bf067e1
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.2.0-py3-none-any.whl

Download URL orbit_lang_sdk-0.2.0-py3-none-any.whl
Size 12.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
424201ff64ce64054c0ddc8a614ddd58cc724c50a65be5254957dbaca1b25552
BLAKE2b-256 checksum
How to use checksums
1efa872a6357703d51011f7581969a8e27bc9a31090ab2b2dced9a00b2fae66b
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.2.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