8000 README and getting started updates by msaroufim · Pull Request #72 · pyscript/pyscript · GitHub
[go: up one dir, main page]

Skip to content

README and getting started updates #72

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
README and getting started updates
  • Loading branch information
msaroufim committed Apr 30, 2022
commit d55ac92e6c077169079e58331276df49ece11574
12 changes: 10 additions & 2 deletions GETTING-STARTED.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 `<py-env>` 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)

```
<py-env>
- './static/wheels/travertino-0.1.3-py3-none-any.whl'
</py-env>
```

For example, NumPy and Matplotlib are available. Notice here we're using `<py-script output="plot">`
as a shortcut, which takes the expression on the last line of the script and runs `pyscript.write('plot', fig)`.
Expand Down Expand Up @@ -149,4 +155,6 @@ fig
</py-script>
</body>
</html>
```
```

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
8 changes: 5 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -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
Expand Down
0