Welcome to PySimpleAutomata’s documentation!


PySimpleAutomata is a Python library to manage Deterministic Finite Automata (DFA), Nondeterministic Finite Automata(NFA) and Alternate Finite state automata on Word (AFW).

This library is not meant for performance nor space consumption optimization, but for academic purposes: PySimpleAutomata aims to be an easily readable but working representation of automata theory.

This project has been developed for “Process and Service Modelling and Analysis” class of Master of Science in Engineering in Computer Science from Sapienza University of Rome.

Offline versions of this documentation can be found here


The project is Python3 only, tested on Python 3.5 and 3.6.

Graphviz - Graph Visualization Software is required to be installed and present on system path to input/output DOT files.

From PyPi using pip:

pip install pysimpleautomata

From source:

python setup.py install
pip install -r requirements.txt

It is advised in any case to use a Python Virtual environment instead of a global installation.


This code is provided under MIT Licence.