mirror of
https://github.com/pyscript/pyscript.git
synced 2025-12-19 10:17:23 -05:00
Merge pull request #72 from msaroufim/docs
README and getting started updates
This commit is contained in:
@@ -114,6 +114,18 @@ 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. 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>
|
||||
```
|
||||
|
||||
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. If there's enough popular demand the pyodide team will likely work on supporting your package, regardless things will likely move faster if you make the PR and consult with the team to get unblocked.
|
||||
|
||||
In order to use them you will need to declare the dependencies using the `<py-env>` in the
|
||||
HTML head.
|
||||
|
||||
@@ -197,4 +209,5 @@ fig
|
||||
</py-script>
|
||||
</body>
|
||||
</html>
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
@@ -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 integrates with the way the DOM works in the browser and allows users to add logic, in Python, in a way that feels 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 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
|
||||
|
||||
## Resources
|
||||
|
||||
Reference in New Issue
Block a user