Python-Visual
Python running tool can output tables, charts, and photo albums without relying on any library. You can export the running results as PNG images

If you frequently use Python for various production/development tools, this Extension is very useful for you.
Features
- [X] Add/Edit interactive forms and associate running scripts.
- [X] Convenient way to pass parameters between forms and scripts.
- [X] Share your tool solutions.
- [X] Output Table.
- [X] Output Charts.
- [X] Output Photos.
- [X] Export the result.
- [ ] Output layout (ToDo)
- [X] Charts trace (ToDo)
How to use
Create Solution
In the solution editor, you can configure interactive forms and bind *.py to be called

Rich Output
Python receiving parameters and basic log output
All outputs are generated through the print() method
Long execution waiting for completion

Output Table

import json
table = {
'renderType': 'table',
'id': 'table1', // new, If you want to continuously change the table data, you only need to output the table with the same ID in the next logic to replace it.
'columns': [
{
'title': 'Name',
'dataIndex': 'name',
},
{
'title': 'Age',
'dataIndex': 'age',
},
{
'title': 'Favorite',
'dataIndex': 'favorite',
},
],
'data': [
{
'name': 'name1',
'age': 18,
'favorite': 'favorite',
},
{
'name': 'name2',
'age': 20,
'favorite': 'favorite',
}
]
}
print(json.dumps(table))
Output Local Album

import json
photo1 = {
'renderType': 'imgs',
'title': 'My Photos',
'path': '/Users/fangjianbing/work/yix/val2017',
# 'col': 4,
# 'pageSize': 24
}
print(json.dumps(photo1))
Output Chart
Can output eChart charts

import json
chart = {
'renderType': 'chart',
'options': {
'title': {
'text': 'Chart2'
},
'xAxis': {
'type': 'category',
'data': ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
},
'yAxis': {
'type': 'value'
},
'series': [
{
'data': [120, 200, 150, 80, 70, 110, 130],
'type': 'bar'
}
]
}
}
print(json.dumps(chart))
Please refer to the eChart document for the values of options