Creates an organization map image
Project description
Organization Map Generator
Installation
pip install organization-map
Dependencies
- PIL (pip install pillow)
Organization structure
orgs=[
[{'id':11,'name':'Main Org\nLine 2','childs':[21,22],'fill':'#384891','color':'white'}]
,[{'arrowtext':'50%','id':21,'name':'Leaf 21','childs':[31,32,33]},{'id':22,'name':'leaf3','childs':[34]}]
,[{'id':31,'name':'leaf4','childs':[40]},{'id':32,'name':'leaf5'},{'id':33,'name':'leaf6','childs':[41,42]},{'id':34,'name':'leaf7'}]
,[{'id':40,'name':'leaf40'},{'id':41,'name':'Bottom Leaf','childs':[51],'fill':'red','color':'white'},{'id':42,'name':'Bottom Leaf'}]
,[{'id':51,'name':'Bottom Leaf 2\nLine 2\nLong Line 3'}]
]
Code example:
from organization_map import generator
generator.generate_image(orgs).show()
Output
Multi Level
orgs=[[{'id': '2',
'name': 'Father',
'labels': ['', '', ''],
'childs': [['22'], ['22', '23'], []],
'parents': [[], [], []],
'level': 0}],
[{'id': '22',
'name': 'Daughter',
'labels': ['111 %', '222 %', ''],
'childs': [[], [], []],
'parents': [['2'], ['2'], []],
'level': 1},
{'id': '23',
'name': 'Son',
'labels': ['', '223 %', ''],
'childs': [[], ['33'], []],
'parents': [[], ['2'], []],
'level': 1}],
[{'id': '33',
'name': 'Daughter 2',
'labels': ['', '2333 %', ''],
'childs': [[], [], []],
'parents': [[], ['23'], []],
'level': 2}]]
Code example:
from organization_map import generator
generator.generate_image(orgs,multi_level=True).show()
Output
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
File details
Details for the file organization_map-1.0.5.tar.gz
.
File metadata
- Download URL: organization_map-1.0.5.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.9.1
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c3da8b02d0d43b198562805aee37fa1b418c25987ea5a8a4c514f669ac3540f |
|
MD5 | eb0154ff1d3835a2fefe29d6897ccd8b |
|
BLAKE2b-256 | 12bd7795e658dc4b7ab9111272680765ae66e30def01d79554c2dbc868f14563 |