Skip to main content

Command Line Interface for PyScript

Project description

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.

Installation

$ pip install pyscript

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

Set a title for the browser tab

You can set the title of the browser tab with the --title option:

$ pyscript wrap <filename.py> --title "My cool app!"

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

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

pyscript-0.2.4.tar.gz (9.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyscript-0.2.4-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

Details for the file pyscript-0.2.4.tar.gz.

File metadata

  • Download URL: pyscript-0.2.4.tar.gz
  • Upload date:
  • Size: 9.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.8.10 Linux/5.4.0-125-generic

File hashes

Hashes for pyscript-0.2.4.tar.gz
Algorithm Hash digest
SHA256 8efd21d50e5fb83b8de89cba9da5db5a79b9c844fd796dae75cf819dc1a701ac
MD5 017f5b47d4c5938b10ba1526450cc7a4
BLAKE2b-256 0a307c6b936f858d3286b98a7a6e834ebf2bfdd5fa988a4d6e65428b2733ce30

See more details on using hashes here.

File details

Details for the file pyscript-0.2.4-py3-none-any.whl.

File metadata

  • Download URL: pyscript-0.2.4-py3-none-any.whl
  • Upload date:
  • Size: 11.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.0 CPython/3.8.10 Linux/5.4.0-125-generic

File hashes

Hashes for pyscript-0.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 2cc6327c919c090d77c78c6bdcd1e4835106518c15951a9840c387234d51d545
MD5 eaa96e656bb14eb56ee55cb795d7fb3f
BLAKE2b-256 5e706440e6a18c08d54fbf9c5c9372d06c84cd815005f9d5865c614b2b510df2

See more details on using hashes here.

Supported by

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