dygo
| Version | |
| Project | |
| CI | |
| Code |
Dynamic Gooey from config files
Table of Contents
About
Dynamic Gooey (dygo) ...
- Parses config files (json or yaml)
- Extracts values which have to be defined by the user during runtime
- Renders a GUI via Gooey
- Let the user insert the values for the dynamic parameters
- Inserts the received entries into the config
- Returns the config
Installation
pip install dygo
Usage
from dygo import render
my_cfg = render("path/to/jsonORyaml")
The dynamic key needs to be inserted as a dict into the config file. The following two examples do the exact same.
-
yaml
my_dynamic_param: dygo: 'room for a comment here' dest: 'param1'
-
json
"my_dynamic_param": {"dygo": "dygo", "dest": "param1"},
The rendered GUI looks like this:
The dict will be replaced with the value received from the user. Assuming the user entered abc for param1, the dict afterwards looks like {"my_dynamic_param": "abc"}.
Currently the key dygo serves as a flag for Dynamic Gooey to detect dynamic parameters (the value is ignored). All other key-value pairs in the dygo dict are treated as args for GooeyParser.add_argument (see Gooey for further documentation). Most important is the dest arg whose value will be displayed as a name of the parameter for the user.
Setting the Program Name & Description
from dygo.config import set_program_metadata
set_program_metadata(program_name="My Program", program_description="It does what it does")
License
dygo is distributed under the terms of the MIT license.
Metadata
Release files for dygo 0.3.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dygo-0.3.1-py3-none-any.whl | Python 3 | none | any | Details |
Release files / dygo-0.3.1-py3-none-any.whl
| Download URL | dygo-0.3.1-py3-none-any.whl |
|---|---|
| Size | 5.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
1cdea31a5dfb3de22368e420c3ef3de934cc3d9d261ac5a13d01308a3875e3d1
|
|
BLAKE2b-256 checksum How to use checksums |
e19c14f2b154fc895f8102dc4d9f902df54c1f52f113531fcfa73c30b4da0cbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
python-httpx/0.25.0
|