Skip to main content

Python Automata Library (PAL)

DOI

PAL is a Python modeling library for high-performance agent-based, lattice population, and PDE models. Model code uses a compact object-oriented API and can be compiled with @pal.njit; PAL keeps performance-sensitive state and algorithms in a precompiled native core.

import PythonAutomataLibrary as pal

PAL provides:

  • Grid: typed 1D/2D/3D lattice data.
  • AgentGrid: lattice or continuous-position agents with identity and properties.
  • PopGrid: integer lattice populations without individual agent identity.
  • PDEgrid: diffusion/advection fields.
  • IList: reusable integer query results.
  • Multinomial: binomial/multinomial sampling.
  • PixWindow and OpenGLWindow: 2D/3D visualization.
  • @pal.njit: Numba compilation with PAL-specific source transformation and diagnostics.

PAL runs in safe mode by default. Call pal.FastMode() before constructing PAL objects to select the unchecked high-performance implementations after a model has been validated.

Documentation

  • PAL Guide (PDF) — first model, worked modeling workflows, and detailed API behavior.
  • PAL Architecture and Design (PDF) — implementation structure, design rationale, subsystem choices, testing, and performance.
  • API Reference (PDF) — source-derived public signatures.
  • Cheatsheet (PDF) — compact one-page lookup for common operations.
  • Examples/ — complete working models.
  • Testing — correctness, API, integration, and regression tests, with local and CI run instructions.

Installation

Install PAL from PyPI (including visualization dependencies):

python -m pip install PythonAutomataLibrary

For a minimal headless installation, install without dependencies and add only the core requirements:

python -m pip install --no-deps PythonAutomataLibrary
python -m pip install numpy numba

Note that --no-deps skips all dependencies, not just visualization; this minimal installation is for advanced users and may be reported as missing dependencies by pip check.

Release wheels bundle the native core for Windows, Linux, and macOS, without manual compilation. PAL v1.0.0 is published on PyPI. See distribution details.

Examples

Install PAL, then copy its bundled examples into a new, editable folder in your current directory:

python -m pip install PythonAutomataLibrary
python -m PythonAutomataLibrary.ExampleInstaller

To choose a different parent directory, pass its path, for example python -m PythonAutomataLibrary.ExampleInstaller ~/Documents (or python -m PythonAutomataLibrary.ExampleInstaller "C:\\Users\\YourName\\Documents" on Windows). This creates PAL-Examples/ inside the chosen directory, with runnable examples and a Documentation/ folder containing the PAL PDF manuals, without downloading from GitHub. The command refuses to overwrite an existing PAL-Examples/ folder. Run individual Python scripts from that folder; examples requiring a graphical display should be run on a desktop computer.

Build from source

PAL currently loads its native library from the package directory. Build it before importing PAL.

Windows, from an x64 Visual Studio Developer Command Prompt:

python build_native.py

Linux/macOS:

python build_native.py

Then run the tests:

python -m pytest -q Testing

Architecture

NativeCore.py is the Python/Numba API and compilation layer. pal_native.c owns stable mutable simulation state and the workhorse native algorithms. Safe and fast PAL objects are selected at construction time, so compiled hot paths do not branch on safety mode.

The public API has dedicated regression coverage in Testing/API/; the full Testing/ tree is the integration gate.

Citation

If you use PAL in your research, please cite:

Bravo, R. R. (2026). Python Automata Library (PAL) [Computer software]. Zenodo. https://doi.org/10.5281/zenodo.23439298

For reproducibility, cite the specific release you used: PAL v1.0.0.

GitHub's Cite this repository button provides citation formats from CITATION.cff.

PAL is based on the Hybrid Automata Library (HAL). Please also acknowledge or cite HAL when its underlying ideas or algorithms are relevant to your work.

Metadata

Release files for PythonAutomataLibrary 1.0.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for PythonAutomataLibrary 1.0.6
File Size Uploaded
pythonautomatalibrary-1.0.6.tar.gz 896.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for PythonAutomataLibrary 1.0.6
File
pythonautomatalibrary-1.0.6-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details
pythonautomatalibrary-1.0.6-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl Python 3 none Linux glibc 2.24+ x86-64, Linux glibc 2.28+ x86-64 Details
pythonautomatalibrary-1.0.6-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details
pythonautomatalibrary-1.0.6-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details

Total release size: 4.8 MB

Release files / pythonautomatalibrary-1.0.6.tar.gz

Download URL pythonautomatalibrary-1.0.6.tar.gz
Size 896.8 kB
Tags Source
SHA-256 checksum
How to use checksums
01d75dd102161487121b173b7e446030da186471dda3f9e592da315fc552c301
BLAKE2b-256 checksum
How to use checksums
4fcaa7551fe9e411aa063680d5b83a1fa84cad2a22b87a62a820340a66bc3662
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 Oct 19, 2026.

Transparency log

Release files / pythonautomatalibrary-1.0.6-py3-none-win_amd64.whl

Download URL pythonautomatalibrary-1.0.6-py3-none-win_amd64.whl
Size 1.0 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
8eaf96dc2ffa9d1d271fca82cd814697cb5740b4fe91a27adce152129a51c014
BLAKE2b-256 checksum
How to use checksums
e93ff1515a6fe271f2324fcf84c2180c14eeb5e23825b908836883b230273682
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 Oct 19, 2026.

Transparency log

Release files / pythonautomatalibrary-1.0.6-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL pythonautomatalibrary-1.0.6-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 973.0 kB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
2fd8a008acd33eaae77ed2484868efa81bd7450470d7b47632815b83fc85982f
BLAKE2b-256 checksum
How to use checksums
d322f130232915ed827a2b4e25f80e5e343c29cfd60ea2083321b6cffafc9306
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 Oct 19, 2026.

Transparency log

Release files / pythonautomatalibrary-1.0.6-py3-none-macosx_11_0_arm64.whl

Download URL pythonautomatalibrary-1.0.6-py3-none-macosx_11_0_arm64.whl
Size 945.0 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6d78de8c53b9102c1ed17ab82260b2ca739230796cb4ef538c9e8d79e972098c
BLAKE2b-256 checksum
How to use checksums
46746c032932cfe8c9f1ded99d51890473c595732f7796e515630750dbfe2b42
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 Oct 19, 2026.

Transparency log

Release files / pythonautomatalibrary-1.0.6-py3-none-macosx_10_13_x86_64.whl

Download URL pythonautomatalibrary-1.0.6-py3-none-macosx_10_13_x86_64.whl
Size 950.3 kB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
a5722bf21e93ea362bfde0ec3dbf8376d450a09e1f32f7b9988c975d03bc27b0
BLAKE2b-256 checksum
How to use checksums
84a39f08bdfce7eaa431f7e37b8b1c3ab2dfee100cf505a092653771cc161f50
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 Oct 19, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.6 This release

5 release files

1.0.5

5 release files

1.0.4

17 release files

1.0.3

17 release files

1.0.2

17 release files

1.0.1

17 release files

1.0.0

17 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page