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.3.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.3-py3-none-any.whl (11.4 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyscript-0.2.3.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.3.tar.gz
Algorithm Hash digest
SHA256 25d77c80674c012dbe53a3d86aa8779e90ccc86b11a40188de89d28f506cda41
MD5 30cbffce3c6cdf51bf97da451ec9c5fb
BLAKE2b-256 c8234234fa9f9888c067ee5a0713d8a193ac44d29bb003b9ad873b24f1ef3825

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyscript-0.2.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 1b1547905d550ce5730c4f117047d6c7617f9593e25daaea445f88b99f8a2f19
MD5 6368bffb4edc23d6bd45e13132337d7d
BLAKE2b-256 c7fb9a6b356ffd96acb866c2bf4bbc6ad2c0253d1297adaf1b75c31a72fcef83

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