Dynamic Gooey from config files
Project description
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.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dygo-0.3.1-py3-none-any.whl.
File metadata
- Download URL: dygo-0.3.1-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.25.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1cdea31a5dfb3de22368e420c3ef3de934cc3d9d261ac5a13d01308a3875e3d1
|
|
| MD5 |
6bc74b8e547e2f0596ec17b0023862ef
|
|
| BLAKE2b-256 |
e19c14f2b154fc895f8102dc4d9f902df54c1f52f113531fcfa73c30b4da0cbb
|