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.36
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.36).
Build locally:
uv build # -> dist/*.whl and dist/*.tar.gz
Release files for code0-hercules 1.5.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 | |
|---|---|---|---|
| code0_hercules-1.5.0.tar.gz | 68.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| code0_hercules-1.5.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 238.2 kB
Release files / code0_hercules-1.5.0.tar.gz
| Download URL | code0_hercules-1.5.0.tar.gz |
|---|---|
| Size | 68.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1f4ce3a474a2e94fa414a029da0ba77be58873d6d93aa7b13613feb4c9e80c5a
|
|
BLAKE2b-256 checksum How to use checksums |
a60170ffe4a11c84a9126080fa5ddf211a2f841de956a19d72277d970e8d152e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.14 {"installer":{"name":"uv","version":"0.12.14","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}
|
Release files / code0_hercules-1.5.0-py3-none-any.whl
| Download URL | code0_hercules-1.5.0-py3-none-any.whl |
|---|---|
| Size | 169.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aacd691d46f4c27094336de3d558ae6914f0caeba38e868c790ca0cf80922a05
|
|
BLAKE2b-256 checksum How to use checksums |
06c56922f61b9cdab4c397d35d99ed5f77590e8a61ce89dc485bc8cf69d2bf48
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.12.14 {"installer":{"name":"uv","version":"0.12.14","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}
|