Skip to main content

Python SDK for Cerebelum workflow orchestration engine

Project description

Cerebelum Python SDK

Python SDK for Cerebelum — a deterministic workflow orchestration engine built on Elixir/OTP.

Install

pip install cerebelum-sdk

Or from source:

git clone https://github.com/ZeaCl/cerebelum-python.git
cd cerebelum-python
pip install -e .

Quick Start

from cerebelum import step, workflow

@step
def hello(inputs):
    name = inputs.get("name", "World")
    return f"Hello, {name}!"

@workflow
def my_workflow(wf):
    wf.timeline(hello)

# Execute locally (no engine needed)
result = my_workflow.execute({"name": "Carlos"})
print(result.final_result)  # "Hello, Carlos!"

Distributed Mode

Requires Cerebelum Engine running with gRPC enabled.

from cerebelum import DistributedExecutor

executor = DistributedExecutor(core_url="localhost:50051")
result = await executor.execute(my_workflow, {"name": "Carlos"})

Examples

See examples/ directory for complete tutorials.

License

MIT — see Cerebelum Engine for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cerebelum_sdk-0.2.0.tar.gz (62.7 kB view details)

Uploaded Source

Built Distribution

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

cerebelum_sdk-0.2.0-py3-none-any.whl (58.3 kB view details)

Uploaded Python 3

File details

Details for the file cerebelum_sdk-0.2.0.tar.gz.

File metadata

  • Download URL: cerebelum_sdk-0.2.0.tar.gz
  • Upload date:
  • Size: 62.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for cerebelum_sdk-0.2.0.tar.gz
Algorithm Hash digest
SHA256 afb067806a97fc3dbcc90f5784e81c3432d677f9307e3a2077ce4bf00bf7563a
MD5 163fc555d1268eec125c14280847ddd9
BLAKE2b-256 d4f38ba840762d5b5f2eb29725f9457800e5e6450cddc958949d4bd65abbe7a8

See more details on using hashes here.

File details

Details for the file cerebelum_sdk-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: cerebelum_sdk-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 58.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for cerebelum_sdk-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 24410f88c923bdc592172f95e54205d4fafc6437cd5eaeb8dc6343b1f6801367
MD5 8d839f9bc6215cb2e3b017aa1ffcd097
BLAKE2b-256 83b7fd02fcfef5111d541a4f4caaeeda3d808569099f6582906a8674052068af

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page