ezquiz 0.2.0__py3-none-any.whl → 0.2.2__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
ezquiz/apigame.py
CHANGED
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
from pathlib import Path
|
|
2
2
|
from random import choice
|
|
3
|
-
from typing import Literal
|
|
4
3
|
|
|
5
4
|
import uvicorn
|
|
6
5
|
from fastapi import FastAPI, Request
|
|
@@ -21,10 +20,12 @@ class APIGame:
|
|
|
21
20
|
|
|
22
21
|
def start(
|
|
23
22
|
self,
|
|
24
|
-
|
|
25
|
-
|
|
23
|
+
*,
|
|
24
|
+
host: str,
|
|
25
|
+
port: int,
|
|
26
|
+
**fastapi_kw,
|
|
26
27
|
):
|
|
27
|
-
app = FastAPI()
|
|
28
|
+
app = FastAPI(**fastapi_kw)
|
|
28
29
|
|
|
29
30
|
templates = Jinja2Templates(directory=Path(__file__).parent / "templates")
|
|
30
31
|
|
|
@@ -83,4 +84,4 @@ class APIGame:
|
|
|
83
84
|
}
|
|
84
85
|
)
|
|
85
86
|
|
|
86
|
-
uvicorn.run(app)
|
|
87
|
+
uvicorn.run(app, host=host, port=port)
|
ezquiz/templates/index.html
CHANGED
|
@@ -262,7 +262,7 @@
|
|
|
262
262
|
// Fetch next question
|
|
263
263
|
async function fetchNextQuestion() {
|
|
264
264
|
try {
|
|
265
|
-
const response = await fetch('
|
|
265
|
+
const response = await fetch('api/next', {
|
|
266
266
|
method: 'POST',
|
|
267
267
|
headers: {
|
|
268
268
|
'Content-Type': 'application/json'
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
}
|
|
304
304
|
|
|
305
305
|
try {
|
|
306
|
-
const response = await fetch('
|
|
306
|
+
const response = await fetch('api/submit', {
|
|
307
307
|
method: 'POST',
|
|
308
308
|
headers: {
|
|
309
309
|
'Content-Type': 'application/json'
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ezquiz
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Add your description here
|
|
5
5
|
Author-email: Alejandro Rodriguez <alejandro.rodriguez@alexanderthamm.com>
|
|
6
|
-
Requires-Python: >=3.
|
|
6
|
+
Requires-Python: >=3.12
|
|
7
7
|
Requires-Dist: fastapi>=0.128.0
|
|
8
8
|
Requires-Dist: jinja2>=3.1.6
|
|
9
9
|
Requires-Dist: uvicorn>=0.40.0
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
ezquiz/__init__.py,sha256=_Ycs0PzsU0K53tGDxZMRP1kQ-TvIrF2_hTYNniOymxo,109
|
|
2
|
+
ezquiz/apigame.py,sha256=ljBYxvxkB2jyZYanxG5viso2mM2elOEnfvaVeyxsSnU,2596
|
|
3
|
+
ezquiz/cligame.py,sha256=h_bs4Cm-44ibzpacIycEGaprnFWYKsyTJuyoeaGEYRk,325
|
|
4
|
+
ezquiz/ezquiz.py,sha256=ix00WYO6Zy2EFaS1xHvW6dyzGIz7OdTRac7MCcHuGI4,941
|
|
5
|
+
ezquiz/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
+
ezquiz/templates/index.html,sha256=iJnVwbbP1V-hEusURh8rUKya1MoMl6Yq-8MdOcsWAmI,17260
|
|
7
|
+
ezquiz-0.2.2.dist-info/METADATA,sha256=xgwSS6h0_HgkS26cHzxqg22zmAWHIs44IxqhGqOHWXk,276
|
|
8
|
+
ezquiz-0.2.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
9
|
+
ezquiz-0.2.2.dist-info/RECORD,,
|
ezquiz-0.2.0.dist-info/RECORD
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
ezquiz/__init__.py,sha256=_Ycs0PzsU0K53tGDxZMRP1kQ-TvIrF2_hTYNniOymxo,109
|
|
2
|
-
ezquiz/apigame.py,sha256=0AH_Ll4Mxg8FW9UZVei--tXp6rTI9wuEQETnFFX2mR4,2618
|
|
3
|
-
ezquiz/cligame.py,sha256=h_bs4Cm-44ibzpacIycEGaprnFWYKsyTJuyoeaGEYRk,325
|
|
4
|
-
ezquiz/ezquiz.py,sha256=ix00WYO6Zy2EFaS1xHvW6dyzGIz7OdTRac7MCcHuGI4,941
|
|
5
|
-
ezquiz/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
6
|
-
ezquiz/templates/index.html,sha256=2_XCV4ic4_Dfcqsyg0MxvilCAQ06lvKxjOBa9YzLkM0,17262
|
|
7
|
-
ezquiz-0.2.0.dist-info/METADATA,sha256=vnLPjO6_NafAFZOWnYyTruX3fS-G-4j6mJ3XWocuQbs,276
|
|
8
|
-
ezquiz-0.2.0.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
9
|
-
ezquiz-0.2.0.dist-info/RECORD,,
|
|
File without changes
|