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.2.tar.gz (9.9 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.2-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyscript-0.2.2.tar.gz
  • Upload date:
  • Size: 9.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.9.5 Linux/5.4.0-124-generic

File hashes

Hashes for pyscript-0.2.2.tar.gz
Algorithm Hash digest
SHA256 f254fd8708a5284ef7099b5e27036381a3a5ed14656493548879b4277e2900a1
MD5 83924f1fa9d2caf844a00e8e34bef1ec
BLAKE2b-256 7cacb65c861e02e212f5b5a166b4ed1cf82e5711c6d0779ce7d40394a5321d6f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for pyscript-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 6d21c5a3471b09a967e31797bbf17410fb854ea8712762a4115f020daa5a1dad
MD5 4e0ac4a439ff3b2cff6d6503c6f17a8d
BLAKE2b-256 8e81ba8b0a81c2b50107f0d80bf0cd0fd7dd0a2f3539c11139d031c8a9a55380

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