Skip to main content

Simplifies making GUI+CLI apps with Gooey

Project description

ezgooey

ezgooey.ez

Gooey is a Python package, which lets you turn argparse-based CLI apps into cross-platform GUI apps. ezgooey.ez makes this even simpler.

When you start your app without CLI arguments, it’ll run in GUI, but if you supply CLI arguments, it’ll run as CLI. Import, then add the @ezgooey decorator to the function where you initialize the ArgumentParser.

from ezgooey.ez import *

@ezgooey
def get_parser():
    parser = ArgumentParser(
        prog='appname',
        description='app description'
    )
...

ezgooey.logging

This package also includes a simple colorful logger that is compatible with Gooey's richtext control.

Simple usage

Import and initialize in one place

import ezgooey.logging as logging
logging.init(level=logging.INFO)

Use

logging.info('info')
logging.warning('warning')
logging.error('error')
logging.success('success')

In other places, just do:

import logging
logging.info('info')

Advanced usage

Import and initialize in one place

import ezgooey.logging as logging
logging.init(level=logging.INFO)

In other places:

import ezgooey.logging as logging
log = logging.logger('appname')
log.info('info')
log.warning('warning')
log.error('error')
log.success('success')
...

Example

My PyPolona project is an app, made with the help of ezgooey and packaged for macOS and Windows with PyInstaller. Check the sources for details.

Requirements

Requires Python 3.8+

License and Copyright

Copyright © 2020 Adam Twardoch. Licensed under the terms of the MIT license.

<script async defer src="https://buttons.github.io/buttons.js"></script>

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

ezgooey-1.0.3.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

ezgooey-1.0.3-py3-none-any.whl (5.3 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