Skip to content

Commit

Permalink
Create index.html
Browse files Browse the repository at this point in the history
  • Loading branch information
gorshco authored Apr 26, 2024
0 parents commit 13da886
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<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 = ["requests", "pyodide-http"] </py-config>

pre-script

<section class="pyscript">
<py-script>
import pyodide_http; pyodide_http.patch_all()
import requests

response = requests.get('https://httpbin.org/user-agent')
display(response.text)
</py-script>
</section>

post-script

</body>

0 comments on commit 13da886

Please sign in to comment.