Skip to main content

LittleHorse is a high-performance microservice orchestration engine that allows developers to build scalable, maintainable, and observable applications

Project description

LittleHorse Python SDK

For documentation on how to use this library, please go to the LittleHorse website.

For examples go to the examples folder.

Dependencies

  • Install python.
  • Install pipx: brew install pipx
  • Install poetry: pipx install poetry
  • Install poetry shell plugin: poetry self add poetry-plugin-shell

Initialize

poetry install

Protobuf Compilation

../local-dev/compile-proto.sh

Run tests

poetry shell
python -m unittest discover -v

Validate Indentations

poetry run ruff check .

Validate types

poetry run mypy .

Useful Commands

Set python version:

poetry env use python3.9

Worker shutdown on Windows

littlehorse.start(...) installs shutdown hooks for SIGTERM and SIGINT. On runtimes that do not support asyncio signal handlers (for example, Windows event loops), the SDK falls back to signal.signal(...) when available. If a signal cannot be registered in the current runtime/thread, startup still continues and workers can be stopped by calling worker.stop().

Types Map

Task arguments type reference:

VariableType.JSON_OBJ: dict[str, Any]
VariableType.JSON_ARR: list[Any]
VariableType.DOUBLE:   float
VariableType.BOOL:     bool
VariableType.STR:      str
VariableType.INT:      int
VariableType.BYTES:    bytes

Python Code Formatter

poetry shell
black . 

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

littlehorse_client-1.1.1.tar.gz (101.4 kB view details)

Uploaded Source

Built Distribution

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

littlehorse_client-1.1.1-py3-none-any.whl (132.3 kB view details)

Uploaded Python 3

File details

Details for the file littlehorse_client-1.1.1.tar.gz.

File metadata

  • Download URL: littlehorse_client-1.1.1.tar.gz
  • Upload date:
  • Size: 101.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for littlehorse_client-1.1.1.tar.gz
Algorithm Hash digest
SHA256 256878c65e850b84017fd1b64104cabe5084bb079e972342cb2ebbccf2982273
MD5 9aeabf59eb60d729795d0001f606b320
BLAKE2b-256 0da81ea547e3f25995f924adfddf8efaaebd7c158fc1be20a91df0b0225c20b8

See more details on using hashes here.

File details

Details for the file littlehorse_client-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for littlehorse_client-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3fb6d00883873de5655a1106967c75c4e4ef3c04b2d350f390b05102b02e104a
MD5 1f6c44daee2ec20968a79096404e554f
BLAKE2b-256 042657469d417785331ec2387f2351ea3b45ed4e98f17b44adfaa70f7c44459b

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