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/

You might need to also install the library that it provides. For example, on ubuntu, you also need to run the following command to ensure that pygraphviz runs properly. You can find more information on installing that package on their website

$ 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.3.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

pyfsa-0.3.1-py3-none-any.whl (10.5 kB view details)

Uploaded Python 3

File details

Details for the file pyfsa-0.3.1.tar.gz.

File metadata

  • Download URL: pyfsa-0.3.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for pyfsa-0.3.1.tar.gz
Algorithm Hash digest
SHA256 5684d84a504ccf319aa55ad03341f036f27426fe99c7e6ac9a897fa45f4f74ca
MD5 50c5a044ff1c2d2b9c27f4aad5bd27b9
BLAKE2b-256 280c6d3ef7a0a00f65c8084a2010115f4fce74570a503db0544b546cf5025e8b

See more details on using hashes here.

File details

Details for the file pyfsa-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: pyfsa-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 10.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.56.0 CPython/3.9.1

File hashes

Hashes for pyfsa-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 280e3285ec617309f1854cb0b06de82c5a68d43708f8702ab568c1818811bfb4
MD5 626ead83e26708f1721de8d4a7151c61
BLAKE2b-256 54515738a488a8a6e4c382650ccb84c5890d8bd893d2cab76406974745b1c18a

See more details on using hashes here.

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