Skip to main content

A web command user interface

Project description

webcui

A Python package for creating Webcui apps. A Webcui app is to the web what a Command Line Interface app is for the command line. The goal of Webcui is to make it as easy as possible for Python developers to share their Python app with the world.

Webcui idea:

  • A web page with a HTML form is generated from a basic Python function.
  • Function parameters become input fields.
  • The function is executed when the user submit the form.
  • The result is displayed on the web page.

Installation

Install Python 3.6 or later and then webcui using pip.

$ pip install webcui

Usage

Here's an example of a simple Webcui app:

import webcui

def cmd(number_of_spam: int, side: str = "eggs"):
   """Calculate the price of a breakfast order."""
   spams = number_of_spam * ["spam"]
   dish = f"{', '.join(spams)} and {side}"
   price = number_of_spam * 1.5 + 2
   return f"The price of an order of {dish} is €{price:.2f}"

if __name__ == '__main__':
   webcui.run(cmd)

To run the Webcui app on your own computer run:

$ python app.py --run

Project details


Download files

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

Files for webcui, version 0.1.2
Filename, size File type Python version Upload date Hashes
Filename, size webcui-0.1.2-py3-none-any.whl (15.3 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size webcui-0.1.2.tar.gz (2.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page