From d55ac92e6c077169079e58331276df49ece11574 Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Sat, 30 Apr 2022 17:02:03 -0400 Subject: [PATCH 1/2] README and getting started updates --- GETTING-STARTED.md | 12 ++++++++++-- README.md | 8 +++++--- 2 files changed, 15 insertions(+), 5 deletions(-) diff --git a/GETTING-STARTED.md b/GETTING-STARTED.md index 16721b0d..ccdf5669 100644 --- a/GETTING-STARTED.md +++ b/GETTING-STARTED.md @@ -116,7 +116,13 @@ pyscript.write('pi', f'π is approximately {pi:.3f}') In addition to the [Python Standard Library](https://docs.python.org/3/library/) and the `pyscript` module, many 3rd-party OSS packages will work out-of-the-box with PyScript. In order to use them you will need to delcare the dependencies using the `` in the -HTML head. +HTML head. You can also link to `.whl` files directly on disk like in our [toga example](https://github.com/pyscript/pyscript/blob/main/pyscriptjs/examples/toga/freedom.html) + +``` + +- './static/wheels/travertino-0.1.3-py3-none-any.whl' + +``` For example, NumPy and Matplotlib are available. Notice here we're using `` as a shortcut, which takes the expression on the last line of the script and runs `pyscript.write('plot', fig)`. @@ -149,4 +155,6 @@ fig -``` \ No newline at end of file +``` + +If your `.whl` is not a pure Python wheel then open a PR or issue with [pyodide](https://github.com/pyodide/pyodide) to get it added here https://github.com/pyodide/pyodide/tree/main/packages \ No newline at end of file diff --git a/README.md b/README.md index 8e3f51d3..be60fd88 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,9 @@ ### tl;dr PyScript is a Pythonic alternative to Scratch, JSFiddle or other "easy to use" programming frameworks, making the web a friendly, hackable, place where anyone can author interesting and interactive applications. -To demonstrate pyscript, see [the pyscript folder](pyscriptjs/README.md). +To get started see [GETTING-STARTED][GETTING-STARTED.md] + +For examples see [the pyscript folder](pyscriptjs/README.md). ### Longer Version PyScript is a meta project that aims to combine multiple open technologies to create a framework for users to use Python (and other languages) to create sophisticated applications in the browser. It highly integrate with the way the DOM works in the browser and allows users to add logic, in Python, in a way that feel natural to web as well as Python developers. @@ -28,9 +30,9 @@ Check out the `/examples` folder for more examples on how to use it, all you nee To contribute: -* clone the repo +* clone the repo `git clone https://github.com/pyscript/pyscript` * cd into the main project folder with `cd pyscriptjs` -* install the dependencies with `npm install` +* install the dependencies with `npm install` - make sure to use npm version >= 16 * run `npm run dev` to build and run the dev server. This will also watch for changes and rebuild when a file is saved ## Notes From d1d3ac481996ec79d8ad64ab7c3cddc93497e1c3 Mon Sep 17 00:00:00 2001 From: Mark Saroufim Date: Sat, 30 Apr 2022 18:41:09 -0400 Subject: [PATCH 2/2] Update README.md --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index be60fd88..94b45f3c 100644 --- a/README.md +++ b/README.md @@ -32,7 +32,7 @@ To contribute: * clone the repo `git clone https://github.com/pyscript/pyscript` * cd into the main project folder with `cd pyscriptjs` -* install the dependencies with `npm install` - make sure to use npm version >= 16 +* install the dependencies with `npm install` - make sure to use nodejs version >= 16 * run `npm run dev` to build and run the dev server. This will also watch for changes and rebuild when a file is saved ## Notes