Skip to main content

dygo

Version PyPI - Version PyPI - Python Version
Project GitHub License PyPI - Status PyPI - Format PyPI - Implementation
CI GitHub Actions Workflow Status
Code PyPI - Types Checked with mypy Linting: Ruff Code style: black

Dynamic Gooey from config files

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 during runtime
  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: 'room for a comment here'
        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.

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)

Table of built distributions (wheels) for dygo 0.3.1
File Interpreter ABI Platform
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

Release history Release notifications | RSS feed

This release

0.3.1 This release

1 release file

0.3.0

1 release file

0.2.0

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page