Skip to main content

Serve click scripts over the web with minimal effort.

Project description


Serve click scripts over the web with minimal effort.

Caution: No security (login etc.), do not serve scripts publicly.


See this demo screen capture.

Take an existing click script, like this one:

import click
import time
def cli():
    'A stupid script to test click-web'

@click.option("--delay", type=float, default=0.01, help='delay for every line print')
@click.argument("lines", default=10, type=int)
def print_rows(lines, delay):
    'Print lines with a delay'
    click.echo(f"writing: {lines} with {delay}")
    for i in range(lines):
        click.echo(f"Hello row: {i}")

if __name__ == '__main__':

Create a minimal script to run with flask

from click_web import create_click_web_app
import example_command

app = create_click_web_app(example_command, example_command.cli)

Running example app:

In Bash:

export FLASK_ENV=development
flask run

Unsupported click features

It has only been tested with basic click features, and most advanced features will probably not work.

  • Variadic Arguments (will need some JS on client side)
  • Promts (probably never will)
  • Custom ParamTypes (depending on implementation)


  • Abort started/running processes.
  • Browser history

Included 3:rd party libraries

SplitJs - Copyright (c) 2018 Nathan Cahill (MIT license)

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 click-web, version 0.6.5
Filename, size File type Python version Upload date Hashes
Filename, size click_web-0.6.5-py3-none-any.whl (43.2 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size click-web-0.6.5.tar.gz (35.6 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