Skip to main content

No project description provided

Project description

GUIGAGA

PyPI - Version PyPI - Python Version


Installation

pip install guigaga

Usage

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

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 powered GUI:

$ python app.py gui

GUI

And it still works as a command line script:

$ python app.py reverse_complement ATGC
GCAT

Check out the live demo here.

License

guigaga is distributed under the terms of the MIT license and was heavily inspired by trogon.

All We Need Is GUI Ga Ga!

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

guigaga-0.0.10.tar.gz (598.8 kB view hashes)

Uploaded Source

Built Distribution

guigaga-0.0.10-py3-none-any.whl (14.7 kB view hashes)

Uploaded Python 3

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