Skip to main content

A package for abstracting state machine logic

Project description

Python States

Initially created for HackPSU Spring 2026

Available on PyPi

State Machines are great. Programming them isn't. python_states solves this issue by abstracting away all of the boilerplate emulation and transition handling. As a result, implementing a state machine is as simple as defining a state transition matrix and providing a starting state.

Usage

Python States is packaged and available on PyPi;

pip install python-states

Development Instructions

  1. Clone the repository:
git clone git@github.com:tedtasman/python_states.git
  1. Install dependencies with uv:
uv sync
  1. Run the project:
uv run python main.py

Future work

  1. Concurrent execution, which would add support for NFAs and other non-deterministic state machines
  2. Documentation...

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

python_states-1.0.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

python_states-1.0.0-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file python_states-1.0.0.tar.gz.

File metadata

  • Download URL: python_states-1.0.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for python_states-1.0.0.tar.gz
Algorithm Hash digest
SHA256 8bb042cb1afbfe9ca667ee58e992169ca8dbcabf463e62be2ff84fbf8195f797
MD5 a41c886c01c0701ab68d15a2e0b883f1
BLAKE2b-256 2e95433b156ef8c04839205735bde6cc02adbcea5b9590891fbc2dc0a93d4a48

See more details on using hashes here.

File details

Details for the file python_states-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: python_states-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for python_states-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec4ea63430dd5b8d89e697bf17bdb281d157d95b8c0c881091b2de7fcb2a0744
MD5 83c0789692888e8c5fa75cc16e01a8a9
BLAKE2b-256 862fcba3bffe23db42ae18a8ddaece50e141f29f781aab61a77c3c8c926dc4c8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page