-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
tag: docsRelated to the documentationRelated to the documentationtype: bugSomething isn't workingSomething isn't workingwaiting for releaseBugs and features already landed but not released yetBugs and features already landed but not released yet
Description
Checklist
- I added a descriptive title
- I searched for other issues and couldn't find a solution or duplication
- I already searched in Google and didn't find any good information or help
What happened?
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Requests Tutorial</title>
<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>
<py-script>
import requests
import pyodide_http
# Patch the Requests library so it works with Pyscript
pyodide_http.patch()
# Make a request to the JSON Placeholder API
response = requests.get("https://jsonplaceholder.typicode.com/todos")
print(response.json())
</py-script>
</body>
</html>
URL:https://docs.pyscript.net/latest/tutorials/requests.html
What browsers are you seeing the problem on? (if applicable)
No response
Console info
No response
Additional Context
No response
Metadata
Metadata
Assignees
Labels
tag: docsRelated to the documentationRelated to the documentationtype: bugSomething isn't workingSomething isn't workingwaiting for releaseBugs and features already landed but not released yetBugs and features already landed but not released yet