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 adict.async defhandlers are supported. ctxexposesexecution_id,step_id,attempt,idempotency_key,redelivery,deadline_ms,remaining_ms(),is_cancelled/cancelled(athreading.Eventset when the runtime cancels the attempt) andlog().- Raise
TaskError(code, message, retryable=..., details=...)for business errors. Any other exception is reported as a retryableUNHANDLED_EXCEPTIONwith 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.4.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| orbit_lang_sdk-0.4.0.tar.gz | 13.2 kB | Without provenance | Details for orbit_lang_sdk-0.4.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| orbit_lang_sdk-0.4.0-py3-none-any.whl | Python 3 | none | any | Details for orbit_lang_sdk-0.4.0-py3-none-any.whl |
Total release size: 26.2 kB
Release files / orbit_lang_sdk-0.4.0.tar.gz
| Download URL | orbit_lang_sdk-0.4.0.tar.gz |
|---|---|
| Size | 13.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0e00d69a2731057c41032f9507907dd68e76b1db349c9038a763f952a77ff542
|
|
BLAKE2b-256 checksum How to use checksums |
9bd90b82c27e21983970416015d6de9a39d2a1f5e225f1af8265b62d101a7ef6
|
| 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.4.0-py3-none-any.whl
| Download URL | orbit_lang_sdk-0.4.0-py3-none-any.whl |
|---|---|
| Size | 12.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
09ac52781dfd622df4748d008fd610d35fb6cae340e0e26db35f8f6ce0872319
|
|
BLAKE2b-256 checksum How to use checksums |
5dbf58be39f9c4d008078f05388a20045a73621173402ff3fecd2a04b1dd240a
|
| 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.4.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.