Skip to content
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

Make sure pyodide-http>=0.2.1 is used in the examples #34

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Provides patches for widely used http libraries to make them work in Pyodide env
```python
# 1. Install this package
import micropip
await micropip.install('pyodide-http')
await micropip.install('pyodide-http>=0.2.1')

# 2. Patch requests
import pyodide_http
Expand Down
20 changes: 20 additions & 0 deletions examples/astropy.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<html>
<head>
<link rel="stylesheet" href="https://pyscript.net/latest/pyscript.css" />
<script defer src="https://pyscript.net/latest/pyscript.js"></script>
</head>
<body>
<py-config>
packages = ["astropy", "ssl", "pyodide-http>=0.2.1"]
</py-config>

<py-script>
import pyodide_http
pyodide_http.patch_all()

from astropy.coordinates import SkyCoord
res = SkyCoord.from_name("Crab Nebula")
print(res)
</py-script>
</body>
</html>
3 changes: 2 additions & 1 deletion examples/pyvo.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
</head>
<body>
<py-config>
packages = ["pyvo", "ssl", "pyodide-http"]
packages = ["pyvo", "ssl", "pyodide-http>=0.2.1"]
</py-config>

<py-script>
import pyodide_http
pyodide_http.patch_all()

from pyvo import registry
res = registry.search(servicetype = 'conesearch', waveband = 'UV')
print(res)
Expand Down