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.5

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.5
File Size Uploaded Provenance
pythonautomatalibrary-1.0.5.tar.gz 886.0 kB With provenance Details

Built distributions (wheels)

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

Total release size: 4.7 MB

Release files / pythonautomatalibrary-1.0.5.tar.gz

Download URL pythonautomatalibrary-1.0.5.tar.gz
Size 886.0 kB
Tags Source
SHA-256 checksum
How to use checksums
a1ac4a450eb82776fc77b88ed569e8f598ab36f642f7c35a8e8f531559c36c5c
BLAKE2b-256 checksum
How to use checksums
08574d30575fc08f91efd7a1fd8195de78fcf7b174a84cbb52777d2874b63598
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.5-py3-none-win_amd64.whl

Download URL pythonautomatalibrary-1.0.5-py3-none-win_amd64.whl
Size 998.9 kB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
b9efd650e99b9faddfe3fab960ac60c9f917a4f27caefcbe711442f7a9e8e862
BLAKE2b-256 checksum
How to use checksums
a2868a3baf19e1547121e4a9388ce5b274974b07d398018d29a6c0ee7b0dd5ee
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.5-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl

Download URL pythonautomatalibrary-1.0.5-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 962.6 kB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
fbc734a97329fdd3baf993a280d11a22136c426bf22327bf0f7a07470db6ac61
BLAKE2b-256 checksum
How to use checksums
752fb040165ebfe8481046ba3aa0f076a40e3bf7fd8cd3d3c6b54d83baf8c052
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.5-py3-none-macosx_11_0_arm64.whl

Download URL pythonautomatalibrary-1.0.5-py3-none-macosx_11_0_arm64.whl
Size 934.6 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
a5058de7e36892230939c0feec7df5916a9920dcafd477ab6fd5f3242220c241
BLAKE2b-256 checksum
How to use checksums
a62f4f90028a90dfc3710e63a888f73c1ceb2692a7e9cf5a6a57a45998736c83
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.5-py3-none-macosx_10_13_x86_64.whl

Download URL pythonautomatalibrary-1.0.5-py3-none-macosx_10_13_x86_64.whl
Size 940.0 kB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
f856e385e434127eb60e14ed3e156451ef114834d8d56d86de46244aa38128f3
BLAKE2b-256 checksum
How to use checksums
f41b76772ff9c91b4490829d0f73e977b3d873e783f20c17bbcdb93d4d0ca923
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

Security for PythonAutomataLibrary 1.0.5

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 5 files in this release have been uploaded with provenance metadata.

Select from 5 files

Attestation for pythonautomatalibrary-1.0.5.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 Oct 19, 2026.

Transparency log

A 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.

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