Skip to main content

Pyagram

Diagram Generator

This is a command line tool, which generates finite state machine diagram for web and mobile application development from a source file through graphviz.

The finite state machine diagram is a kind of diagram, which describes screen transitions and flows of the processes.

The source file is written in a specific format, which enables us to write a code easier than using only graphviz, since Pyagram generates graphviz code as an intermediate file.

Since graphviz provides 3 kinds of image formats, such as gif, png and svg, Pyagram provides these kinds of file format as well.

There are several kinds of objects in the diagram.

  • Title of a diagram

  • Double circle represents a view.

  • Gray background circle represents a server side process including action.

  • Dashed arrow represents a screen transition between views.

  • Straight arrow represents flow of the process, such as accepting a request, validation, database access and so on.

  • Straight arrow is able to have an label, which describes an action and a result of the process, such as clicking a button, success, error and so on.

How to write source file

Firstly you can define a title of the diagram with @ sign.

@[title] CRUD View Diagram

Next you can define views with # sign and its screen transitions with –> sign.

Now we have 3 views, such as List View, Add View and Server Error View.

List View and Add View are connected one another.

You can define its own path below the view name as well.

I highly recommend you to define those views first, since that would help you when you are trying to define server processes as a guide.

#[List View] /index

—> Add View

#[Add View] /add

—> List View

–> Add View

#[Server Error]

Then you can define server processes with ==> sign connecting source process and destination process.

As you can see, process is able to have multiple flows. Each flow has its own destination.

You can add results of the processes, such as Valid, Invalid, Success, Database Error and so on. It will be used as labels placed beside the straight arrows.

$[GET /index] ==> List View

$[GET /add] ==> Add View

$[POST /add] ==> Validate

$[Validate] Valid ==> Save

Invalid ==> Add View

$[Save] ==> Add View

$[Save] Success ==> List View

Database error ==> Server Error

Now that you can define the flows between the views and the processes with ==> sign.

#[List View] /index

—> Add View

Click add button ==> GET /add

#[Add View] /add

—> List View

–> Add View

Click back button ==> GET /index

Click submit button ==> POST /add

How to install

pip3 command installs depending library, such as pyparsing automatically.

After the installation, executable pyagram command will be placed in a bin directory, such as /usr/local/bin/pyagram.

pip3 install pyagram

How to execute

pyagram command accepts 2 kinds of options.

t option represents image type, which accepts gif, png and svg.

d option represents diagram type, which accepts std and erd.

f option represents font name, which accepts font names in your operation system if it exists or uses default font.

o option represents output path, which accepts path.

i option represents source file, which accepts text file.

v option represents verbose mode, which prints various information useful for debugging.

Output file is placed in the same place as the source file.

pyagram -t {image type} -d {diagram type} -f {font name} -o {output path} -i {source file}

Metadata

Release files for pyagram 1.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyagram 1.4.3
File Size Uploaded Provenance Actions
pyagram-1.4.3.tar.gz 6.4 kB Without provenance Details for pyagram-1.4.3.tar.gz

Built distributions (wheels)

Table of built distributions (wheels) for pyagram 1.4.3
File Interpreter ABI Platform Actions
pyagram-1.4.3.macosx-10.11-x86_64.tar.gz Details for pyagram-1.4.3.macosx-10.11-x86_64.tar.gz
pyagram-1.4.3-py3.5.egg Legacy Egg format - - Details for pyagram-1.4.3-py3.5.egg

Total release size: 32.0 kB

Release files / pyagram-1.4.3.tar.gz

Download URL pyagram-1.4.3.tar.gz
Size 6.4 kB
Tags Source
SHA-256 checksum
How to use checksums
883507cd58ca6c12453aa86dcc88355fe3906228d3a893a84af5330cb98f255a
BLAKE2b-256 checksum
How to use checksums
55c9a0d1b3bf501688ae53489f6c149517189a01beb5d0b7972b1e63a5f3fe3f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyagram-1.4.3.macosx-10.11-x86_64.tar.gz

Download URL pyagram-1.4.3.macosx-10.11-x86_64.tar.gz
Size 11.1 kB
Tags Source
SHA-256 checksum
How to use checksums
26968a590f6bd6df8484d2964df7c12466fc0ad3ee3e651be6ebe423150de3d2
BLAKE2b-256 checksum
How to use checksums
be06eb48b1b61641174a08f248e3bccda8765668d9f85650e4d3591b4234fe1f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / pyagram-1.4.3-py3.5.egg

Download URL pyagram-1.4.3-py3.5.egg
Size 14.4 kB
Tags Egg
SHA-256 checksum
How to use checksums
ed406864fa78d35121d81011e13ded7f5a5cbfa20f4f274dfef4a3f7a64e61e6
BLAKE2b-256 checksum
How to use checksums
ab0a949dd28e7e2bac61bc2133ece1933ee5001f30d2f98192e7338f081ade34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Security for pyagram 1.4.3

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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