Skip to content

ozanturker/pyscript-cli

 
 

Repository files navigation

PyScript CLI

A command-line interface for PyScript.

Version Test codecov pre-commit.ci status Checked with mypy

Quickly wrap Python scripts into a HTML template, pre-configured with PyScript.

demo

Installation

$ pip install pyscript-cli

Usage

Embed a Python script into a PyScript HTML file

$ pyscript wrap <filename.py>

This will generate a file called <filename.html> by default. This can be overwritten with the -o or --output option:

$ pyscript wrap <filename.py> -o <another_filename.html>

Open the script inside the browser using the --show option

$ pyscript wrap <filename.py> --show

Very simple command examples with --command option

The -c or --command option can be used to demo very simple cases. In this case, if the --show option is used and no --output file is used, a temporary file will be generated.

$ pyscript wrap -c 'print("Hello World!")' --show

About

A CLI for PyScript

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 96.6%
  • HTML 3.4%