clooey
Command Line Interface (CLI) to a minimal Web UI.
Getting Started
Start by installing clooey using pip.
pip install clooey
You can then use the API to convert a script into a form.
import clooey
cli = clooey.parse('sample.py')
html = clooey.generate(cli, clooey.TEMPLATE_FORM)
Want to customize the form HTML? All templates are Jinja2 formatted. By default, the form template is provided with one
inputslist of strings, which are the prompts provided toinputfunction calls.
Web Demo
See an actual web form by running the following command:
clooey web
From left to right, you'll see the launched Flask app with the following form, fill out the form as you would the CLI, then submit the form to see the output.
You can optionally provide your own script to parse. For example,
wget https://github.com/alvinwan/clooey/blob/main/clooey/examples/password.py
clooey web --program password.py
CLI Demo
Run the CLI.
clooey cli
You'll then see the following output
<form method="post">
<label>Enter your name: </label>
<input type="text" name="1">
<label>Enter your age: </label>
<input type="text" name="2">
<label>Enter your city: </label>
<input type="text" name="3">
<input type="submit" value="submit">
</form>
Next, the script will prompt you for input, as though you were filling out the web form.
Enter your name: Alvin
Enter your age: 1000
Enter your city: Seattle
Finally, the script will execute the Python script with the input values.
Welcome to Seattle, Alvin (1000)!
You can optionally provide your own script to parse. For example,
wget https://github.com/alvinwan/clooey/blob/main/clooey/examples/piglatin.py
clooey cli --program piglatin.py
Metadata
Release files for clooey 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| clooey-0.1.1.tar.gz | 5.3 kB | Without provenance | Details for clooey-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| clooey-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for clooey-0.1.1-py3-none-any.whl |
Total release size: 11.9 kB
Release files / clooey-0.1.1.tar.gz
| Download URL | clooey-0.1.1.tar.gz |
|---|---|
| Size | 5.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5d932801e4ef9f04f64fb6461e5011e895081f317e0e1f32a3f7e3b5bbd267b3
|
|
BLAKE2b-256 checksum How to use checksums |
9bf070b77af0a0f7eb5c8f1be9ff3ad2298bc03358bb5e63e2dcb6e95cabb887
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.11
|
Release files / clooey-0.1.1-py3-none-any.whl
| Download URL | clooey-0.1.1-py3-none-any.whl |
|---|---|
| Size | 6.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0220f9264816ad8bcb8053f7ed7fa8ec0e985f38e250c5ecb3488d6b7f6c701f
|
|
BLAKE2b-256 checksum How to use checksums |
33c282879b2f50a4c1d4a2d4dfbd6405bafd58de653f4f24776c76904f9befbe
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.10.11
|
Security for clooey 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.