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.

Quick start

Install PAL:

python -m pip install PythonAutomataLibrary

Copy the bundled examples and PDF/Markdown documentation to an editable PAL-Examples/ folder in your current directory:

python -m PythonAutomataLibrary.ExampleInstaller

Run an example script from PAL-Examples/. For a guided first model, see the PAL Guide.

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 details

PyPI wheels include the native core for Windows, Linux, and macOS, so manual compilation is unnecessary. The standard installation includes visualization dependencies. See PAL on PyPI and distribution details.

Advanced users who only need a minimal headless installation can skip declared dependencies and install the core requirements explicitly:

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

Note that --no-deps skips all declared dependencies, not only visualization. As a result, pip check may report missing dependencies.

To install examples in a different parent directory, pass its path, such as python -m PythonAutomataLibrary.ExampleInstaller ~/Documents or python -m PythonAutomataLibrary.ExampleInstaller "C:\\Users\\YourName\\Documents" on Windows. The installer creates PAL-Examples/ with runnable scripts and a Documentation/ directory of PDF and Markdown manuals, without downloading from GitHub; it refuses to overwrite an existing PAL-Examples/ folder. Graphical examples require a desktop display.

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, report the specific PAL version used in your study.

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

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.8
File Size Uploaded Provenance Actions
pythonautomatalibrary-1.0.8.tar.gz 950.9 kB With provenance Details for pythonautomatalibrary-1.0.8.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for PythonAutomataLibrary 1.0.8
File Actions
pythonautomatalibrary-1.0.8-py3-none-win_amd64.whl Python 3 none Windows x86-64 Details for pythonautomatalibrary-1.0.8-py3-none-win_amd64.whl
pythonautomatalibrary-1.0.8-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 for pythonautomatalibrary-1.0.8-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
pythonautomatalibrary-1.0.8-py3-none-macosx_11_0_arm64.whl Python 3 none macOS 11.0+ ARM64 Details for pythonautomatalibrary-1.0.8-py3-none-macosx_11_0_arm64.whl
pythonautomatalibrary-1.0.8-py3-none-macosx_10_13_x86_64.whl Python 3 none macOS 10.13+ x86-64 Details for pythonautomatalibrary-1.0.8-py3-none-macosx_10_13_x86_64.whl

Total release size: 5.0 MB

Release files / pythonautomatalibrary-1.0.8.tar.gz

Download URL pythonautomatalibrary-1.0.8.tar.gz
Size 950.9 kB
Tags Source
SHA-256 checksum
How to use checksums
d69b19a8d5c23c541b02d6c687c95c3617ca609e77f17394d90b6e0af5c6e9ac
BLAKE2b-256 checksum
How to use checksums
df45b187ff66825cc52eb2da8e3e335224c1b286a370153ec929de7447e930cb
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 20, 2026.

Transparency log

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

Download URL pythonautomatalibrary-1.0.8-py3-none-win_amd64.whl
Size 1.1 MB
Tags Python 3 Windows x86-64
SHA-256 checksum
How to use checksums
a39b770e1fd85e6eeac18af907669e030080ffe97025d3138dab3cc27b7ac31e
BLAKE2b-256 checksum
How to use checksums
6177ee48905ba8f8096dcb75cdc2255550dc3c9a8f6a7298933acd0733f4ac44
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 20, 2026.

Transparency log

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

Download URL pythonautomatalibrary-1.0.8-py3-none-manylinux_2_24_x86_64.manylinux_2_28_x86_64.whl
Size 1.0 MB
Tags Linux glibc 2.24+ x86-64 Linux glibc 2.28+ x86-64 Python 3
SHA-256 checksum
How to use checksums
6a14fae3145b2e4ed78782fca8b626fcf13c83824af40957d5104566788ae7ed
BLAKE2b-256 checksum
How to use checksums
25178e699848fb67a9cccf3223d7b05f7f24612b4aaa6d0f4459f2719bd915cf
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 20, 2026.

Transparency log

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

Download URL pythonautomatalibrary-1.0.8-py3-none-macosx_11_0_arm64.whl
Size 996.6 kB
Tags Python 3 macOS 11.0+ ARM64
SHA-256 checksum
How to use checksums
6afc6c6fa13b6a163b436ac4598d5704c1718736842255ddeae54d0602764366
BLAKE2b-256 checksum
How to use checksums
873c96ec9dc07908dce5f1557f02245f93ecaac90708a7412c365f501fcb18dd
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 20, 2026.

Transparency log

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

Download URL pythonautomatalibrary-1.0.8-py3-none-macosx_10_13_x86_64.whl
Size 1.0 MB
Tags Python 3 macOS 10.13+ x86-64
SHA-256 checksum
How to use checksums
9c89c6c31b52e758a04686158f330328b1a238f384599c87b333c906f816766a
BLAKE2b-256 checksum
How to use checksums
d53d7e6e30b60cf84af3b4df7573dab70d4e0777550bea35b3950d8351f932a7
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 20, 2026.

Transparency log

Security for PythonAutomataLibrary 1.0.8

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.8.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 20, 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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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