Skip to main content

No project description provided

Project description

PyFSA

Build status badge Release status badge PyPI version badge PyPI Status Badge

Python versions badge License Downloads per month

A python CLI to render finite state graphs.

This application takes a CSV file with state information, and uses it to either produce the finite state graph, and verify that strings are valid given the state information, a start state, and a desired state. The string subcommand is also able to render the traversal graph of a string through the state machine.

Installation

You can install this project directly from github with pip, but it is also available in pypi. Install it like so:

python3 -m pip install pyfsa

GraphViz is required to run this, as graphviz is the rendering engine used to create the png files. You can find lots of information on how to do that here: https://graphviz.org/download/

On Ubuntu, you can find it in your package manager or install it directly using APT:

$ apt install graphviz

You might need to also install the graphviz development library to ensure the Python wrapper pygraphviz runs properly. You can find more information on installing pygraphviz on their website. On Ubuntu, you can install it with the following command:

$ apt install libgraphviz-dev

Examples

State file:

trigger,source,target
a,x,y
b,x,z
a,y,x
b,y,z
a,z,z
b,z,z
fsa state -f examples/states.csv

no_start_end

fsa state -f examples/states.csv -s x

start_state

fsa state -f examples/states.csv -e z

end_state

fsa state -f examples/states.csv -s x -e z

both

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

pyfsa-0.4.1.tar.gz (7.8 kB view hashes)

Uploaded Source

Built Distribution

pyfsa-0.4.1-py3-none-any.whl (12.4 kB view hashes)

Uploaded Python 3

Supported by

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