Skip to main content

Dynamic Gooey from config files

Project description

dygo - Dynamic Gooey

PyPI - Version PyPI - Python Version


Table of Contents

About

Dynamic Gooey (dygo) ...

  1. Parses config files (json or yaml)
  2. Extracts values which have to be defined by the user
  3. Renders a GUI via Gooey
  4. Let the user insert the values for the dynamic parameters
  5. Inserts the received entries into the config
  6. 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: 'dygo'
        dest: 'param1'
    
  • json

    "my_dynamic_param": {"dygo": "dygo", "dest": "param1"},
    

The rendered GUI looks like this:

example

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.

Limitations

Currently dygo only descents into dicts, other iterables like lists are yet not supported. This means if a dygo parameter has a list in its map path, it is ignored.

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

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

dygo-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file dygo-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: dygo-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.24.1

File hashes

Hashes for dygo-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b796c529259d494d6e29200c91c988158473548e239c2219fb78cea40b2475c2
MD5 1f00eb90c5b0858db2cb3f78b7b54c11
BLAKE2b-256 dfd6eacb1b5e578c37cd5de7f563227ab88df381186f581f72dad2d7e413c0e3

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page