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.5.tar.gz (10.1 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.5-py3-none-any.whl (11.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyscript-0.2.5.tar.gz
  • Upload date:
  • Size: 10.1 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.5.tar.gz
Algorithm Hash digest
SHA256 8648800270ce07f2a12c4eef0d72868816e1826e375a36ed0d77ffa4ca158a64
MD5 b8aa657642ddf26e1dfe08a54e4fd168
BLAKE2b-256 692adb57156690d5f050e1b86b9267c4c15c6f464790d85f868e9d48f5988dc3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyscript-0.2.5-py3-none-any.whl
  • Upload date:
  • Size: 11.7 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.5-py3-none-any.whl
Algorithm Hash digest
SHA256 37b8e66b36cd8bcce37b8f824c0491552892bb95bb05ef1018a01e0b7030c8ea
MD5 312006ad1aeecea029278e1b32f24932
BLAKE2b-256 1bb57c8b2b1e6a9ce977c78b3d58be10b586b2e54bf2f3d2f35dfe342b1ac321

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