Metadata-Version: 2.3
Name: guigaga
Version: 0.0.5
Project-URL: Documentation, https://github.com/wytamma/guigaga#readme
Project-URL: Issues, https://github.com/wytamma/guigaga/issues
Project-URL: Source, https://github.com/wytamma/guigaga
Author-email: Wytamma Wirth <wytamma.wirth@me.com>
License-Expression: MIT
License-File: LICENSE.txt
Classifier: Development Status :: 4 - Beta
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Python :: Implementation :: PyPy
Requires-Python: >=3.7
Requires-Dist: click
Requires-Dist: gradio
Description-Content-Type: text/markdown

# GUIGAGA <img src='images/logo.jpg' align="right" height="210" />

[![PyPI - Version](https://img.shields.io/pypi/v/guigaga.svg)](https://pypi.org/project/guigaga)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/guigaga.svg)](https://pypi.org/project/guigaga)

-----

## Installation

```console
pip install guigaga
```

## Usage

Simply decorate your script with the `@gui()` decorator to add a Graphical User Interface to your click CLI.

```python
import click
from guigaga import gui


@gui()
@click.command()
@click.argument("sequence",  type=str)
def reverse_complement(sequence):
    """This script computes the reverse complement of a DNA sequence."""
    complement = {"A": "T", "T": "A", "C": "G", "G": "C", "N": "N"}
    sequence = sequence.upper()
    result = "".join(complement[base] for base in reversed(sequence))
    click.echo(result)

if __name__ == "__main__":
    reverse_complement()
```

Run the script with the `gui` argument to open the [gradio](https://www.gradio.app/) powered GUI:

```console
$ python app.py gui
```

![GUI](images/reverse_complement_gui.png)

And it still works as a command line script:
```console
$ python app.py reverse_complement ATGC
GCAT
```

Check out the live demo [here](https://colab.research.google.com/gist/Wytamma/d2856c9258258f354e99c7eedffe6b07/guigaga.ipynb).

## License

`guigaga` is distributed under the terms of the [MIT](https://spdx.org/licenses/MIT.html) license and was heavily inspired by [trogon](https://github.com/Textualize/trogon).

##
All We Need Is GUI Ga Ga!
