code0-hercules (Python)
Python SDK for the hercules action runner — the counterpart to the TypeScript
@code0-tech/hercules package. Define data types, functions, and events, and
connect them to aquila.
Install
pip install code0-hercules
Requirements:
- Python 3.10+
- Node.js — data-type schemas are converted to/from TypeScript via a bundled
Node helper (
hercules/_tsgen). Its npm dependencies are installed automatically on first use.
Develop
This project uses uv.
uv sync # create .venv + install (incl. dev deps)
npm ci --prefix hercules/_tsgen # install the Node schema helper
uv run pytest # run the tests
The runnable example lives in examples/simple-example-py.
Built-in definitions
The built-in data types / functions in hercules/definitions/ are generated
(not committed) from a code0-definition
release:
uv run python scripts/build_definitions.py --version def-0.0.35
Build & release
Packages are built with uv build and published to PyPI from CI:
build.ymlbuilds and tests the package on every push.publish.ymlruns on a pushed git tag: it sets the package version from the tag, regenerates the definitions, builds, and publishes to PyPI via trusted publishing (OIDC — no token).
To cut a release, push a PEP 440 version tag (e.g. 0.1.0):
git tag 0.1.0 && git push origin 0.1.0
The code0-definition release used for the built-in definitions is controlled by
the HERCULES_DEFINITIONS_VERSION repository variable (default def-0.0.35).
Build locally:
uv build # -> dist/*.whl and dist/*.tar.gz
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file code0_hercules-1.4.1.tar.gz.
File metadata
- Download URL: code0_hercules-1.4.1.tar.gz
- Upload date:
- Size: 68.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f4af0c7301d5e65d1926795ea300c134e54139fd22862e1ea9860318bd73166
|
|
| MD5 |
a3cce4da9f7b4b2a0e2a7c60645bff2b
|
|
| BLAKE2b-256 |
1dc0dd417d8635e575d7d292a76ad90e93ac0b77ad9e4de52cbef3218d5d81e7
|
File details
Details for the file code0_hercules-1.4.1-py3-none-any.whl.
File metadata
- Download URL: code0_hercules-1.4.1-py3-none-any.whl
- Upload date:
- Size: 169.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via:
uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf7958de1cf7e4ab0d91838906d1fffcd4d50b59a837c00b33538071984689df
|
|
| MD5 |
f27fbe2f5fa3a8e15fb20edb21a5b643
|
|
| BLAKE2b-256 |
835c424eaafa64414946a43a7948755ba6fb1bbede1a68f3bae88862108984a7
|