Skip to main content

Library to generate flowcharts from pseudo code

Project description

txtoflow (Translate To Flowchart)

The Python library can be used to generate flowcharts from pseudocode.

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

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

txtoflow-0.2.0.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

txtoflow-0.2.0-py3-none-any.whl (5.6 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