ball-lang — the Ball language, Python toolchain
Ball is a programming language where every
program is a Protocol Buffer message. This distribution bundles the whole Python
toolchain: the Ball → Python compiler, the Python → Ball encoder, the
self-hosted engine, the zero-dependency runtime, and the ball CLI.
pip install ball-lang
Usage
ball --version # the installed toolchain version
ball check program.ball.json # validate without running
ball compile program.ball.json # Ball -> Python source [-o out.py]
ball encode source.py # Python -> Ball program [-o out.ball.json]
ball run program.ball.json # execute via the self-hosted engine
Programs are read as proto3 JSON (.ball.json / .json), optionally wrapped in
a google.protobuf.Any @type envelope.
Exit codes: 0 success · 1 runtime error · 2 invalid program / usage ·
3 I/O error.
First ball run compiles the engine
The Ball engine is itself a Ball program. Rather than ship a generated ~690 KB
Python module, this wheel carries the engine's Ball source and compiles it
with the bundled Ball → Python compiler the first time you run ball run,
caching the result. That takes well under a second; every later run reuses the
cache.
The cache lives in %LOCALAPPDATA%\ball-lang\engine on Windows and
$XDG_CACHE_HOME/ball-lang/engine (default ~/.cache/ball-lang/engine)
elsewhere. Set BALL_CACHE_DIR to override it — useful in containers, CI, and
read-only-HOME environments. The cache key covers the installed version and a
hash of the bundled source, so an upgrade recompiles rather than reusing a stale
engine.
Python API
from ball_compiler.compiler import compile as compile_program
from ball_compiler.loader import load_program
from ball_encoder.encoder import encode
src = compile_program(load_program("program.ball.json"))
License
MIT — see the repository.
Metadata
Release files for ball-lang 0.1.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 | |
|---|---|---|---|---|
| ball_lang-0.1.0.tar.gz | 621.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| ball_lang-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 1.3 MB
Release files / ball_lang-0.1.0.tar.gz
| Download URL | ball_lang-0.1.0.tar.gz |
|---|---|
| Size | 621.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
11653de4c2b3c3828ae54c366e021851d783bd76bdea2bc1927cb27688f14367
|
|
BLAKE2b-256 checksum How to use checksums |
93c228ca436f0caa9fa02bc1cf9e2feb685dad5ad09d54a384ba56a3d96715b7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency logRelease files / ball_lang-0.1.0-py3-none-any.whl
| Download URL | ball_lang-0.1.0-py3-none-any.whl |
|---|---|
| Size | 631.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
446b9471ee003db81f080104062053567090db8a26e22dc2b74371e8a600b9dc
|
|
BLAKE2b-256 checksum How to use checksums |
ee88096c6c66bc92f1cbb1cda07980614f6534a9543811fb3988e0b68da3d53a
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency logSecurity for ball-lang 0.1.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.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for ball_lang-0.1.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 4, 2026.
Transparency logA 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.