Giter Club home page Giter Club logo

dynamic_gooey's Introduction

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.

dynamic_gooey's People

Contributors

m-birke avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.