From f8c0656fe2a2d9d785d16ca31be857b06accb49c Mon Sep 17 00:00:00 2001 From: Koen Vossen Date: Fri, 12 May 2023 20:19:23 +0200 Subject: [PATCH] Make sure pyodide-http>=0.2.1 is used in the examples --- README.md | 2 +- examples/astropy.html | 20 ++++++++++++++++++++ examples/pyvo.html | 3 ++- 3 files changed, 23 insertions(+), 2 deletions(-) create mode 100644 examples/astropy.html diff --git a/README.md b/README.md index 5a43b4f..bbc6a10 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/examples/astropy.html b/examples/astropy.html new file mode 100644 index 0000000..b6b8678 --- /dev/null +++ b/examples/astropy.html @@ -0,0 +1,20 @@ + + + + + + + + packages = ["astropy", "ssl", "pyodide-http>=0.2.1"] + + + + import pyodide_http + pyodide_http.patch_all() + + from astropy.coordinates import SkyCoord + res = SkyCoord.from_name("Crab Nebula") + print(res) + + + \ No newline at end of file diff --git a/examples/pyvo.html b/examples/pyvo.html index 2e3c040..0d74f2f 100644 --- a/examples/pyvo.html +++ b/examples/pyvo.html @@ -5,12 +5,13 @@ - packages = ["pyvo", "ssl", "pyodide-http"] + packages = ["pyvo", "ssl", "pyodide-http>=0.2.1"] import pyodide_http pyodide_http.patch_all() + from pyvo import registry res = registry.search(servicetype = 'conesearch', waveband = 'UV') print(res)