Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Library to generate flowcharts from pseudo code

Project description

txtoflow (Translate To Flowchart)

The Python library can be used to generate flowcharts from pseudo-code.

Installation

pip install txtoflow

Usage

from txtoflow import txtoflow

txtoflow.generate(
    '''
    if (A) {
        B;
    } else {
        C;
        D;
        while (E) {
            F;
        }
        G;
    }
    H;
    '''
)

Will generate an image named flowchart.jpg in current dir that looks like below

All the conditions and states can be arbitrary strings too

from txtoflow import txtoflow

txtoflow.generate(
    '''
    First Node;
    if (A != 10) {
        B;
    } else if (Just a String) {
        Another String;
    } else {
        Else Body;
        More Statements;
        while (While also works) {
            While Body;
        }
        Link back;
    }
    Final Node;
    '''
)

Will still generate image like below

Examples

More examples can be found here

Cmdline usage

$ > txtoflow -h

# Generates flowchart of pseudo-code from sample.c in file flow.jpg
$ > txtoflow -s sample.c -o flow.jpg

Project details


Download files

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

Files for txtoflow, version 0.2.6
Filename, size File type Python version Upload date Hashes
Filename, size txtoflow-0.2.6-py3-none-any.whl (5.7 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size txtoflow-0.2.6.tar.gz (4.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page