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.

Source Distribution

webcui-0.1.2.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

webcui-0.1.2-py3-none-any.whl (15.3 kB view details)

Uploaded Python 3

File details

Details for the file webcui-0.1.2.tar.gz.

File metadata

  • Download URL: webcui-0.1.2.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for webcui-0.1.2.tar.gz
Algorithm Hash digest
SHA256 6d842c50fc69c027937ae4c48dcbadaf1bd46c763f2bc8a651abd29280d90e20
MD5 291ed51be6b0f9bcede0228f6ab4fd16
BLAKE2b-256 92e6515a7254df1cdda78951de8f7c72884ad622d6a94cb713422689cb03d71d

See more details on using hashes here.

File details

Details for the file webcui-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: webcui-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.2

File hashes

Hashes for webcui-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 419a5ac28b644a6af1d4744f457d54e813741a3f8a6b1990b81d723a34a10fcf
MD5 eb4ff6da1338b571c7d6813a97c55f1b
BLAKE2b-256 53fe1a86e18e36ca9723506125b3195d5ef083fd81d11532c8df0adaa444c5e7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page