File tree Expand file tree Collapse file tree 6 files changed +59
-0
lines changed Expand file tree Collapse file tree 6 files changed +59
-0
lines changed Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < title > API Proxy Introduction</ title >
5
+
6
+ <!-- Recommended meta tags -->
7
+ < meta charset ="UTF-8 ">
8
+ < meta name ="viewport " content ="width=device-width,initial-scale=1.0 ">
9
+
10
+ <!-- PyScript CSS -->
11
+ < link rel ="stylesheet " href ="https://pyscript.net/releases/2024.5.2/core.css ">
12
+
13
+ <!-- This script tag bootstraps PyScript -->
14
+ < script type ="module " src ="https://pyscript.net/releases/2024.5.2/core.js "> </ script >
15
+ </ head >
16
+ < body >
17
+ < script type ="py " src ="./main.py " config ="./pyscript.toml " async terminal > </ script >
18
+ </ body >
19
+ </ html >
Original file line number Diff line number Diff line change
1
+ from pyscript import fetch
2
+
3
+ response = await fetch (
4
+ "https://examples.pyscriptapps.com/api-proxy-tutorial/api/proxies/status-check" ,
5
+ method = "GET"
6
+ ).json ()
7
+
8
+ print (response )
Original file line number Diff line number Diff line change
1
+ name = " API Proxy tutorial"
Original file line number Diff line number Diff line change
1
+ <!DOCTYPE html>
2
+ < html lang ="en ">
3
+ < head >
4
+ < title > API Secrets Tutorial</ title >
5
+
6
+ <!-- Recommended meta tags -->
7
+ < meta charset ="UTF-8 ">
8
+ < meta name ="viewport " content ="width=device-width,initial-scale=1.0 ">
9
+
10
+ <!-- PyScript CSS -->
11
+ < link rel ="stylesheet " href ="https://pyscript.net/releases/2024.5.2/core.css ">
12
+
13
+ <!-- This script tag bootstraps PyScript -->
14
+ < script type ="module " src ="https://pyscript.net/releases/2024.5.2/core.js "> </ script >
15
+ </ head >
16
+ < body >
17
+ < script type ="py " src ="./main.py " config ="./pyscript.toml " async terminal > </ script >
18
+ </ body >
19
+ </ html >
Original file line number Diff line number Diff line change
1
+ from pyscript import fetch
2
+
3
+ response = await fetch (
4
+ "https://examples.pyscriptapps.com/secrets/api/proxies/list-secrets" ,
5
+ method = "GET"
6
+ ).json ()
7
+
8
+
9
+ print (response )
10
+
11
+
Original file line number Diff line number Diff line change
1
+ name = " API Secrets Tutorial"
You can’t perform that action at this time.
0 commit comments