Giter Site home page Giter Site logo

pyscript-cli's Introduction

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

Using Pip

$ pip install pyscript

Installing the developer setup from the a repository clone

see the Developer setup section on CONTRIBUTING page

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

pyscript-cli's People

Contributors

alex-martinez avatar anaconda-renovate-bot avatar fpliger avatar kennyoliver avatar mattkram avatar ntoll avatar ozanturker avatar pre-commit-ci[bot] avatar pww217 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.