Pyflowchart

Latest version: v0.3.1

Safety actively analyzes 638346 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 2 of 3

0.2.1

python
sub.set_connect_direction("right")
sub.connect(op)


and

python
sub.connect(op, "right")


On a top level.

docs updates

Updates README, docs new features above.

0.2.0

Support `Node.set_param(key, value)` to generate flowchart like this:


element(param1=value1,param2=value2)=>start: Start


And as a grammar sugar, support `ConditionNode.no_align_next()` to set a param `align-next=no`.


cond2(align-next=no)=>condition: Yes or No?


For convenience, you can also specify this operation when constructing a ConditionNode by:

python
ConditionNode("a cond node", align_next=False)


(Version 0.2.0 and 0.2.1 do not involve anything function of python code to flowchart, but are features regarding writing flowcharts in python.)

0.1.4

Simplify the generated node names from:

flow
st4303462304=>start: start a_pyflow_test
op4302546112=>operation: do something
cond4303774096=>condition: Yes or No?
io4303237472=>inputoutput: output: something...
e4303275104=>end: end a_pyflow_test
sub4303240064=>subroutine: A Subroutine

st4303462304->op4302546112
op4302546112->cond4303774096
cond4303774096(yes)->io4303237472
io4303237472->e4303275104
cond4303774096(no)->sub4303240064
sub4303240064(right)->op4302546112


To:

flow
st0=>start: start a_pyflow_test
op1=>operation: do something
cond2=>condition: Yes or No?
io3=>inputoutput: output: something...
e5=>end: end a_pyflow_test
sub4=>subroutine: A Subroutine

st0->op1
op1->cond2
cond2(yes)->io3
io3->e5
cond2(no)->sub4
sub4(right)->op1

0.1.3

🙏 Thanks Sung-En Chiu.

6: Let users choose simplify or not

The If and Loop in `ast_node.py` have methods called `simplify` to simplify the condition sentences that has one-line-body from


while xxx <------
| |
---yes-> loop body in one line
|
|no
v


into a single node:


<loop body> while xxx


Previous versions (starting from v0.0.1) hardcoded this feature. And users has no choice to close it.

This PR makes simplify can be disabled by

1. `Flowchart.from_code(..., simplify=False)` with Python, or
2. `--no-simplify` with CLI.

7 fix a 6(v0.1.2) bug: simplify works with nested if/func/loop

0.1.1

Bug fix: decode error when read the code file inputed from CLI

This version resolved 4. Rather than call `open('rt')` without a special encoding, this new version will open file in binary and then auto detect file encoding before decode it.

Thanks BackMountainDevil.

0.1.0

Page 2 of 3

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.