Skip to content

Commit 7013332

Browse files
authored
Update examples.md
included new examples. Made notes about what packages are loaded and added complexity sub headings.
1 parent 82e2c2d commit 7013332

File tree

1 file changed

+71
-5
lines changed

1 file changed

+71
-5
lines changed

docs/examples.md

Lines changed: 71 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,84 @@ PyScript can be found [on PyScript.com](https://pyscript.com/@examples).
55

66
The examples are (links take you to the code):
77

8+
### Simple:
9+
810
* [Hello world](https://pyscript.com/@examples/hello-world/latest)
11+
* uses included datetime module. No additional packages.
912
* [A simple clock](https://pyscript.com/@examples/simple-clock/latest)
10-
* [Simple slider panel](https://pyscript.com/@examples/simple-panel/latest)
11-
* [Streaming data panel](https://pyscript.com/@examples/streaming-in-panel/latest)
13+
* Not found
1214
* [WebGL Icosahedron](https://pyscript.com/@examples/webgl-icosahedron/latest)
13-
* [KMeans in a panel](https://pyscript.com/@examples/kmeans-in-panel/latest)
14-
* [New York Taxi panel (WebGL)](https://pyscript.com/@examples/nyc-taxi-panel-deckgl/latest)
15+
* uses very old version of [three.js](https://threejs.org/) directly imported in index.html. (not as a module in toml)
1516
* [Pandas dataframe fun](https://pyscript.com/@examples/pandas/latest)
17+
* uses [pandas](https://pandas.pydata.org/) from pypi
18+
* pyodide
1619
* [Matplotlib example](https://pyscript.com/@examples/matplotlib/latest)
20+
* uses [matplotlib](https://matplotlib.org/)
21+
* not clear how numpy is being loaded as it is not referenced.
22+
* pyodide
23+
* [Todo](https://pyscript.com/@examples/todo-app/latest)
24+
* uses pyweb. No additional packages.
25+
* pyodide
26+
* [Tic Tac Toe](https://pyscript.com/@examples/tic-tac-toe/latest)
27+
* uses pyweb. No additional packages.
28+
* pyodide
29+
* [Pyscript Jokes](https://pyscript.com/@examples/pyscript-jokes/latest)
30+
* uses pyweb and [pyjokes](https://pyjok.es/)
31+
* pyodide
32+
* [D3 visualization](https://pyscript.com/@examples/d3-visualization/latest)
33+
* uses [d3]()
34+
* mixes javascript code with python code. imports d3 from javascript.
35+
* pyodide
36+
* [Import antigravity](https://pyscript.com/@examples/antigravity/latest)
37+
* uses svg
38+
* pyodide
39+
* [API proxy tutorial](https://pyscript.com/@examples/api-proxy-tutorial/latest)
40+
* uses fetch
41+
* pyodide
42+
* [API proxy and secrets tutorial](https://pyscript.com/@examples/api-proxy-and-secrets-tutorial/latest)
43+
* uses fetch
44+
* pyodide
45+
46+
### More complex:
47+
1748
* [Numpy fractals](https://pyscript.com/@examples/fractals-with-numpy-and-canvas/latest)
49+
* uses [numpy](https://numpy.org/), [sympy](https://www.sympy.org/en/index.html) from pypi
50+
* pyodide
51+
* [Simple slider panel](https://pyscript.com/@examples/simple-panel/latest)
52+
* uses [Panel](https://panel.holoviz.org/) and [Bokeh](https://bokeh.org/) from pypi and loads in index.html
53+
* does not run
54+
* pyodide
55+
* [Streaming data panel](https://pyscript.com/@examples/streaming-in-panel/latest)
56+
* uses [Panel](https://panel.holoviz.org/), [Bokeh](https://bokeh.org/) [numpy](https://numpy.org/), [pandas](https://pandas.pydata.org/) from pypi
57+
* loads bokeh, panel, tabulator in index.html
58+
* pyodide
59+
* [KMeans in a panel](https://pyscript.com/@examples/kmeans-in-panel/latest)
60+
* uses [Bokeh](https://bokeh.org/), [altair](https://altair-viz.github.io/), [numpy](https://numpy.org/), [pandas](https://pandas.pydata.org/), [scikit-learn](https://scikit-learn.org/stable/), [Panel](https://panel.holoviz.org/) from pypi
61+
* loads panel, bootstrap, vega, tabulator, bokeh in index.html
62+
* runs but displays errors to do with threadpools
63+
* pyodide
64+
* [New York Taxi panel (WebGL)](https://pyscript.com/@examples/nyc-taxi-panel-deckgl/latest)
65+
* uses a mixture of pypi and direct load packages in index.html
66+
* [Bokeh](https://bokeh.org/), [numpy](https://numpy.org/), [pandas](https://pandas.pydata.org/), [Panel](https://panel.holoviz.org/), [deck-gl](https://deck.gl/)
67+
* deckGL, bokeh are loaded directly in index.html
68+
* pyodide
1869
* [Folium geographical data](https://pyscript.com/@examples/folium/latest)
70+
* uses [folium](https://python-visualization.github.io/folium/latest/), [pandas](https://pandas.pydata.org/) from pypi
71+
* pyodide
1972
* [Bokeh data plotting](https://pyscript.com/@examples/bokeh/latest)
20-
* [Import antigravity](https://pyscript.com/@examples/antigravity/latest)
73+
* uses [pandas](https://pandas.pydata.org/), [Bokeh](https://bokeh.org/), [xyzservices](https://github.com/geopandas/xyzservices) from pypi
74+
* pyodide
2175
* [Altair data plotting](https://pyscript.com/@examples/altair/latest)
76+
* uses [altair](https://altair-viz.github.io/), [pandas](https://pandas.pydata.org/), [vega_datasets](https://github.com/altair-viz/vega_datasets) from pypi
77+
* pyodide
78+
* [Panel and hyplot](https://pyscript.com/@examples/panel-and-hvplot/latest)
79+
* uses [Bokeh](https://bokeh.org/), [Panel](https://panel.holoviz.org/), [markdown-it-py](https://github.com/executablebooks/markdown-it-py), [numpy](https://numpy.org/), [pandas](https://pandas.pydata.org/), [hvplot](https://hvplot.holoviz.org/), [pyodide-http](https://pyodide.org/en/stable/usage/api/python-api/http.html) a fetch library.
80+
* bokeh and panel are loaded in the index.html
81+
* pyodide
2282

83+
Notes:
84+
- Updated from 14 to 20 found at above link
85+
- No micropython examples - all are pyodide
86+
- No worker examples
87+
- async used in some examples - probably obsolete now
88+
- fetch done several ways

0 commit comments

Comments
 (0)