Spaces:
Running
Running
Kang Suhyun
commited on
Commit
•
762adde
1
Parent(s):
a4e8fcb
[#92] Add a module for simple rate limiting (#94)
Browse files* [#92] Add a module for simple rate limiting
Changes:
- Add a module for simple rate limiting to prevent abuse
- Remove the API page
* review
* cookie
* remove
* update
* update
* 3 sec
* review
* review
* review
* review
* update
* review
* review
* review
- app.py +5 -2
- poetry.lock +303 -257
- pyproject.toml +1 -0
- rate_limit.py +112 -0
- requirements.txt +19 -17
- response.py +22 -1
app.py
CHANGED
@@ -13,6 +13,7 @@ from leaderboard import db
|
|
13 |
from leaderboard import SUPPORTED_LANGUAGES
|
14 |
from model import check_models
|
15 |
from model import supported_models
|
|
|
16 |
import response
|
17 |
from response import get_responses
|
18 |
|
@@ -79,6 +80,8 @@ css = """
|
|
79 |
"""
|
80 |
|
81 |
with gr.Blocks(title="Arena", css=css) as app:
|
|
|
|
|
82 |
with gr.Row():
|
83 |
category_radio = gr.Radio(
|
84 |
choices=[category.value for category in response.Category],
|
@@ -199,5 +202,5 @@ if __name__ == "__main__":
|
|
199 |
check_models(supported_models)
|
200 |
|
201 |
# We need to enable queue to use generators.
|
202 |
-
app.queue()
|
203 |
-
app.launch(debug=True)
|
|
|
13 |
from leaderboard import SUPPORTED_LANGUAGES
|
14 |
from model import check_models
|
15 |
from model import supported_models
|
16 |
+
from rate_limit import set_token
|
17 |
import response
|
18 |
from response import get_responses
|
19 |
|
|
|
80 |
"""
|
81 |
|
82 |
with gr.Blocks(title="Arena", css=css) as app:
|
83 |
+
set_token(app)
|
84 |
+
|
85 |
with gr.Row():
|
86 |
category_radio = gr.Radio(
|
87 |
choices=[category.value for category in response.Category],
|
|
|
202 |
check_models(supported_models)
|
203 |
|
204 |
# We need to enable queue to use generators.
|
205 |
+
app.queue(api_open=False)
|
206 |
+
app.launch(debug=True, show_api=False)
|
poetry.lock
CHANGED
@@ -175,6 +175,34 @@ doc = ["Sphinx (>=7)", "packaging", "sphinx-autodoc-typehints (>=1.2.0)", "sphin
|
|
175 |
test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"]
|
176 |
trio = ["trio (>=0.23)"]
|
177 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
[[package]]
|
179 |
name = "attrs"
|
180 |
version = "23.2.0"
|
@@ -227,13 +255,13 @@ files = [
|
|
227 |
|
228 |
[[package]]
|
229 |
name = "certifi"
|
230 |
-
version = "2024.
|
231 |
description = "Python package for providing Mozilla's CA Bundle."
|
232 |
optional = false
|
233 |
python-versions = ">=3.6"
|
234 |
files = [
|
235 |
-
{file = "certifi-2024.
|
236 |
-
{file = "certifi-2024.
|
237 |
]
|
238 |
|
239 |
[[package]]
|
@@ -489,43 +517,43 @@ test-no-images = ["pytest", "pytest-cov", "pytest-xdist", "wurlitzer"]
|
|
489 |
|
490 |
[[package]]
|
491 |
name = "cryptography"
|
492 |
-
version = "42.0.
|
493 |
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
|
494 |
optional = false
|
495 |
python-versions = ">=3.7"
|
496 |
files = [
|
497 |
-
{file = "cryptography-42.0.
|
498 |
-
{file = "cryptography-42.0.
|
499 |
-
{file = "cryptography-42.0.
|
500 |
-
{file = "cryptography-42.0.
|
501 |
-
{file = "cryptography-42.0.
|
502 |
-
{file = "cryptography-42.0.
|
503 |
-
{file = "cryptography-42.0.
|
504 |
-
{file = "cryptography-42.0.
|
505 |
-
{file = "cryptography-42.0.
|
506 |
-
{file = "cryptography-42.0.
|
507 |
-
{file = "cryptography-42.0.
|
508 |
-
{file = "cryptography-42.0.
|
509 |
-
{file = "cryptography-42.0.
|
510 |
-
{file = "cryptography-42.0.
|
511 |
-
{file = "cryptography-42.0.
|
512 |
-
{file = "cryptography-42.0.
|
513 |
-
{file = "cryptography-42.0.
|
514 |
-
{file = "cryptography-42.0.
|
515 |
-
{file = "cryptography-42.0.
|
516 |
-
{file = "cryptography-42.0.
|
517 |
-
{file = "cryptography-42.0.
|
518 |
-
{file = "cryptography-42.0.
|
519 |
-
{file = "cryptography-42.0.
|
520 |
-
{file = "cryptography-42.0.
|
521 |
-
{file = "cryptography-42.0.
|
522 |
-
{file = "cryptography-42.0.
|
523 |
-
{file = "cryptography-42.0.
|
524 |
-
{file = "cryptography-42.0.
|
525 |
-
{file = "cryptography-42.0.
|
526 |
-
{file = "cryptography-42.0.
|
527 |
-
{file = "cryptography-42.0.
|
528 |
-
{file = "cryptography-42.0.
|
529 |
]
|
530 |
|
531 |
[package.dependencies]
|
@@ -693,53 +721,53 @@ pyjwt = {version = ">=2.5.0", extras = ["crypto"]}
|
|
693 |
|
694 |
[[package]]
|
695 |
name = "fonttools"
|
696 |
-
version = "4.
|
697 |
description = "Tools to manipulate font files"
|
698 |
optional = false
|
699 |
python-versions = ">=3.8"
|
700 |
files = [
|
701 |
-
{file = "fonttools-4.
|
702 |
-
{file = "fonttools-4.
|
703 |
-
{file = "fonttools-4.
|
704 |
-
{file = "fonttools-4.
|
705 |
-
{file = "fonttools-4.
|
706 |
-
{file = "fonttools-4.
|
707 |
-
{file = "fonttools-4.
|
708 |
-
{file = "fonttools-4.
|
709 |
-
{file = "fonttools-4.
|
710 |
-
{file = "fonttools-4.
|
711 |
-
{file = "fonttools-4.
|
712 |
-
{file = "fonttools-4.
|
713 |
-
{file = "fonttools-4.
|
714 |
-
{file = "fonttools-4.
|
715 |
-
{file = "fonttools-4.
|
716 |
-
{file = "fonttools-4.
|
717 |
-
{file = "fonttools-4.
|
718 |
-
{file = "fonttools-4.
|
719 |
-
{file = "fonttools-4.
|
720 |
-
{file = "fonttools-4.
|
721 |
-
{file = "fonttools-4.
|
722 |
-
{file = "fonttools-4.
|
723 |
-
{file = "fonttools-4.
|
724 |
-
{file = "fonttools-4.
|
725 |
-
{file = "fonttools-4.
|
726 |
-
{file = "fonttools-4.
|
727 |
-
{file = "fonttools-4.
|
728 |
-
{file = "fonttools-4.
|
729 |
-
{file = "fonttools-4.
|
730 |
-
{file = "fonttools-4.
|
731 |
-
{file = "fonttools-4.
|
732 |
-
{file = "fonttools-4.
|
733 |
-
{file = "fonttools-4.
|
734 |
-
{file = "fonttools-4.
|
735 |
-
{file = "fonttools-4.
|
736 |
-
{file = "fonttools-4.
|
737 |
-
{file = "fonttools-4.
|
738 |
-
{file = "fonttools-4.
|
739 |
-
{file = "fonttools-4.
|
740 |
-
{file = "fonttools-4.
|
741 |
-
{file = "fonttools-4.
|
742 |
-
{file = "fonttools-4.
|
743 |
]
|
744 |
|
745 |
[package.extras]
|
@@ -844,13 +872,13 @@ files = [
|
|
844 |
|
845 |
[[package]]
|
846 |
name = "fsspec"
|
847 |
-
version = "2024.
|
848 |
description = "File-system specification"
|
849 |
optional = false
|
850 |
python-versions = ">=3.8"
|
851 |
files = [
|
852 |
-
{file = "fsspec-2024.
|
853 |
-
{file = "fsspec-2024.
|
854 |
]
|
855 |
|
856 |
[package.extras]
|
@@ -859,6 +887,7 @@ adl = ["adlfs"]
|
|
859 |
arrow = ["pyarrow (>=1)"]
|
860 |
dask = ["dask", "distributed"]
|
861 |
dev = ["pre-commit", "ruff"]
|
|
|
862 |
dropbox = ["dropbox", "dropboxdrivefs", "requests"]
|
863 |
full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"]
|
864 |
fuse = ["fusepy"]
|
@@ -924,13 +953,13 @@ grpcio-gcp = ["grpcio-gcp (>=0.2.2,<1.0.dev0)"]
|
|
924 |
|
925 |
[[package]]
|
926 |
name = "google-api-python-client"
|
927 |
-
version = "2.
|
928 |
description = "Google API Client Library for Python"
|
929 |
optional = false
|
930 |
python-versions = ">=3.7"
|
931 |
files = [
|
932 |
-
{file = "google-api-python-client-2.
|
933 |
-
{file = "google_api_python_client-2.
|
934 |
]
|
935 |
|
936 |
[package.dependencies]
|
@@ -1177,31 +1206,31 @@ requests = ["requests (>=2.18.0,<3.0.0dev)"]
|
|
1177 |
|
1178 |
[[package]]
|
1179 |
name = "googleapis-common-protos"
|
1180 |
-
version = "1.63.
|
1181 |
description = "Common protobufs used in Google APIs"
|
1182 |
optional = false
|
1183 |
python-versions = ">=3.7"
|
1184 |
files = [
|
1185 |
-
{file = "googleapis-common-protos-1.63.
|
1186 |
-
{file = "googleapis_common_protos-1.63.
|
1187 |
]
|
1188 |
|
1189 |
[package.dependencies]
|
1190 |
grpcio = {version = ">=1.44.0,<2.0.0.dev0", optional = true, markers = "extra == \"grpc\""}
|
1191 |
-
protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<
|
1192 |
|
1193 |
[package.extras]
|
1194 |
grpc = ["grpcio (>=1.44.0,<2.0.0.dev0)"]
|
1195 |
|
1196 |
[[package]]
|
1197 |
name = "gradio"
|
1198 |
-
version = "4.
|
1199 |
description = "Python library for easily interacting with trained machine learning models"
|
1200 |
optional = false
|
1201 |
python-versions = ">=3.8"
|
1202 |
files = [
|
1203 |
-
{file = "gradio-4.
|
1204 |
-
{file = "gradio-4.
|
1205 |
]
|
1206 |
|
1207 |
[package.dependencies]
|
@@ -1216,7 +1245,7 @@ importlib-resources = ">=1.3,<7.0"
|
|
1216 |
jinja2 = "<4.0"
|
1217 |
markupsafe = ">=2.0,<3.0"
|
1218 |
matplotlib = ">=3.0,<4.0"
|
1219 |
-
numpy = ">=1.0,<
|
1220 |
orjson = ">=3.0,<4.0"
|
1221 |
packaging = "*"
|
1222 |
pandas = ">=1.0,<3.0"
|
@@ -1273,61 +1302,61 @@ protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.1 || >4.21.1,<4
|
|
1273 |
|
1274 |
[[package]]
|
1275 |
name = "grpcio"
|
1276 |
-
version = "1.64.
|
1277 |
description = "HTTP/2-based RPC framework"
|
1278 |
optional = false
|
1279 |
python-versions = ">=3.8"
|
1280 |
files = [
|
1281 |
-
{file = "grpcio-1.64.
|
1282 |
-
{file = "grpcio-1.64.
|
1283 |
-
{file = "grpcio-1.64.
|
1284 |
-
{file = "grpcio-1.64.
|
1285 |
-
{file = "grpcio-1.64.
|
1286 |
-
{file = "grpcio-1.64.
|
1287 |
-
{file = "grpcio-1.64.
|
1288 |
-
{file = "grpcio-1.64.
|
1289 |
-
{file = "grpcio-1.64.
|
1290 |
-
{file = "grpcio-1.64.
|
1291 |
-
{file = "grpcio-1.64.
|
1292 |
-
{file = "grpcio-1.64.
|
1293 |
-
{file = "grpcio-1.64.
|
1294 |
-
{file = "grpcio-1.64.
|
1295 |
-
{file = "grpcio-1.64.
|
1296 |
-
{file = "grpcio-1.64.
|
1297 |
-
{file = "grpcio-1.64.
|
1298 |
-
{file = "grpcio-1.64.
|
1299 |
-
{file = "grpcio-1.64.
|
1300 |
-
{file = "grpcio-1.64.
|
1301 |
-
{file = "grpcio-1.64.
|
1302 |
-
{file = "grpcio-1.64.
|
1303 |
-
{file = "grpcio-1.64.
|
1304 |
-
{file = "grpcio-1.64.
|
1305 |
-
{file = "grpcio-1.64.
|
1306 |
-
{file = "grpcio-1.64.
|
1307 |
-
{file = "grpcio-1.64.
|
1308 |
-
{file = "grpcio-1.64.
|
1309 |
-
{file = "grpcio-1.64.
|
1310 |
-
{file = "grpcio-1.64.
|
1311 |
-
{file = "grpcio-1.64.
|
1312 |
-
{file = "grpcio-1.64.
|
1313 |
-
{file = "grpcio-1.64.
|
1314 |
-
{file = "grpcio-1.64.
|
1315 |
-
{file = "grpcio-1.64.
|
1316 |
-
{file = "grpcio-1.64.
|
1317 |
-
{file = "grpcio-1.64.
|
1318 |
-
{file = "grpcio-1.64.
|
1319 |
-
{file = "grpcio-1.64.
|
1320 |
-
{file = "grpcio-1.64.
|
1321 |
-
{file = "grpcio-1.64.
|
1322 |
-
{file = "grpcio-1.64.
|
1323 |
-
{file = "grpcio-1.64.
|
1324 |
-
{file = "grpcio-1.64.
|
1325 |
-
{file = "grpcio-1.64.
|
1326 |
-
{file = "grpcio-1.64.
|
1327 |
]
|
1328 |
|
1329 |
[package.extras]
|
1330 |
-
protobuf = ["grpcio-tools (>=1.64.
|
1331 |
|
1332 |
[[package]]
|
1333 |
name = "grpcio-status"
|
@@ -2291,13 +2320,13 @@ files = [
|
|
2291 |
|
2292 |
[[package]]
|
2293 |
name = "openai"
|
2294 |
-
version = "1.
|
2295 |
description = "The official Python library for the openai API"
|
2296 |
optional = false
|
2297 |
python-versions = ">=3.7.1"
|
2298 |
files = [
|
2299 |
-
{file = "openai-1.
|
2300 |
-
{file = "openai-1.
|
2301 |
]
|
2302 |
|
2303 |
[package.dependencies]
|
@@ -2611,18 +2640,18 @@ files = [
|
|
2611 |
|
2612 |
[[package]]
|
2613 |
name = "pydantic"
|
2614 |
-
version = "2.7.
|
2615 |
description = "Data validation using Python type hints"
|
2616 |
optional = false
|
2617 |
python-versions = ">=3.8"
|
2618 |
files = [
|
2619 |
-
{file = "pydantic-2.7.
|
2620 |
-
{file = "pydantic-2.7.
|
2621 |
]
|
2622 |
|
2623 |
[package.dependencies]
|
2624 |
annotated-types = ">=0.4.0"
|
2625 |
-
pydantic-core = "2.18.
|
2626 |
typing-extensions = ">=4.6.1"
|
2627 |
|
2628 |
[package.extras]
|
@@ -2630,90 +2659,90 @@ email = ["email-validator (>=2.0.0)"]
|
|
2630 |
|
2631 |
[[package]]
|
2632 |
name = "pydantic-core"
|
2633 |
-
version = "2.18.
|
2634 |
description = "Core functionality for Pydantic validation and serialization"
|
2635 |
optional = false
|
2636 |
python-versions = ">=3.8"
|
2637 |
files = [
|
2638 |
-
{file = "pydantic_core-2.18.
|
2639 |
-
{file = "pydantic_core-2.18.
|
2640 |
-
{file = "pydantic_core-2.18.
|
2641 |
-
{file = "pydantic_core-2.18.
|
2642 |
-
{file = "pydantic_core-2.18.
|
2643 |
-
{file = "pydantic_core-2.18.
|
2644 |
-
{file = "pydantic_core-2.18.
|
2645 |
-
{file = "pydantic_core-2.18.
|
2646 |
-
{file = "pydantic_core-2.18.
|
2647 |
-
{file = "pydantic_core-2.18.
|
2648 |
-
{file = "pydantic_core-2.18.
|
2649 |
-
{file = "pydantic_core-2.18.
|
2650 |
-
{file = "pydantic_core-2.18.
|
2651 |
-
{file = "pydantic_core-2.18.
|
2652 |
-
{file = "pydantic_core-2.18.
|
2653 |
-
{file = "pydantic_core-2.18.
|
2654 |
-
{file = "pydantic_core-2.18.
|
2655 |
-
{file = "pydantic_core-2.18.
|
2656 |
-
{file = "pydantic_core-2.18.
|
2657 |
-
{file = "pydantic_core-2.18.
|
2658 |
-
{file = "pydantic_core-2.18.
|
2659 |
-
{file = "pydantic_core-2.18.
|
2660 |
-
{file = "pydantic_core-2.18.
|
2661 |
-
{file = "pydantic_core-2.18.
|
2662 |
-
{file = "pydantic_core-2.18.
|
2663 |
-
{file = "pydantic_core-2.18.
|
2664 |
-
{file = "pydantic_core-2.18.
|
2665 |
-
{file = "pydantic_core-2.18.
|
2666 |
-
{file = "pydantic_core-2.18.
|
2667 |
-
{file = "pydantic_core-2.18.
|
2668 |
-
{file = "pydantic_core-2.18.
|
2669 |
-
{file = "pydantic_core-2.18.
|
2670 |
-
{file = "pydantic_core-2.18.
|
2671 |
-
{file = "pydantic_core-2.18.
|
2672 |
-
{file = "pydantic_core-2.18.
|
2673 |
-
{file = "pydantic_core-2.18.
|
2674 |
-
{file = "pydantic_core-2.18.
|
2675 |
-
{file = "pydantic_core-2.18.
|
2676 |
-
{file = "pydantic_core-2.18.
|
2677 |
-
{file = "pydantic_core-2.18.
|
2678 |
-
{file = "pydantic_core-2.18.
|
2679 |
-
{file = "pydantic_core-2.18.
|
2680 |
-
{file = "pydantic_core-2.18.
|
2681 |
-
{file = "pydantic_core-2.18.
|
2682 |
-
{file = "pydantic_core-2.18.
|
2683 |
-
{file = "pydantic_core-2.18.
|
2684 |
-
{file = "pydantic_core-2.18.
|
2685 |
-
{file = "pydantic_core-2.18.
|
2686 |
-
{file = "pydantic_core-2.18.
|
2687 |
-
{file = "pydantic_core-2.18.
|
2688 |
-
{file = "pydantic_core-2.18.
|
2689 |
-
{file = "pydantic_core-2.18.
|
2690 |
-
{file = "pydantic_core-2.18.
|
2691 |
-
{file = "pydantic_core-2.18.
|
2692 |
-
{file = "pydantic_core-2.18.
|
2693 |
-
{file = "pydantic_core-2.18.
|
2694 |
-
{file = "pydantic_core-2.18.
|
2695 |
-
{file = "pydantic_core-2.18.
|
2696 |
-
{file = "pydantic_core-2.18.
|
2697 |
-
{file = "pydantic_core-2.18.
|
2698 |
-
{file = "pydantic_core-2.18.
|
2699 |
-
{file = "pydantic_core-2.18.
|
2700 |
-
{file = "pydantic_core-2.18.
|
2701 |
-
{file = "pydantic_core-2.18.
|
2702 |
-
{file = "pydantic_core-2.18.
|
2703 |
-
{file = "pydantic_core-2.18.
|
2704 |
-
{file = "pydantic_core-2.18.
|
2705 |
-
{file = "pydantic_core-2.18.
|
2706 |
-
{file = "pydantic_core-2.18.
|
2707 |
-
{file = "pydantic_core-2.18.
|
2708 |
-
{file = "pydantic_core-2.18.
|
2709 |
-
{file = "pydantic_core-2.18.
|
2710 |
-
{file = "pydantic_core-2.18.
|
2711 |
-
{file = "pydantic_core-2.18.
|
2712 |
-
{file = "pydantic_core-2.18.
|
2713 |
-
{file = "pydantic_core-2.18.
|
2714 |
-
{file = "pydantic_core-2.18.
|
2715 |
-
{file = "pydantic_core-2.18.
|
2716 |
-
{file = "pydantic_core-2.18.
|
2717 |
]
|
2718 |
|
2719 |
[package.dependencies]
|
@@ -3157,28 +3186,28 @@ pyasn1 = ">=0.1.3"
|
|
3157 |
|
3158 |
[[package]]
|
3159 |
name = "ruff"
|
3160 |
-
version = "0.4.
|
3161 |
description = "An extremely fast Python linter and code formatter, written in Rust."
|
3162 |
optional = false
|
3163 |
python-versions = ">=3.7"
|
3164 |
files = [
|
3165 |
-
{file = "ruff-0.4.
|
3166 |
-
{file = "ruff-0.4.
|
3167 |
-
{file = "ruff-0.4.
|
3168 |
-
{file = "ruff-0.4.
|
3169 |
-
{file = "ruff-0.4.
|
3170 |
-
{file = "ruff-0.4.
|
3171 |
-
{file = "ruff-0.4.
|
3172 |
-
{file = "ruff-0.4.
|
3173 |
-
{file = "ruff-0.4.
|
3174 |
-
{file = "ruff-0.4.
|
3175 |
-
{file = "ruff-0.4.
|
3176 |
-
{file = "ruff-0.4.
|
3177 |
-
{file = "ruff-0.4.
|
3178 |
-
{file = "ruff-0.4.
|
3179 |
-
{file = "ruff-0.4.
|
3180 |
-
{file = "ruff-0.4.
|
3181 |
-
{file = "ruff-0.4.
|
3182 |
]
|
3183 |
|
3184 |
[[package]]
|
@@ -3476,13 +3505,13 @@ typing-extensions = ">=3.7.4.3"
|
|
3476 |
|
3477 |
[[package]]
|
3478 |
name = "typing-extensions"
|
3479 |
-
version = "4.12.
|
3480 |
description = "Backported and Experimental Type Hints for Python 3.8+"
|
3481 |
optional = false
|
3482 |
python-versions = ">=3.8"
|
3483 |
files = [
|
3484 |
-
{file = "typing_extensions-4.12.
|
3485 |
-
{file = "typing_extensions-4.12.
|
3486 |
]
|
3487 |
|
3488 |
[[package]]
|
@@ -3496,6 +3525,23 @@ files = [
|
|
3496 |
{file = "tzdata-2024.1.tar.gz", hash = "sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd"},
|
3497 |
]
|
3498 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3499 |
[[package]]
|
3500 |
name = "ujson"
|
3501 |
version = "5.10.0"
|
@@ -3613,13 +3659,13 @@ zstd = ["zstandard (>=0.18.0)"]
|
|
3613 |
|
3614 |
[[package]]
|
3615 |
name = "uvicorn"
|
3616 |
-
version = "0.30.
|
3617 |
description = "The lightning-fast ASGI server."
|
3618 |
optional = false
|
3619 |
python-versions = ">=3.8"
|
3620 |
files = [
|
3621 |
-
{file = "uvicorn-0.30.
|
3622 |
-
{file = "uvicorn-0.30.
|
3623 |
]
|
3624 |
|
3625 |
[package.dependencies]
|
@@ -3951,18 +3997,18 @@ multidict = ">=4.0"
|
|
3951 |
|
3952 |
[[package]]
|
3953 |
name = "zipp"
|
3954 |
-
version = "3.19.
|
3955 |
description = "Backport of pathlib-compatible object wrapper for zip files"
|
3956 |
optional = false
|
3957 |
python-versions = ">=3.8"
|
3958 |
files = [
|
3959 |
-
{file = "zipp-3.19.
|
3960 |
-
{file = "zipp-3.19.
|
3961 |
]
|
3962 |
|
3963 |
[package.extras]
|
3964 |
-
|
3965 |
-
|
3966 |
|
3967 |
[metadata]
|
3968 |
lock-version = "2.0"
|
|
|
175 |
test = ["anyio[trio]", "coverage[toml] (>=7)", "exceptiongroup (>=1.2.0)", "hypothesis (>=4.0)", "psutil (>=5.9)", "pytest (>=7.0)", "pytest-mock (>=3.6.1)", "trustme", "uvloop (>=0.17)"]
|
176 |
trio = ["trio (>=0.23)"]
|
177 |
|
178 |
+
[[package]]
|
179 |
+
name = "apscheduler"
|
180 |
+
version = "3.10.4"
|
181 |
+
description = "In-process task scheduler with Cron-like capabilities"
|
182 |
+
optional = false
|
183 |
+
python-versions = ">=3.6"
|
184 |
+
files = [
|
185 |
+
{file = "APScheduler-3.10.4-py3-none-any.whl", hash = "sha256:fb91e8a768632a4756a585f79ec834e0e27aad5860bac7eaa523d9ccefd87661"},
|
186 |
+
{file = "APScheduler-3.10.4.tar.gz", hash = "sha256:e6df071b27d9be898e486bc7940a7be50b4af2e9da7c08f0744a96d4bd4cef4a"},
|
187 |
+
]
|
188 |
+
|
189 |
+
[package.dependencies]
|
190 |
+
pytz = "*"
|
191 |
+
six = ">=1.4.0"
|
192 |
+
tzlocal = ">=2.0,<3.dev0 || >=4.dev0"
|
193 |
+
|
194 |
+
[package.extras]
|
195 |
+
doc = ["sphinx", "sphinx-rtd-theme"]
|
196 |
+
gevent = ["gevent"]
|
197 |
+
mongodb = ["pymongo (>=3.0)"]
|
198 |
+
redis = ["redis (>=3.0)"]
|
199 |
+
rethinkdb = ["rethinkdb (>=2.4.0)"]
|
200 |
+
sqlalchemy = ["sqlalchemy (>=1.4)"]
|
201 |
+
testing = ["pytest", "pytest-asyncio", "pytest-cov", "pytest-tornado5"]
|
202 |
+
tornado = ["tornado (>=4.3)"]
|
203 |
+
twisted = ["twisted"]
|
204 |
+
zookeeper = ["kazoo"]
|
205 |
+
|
206 |
[[package]]
|
207 |
name = "attrs"
|
208 |
version = "23.2.0"
|
|
|
255 |
|
256 |
[[package]]
|
257 |
name = "certifi"
|
258 |
+
version = "2024.6.2"
|
259 |
description = "Python package for providing Mozilla's CA Bundle."
|
260 |
optional = false
|
261 |
python-versions = ">=3.6"
|
262 |
files = [
|
263 |
+
{file = "certifi-2024.6.2-py3-none-any.whl", hash = "sha256:ddc6c8ce995e6987e7faf5e3f1b02b302836a0e5d98ece18392cb1a36c72ad56"},
|
264 |
+
{file = "certifi-2024.6.2.tar.gz", hash = "sha256:3cd43f1c6fa7dedc5899d69d3ad0398fd018ad1a17fba83ddaf78aa46c747516"},
|
265 |
]
|
266 |
|
267 |
[[package]]
|
|
|
517 |
|
518 |
[[package]]
|
519 |
name = "cryptography"
|
520 |
+
version = "42.0.8"
|
521 |
description = "cryptography is a package which provides cryptographic recipes and primitives to Python developers."
|
522 |
optional = false
|
523 |
python-versions = ">=3.7"
|
524 |
files = [
|
525 |
+
{file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_universal2.whl", hash = "sha256:81d8a521705787afe7a18d5bfb47ea9d9cc068206270aad0b96a725022e18d2e"},
|
526 |
+
{file = "cryptography-42.0.8-cp37-abi3-macosx_10_12_x86_64.whl", hash = "sha256:961e61cefdcb06e0c6d7e3a1b22ebe8b996eb2bf50614e89384be54c48c6b63d"},
|
527 |
+
{file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e3ec3672626e1b9e55afd0df6d774ff0e953452886e06e0f1eb7eb0c832e8902"},
|
528 |
+
{file = "cryptography-42.0.8-cp37-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e599b53fd95357d92304510fb7bda8523ed1f79ca98dce2f43c115950aa78801"},
|
529 |
+
{file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:5226d5d21ab681f432a9c1cf8b658c0cb02533eece706b155e5fbd8a0cdd3949"},
|
530 |
+
{file = "cryptography-42.0.8-cp37-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:6b7c4f03ce01afd3b76cf69a5455caa9cfa3de8c8f493e0d3ab7d20611c8dae9"},
|
531 |
+
{file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:2346b911eb349ab547076f47f2e035fc8ff2c02380a7cbbf8d87114fa0f1c583"},
|
532 |
+
{file = "cryptography-42.0.8-cp37-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:ad803773e9df0b92e0a817d22fd8a3675493f690b96130a5e24f1b8fabbea9c7"},
|
533 |
+
{file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:2f66d9cd9147ee495a8374a45ca445819f8929a3efcd2e3df6428e46c3cbb10b"},
|
534 |
+
{file = "cryptography-42.0.8-cp37-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:d45b940883a03e19e944456a558b67a41160e367a719833c53de6911cabba2b7"},
|
535 |
+
{file = "cryptography-42.0.8-cp37-abi3-win32.whl", hash = "sha256:a0c5b2b0585b6af82d7e385f55a8bc568abff8923af147ee3c07bd8b42cda8b2"},
|
536 |
+
{file = "cryptography-42.0.8-cp37-abi3-win_amd64.whl", hash = "sha256:57080dee41209e556a9a4ce60d229244f7a66ef52750f813bfbe18959770cfba"},
|
537 |
+
{file = "cryptography-42.0.8-cp39-abi3-macosx_10_12_universal2.whl", hash = "sha256:dea567d1b0e8bc5764b9443858b673b734100c2871dc93163f58c46a97a83d28"},
|
538 |
+
{file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:c4783183f7cb757b73b2ae9aed6599b96338eb957233c58ca8f49a49cc32fd5e"},
|
539 |
+
{file = "cryptography-42.0.8-cp39-abi3-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:a0608251135d0e03111152e41f0cc2392d1e74e35703960d4190b2e0f4ca9c70"},
|
540 |
+
{file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_aarch64.whl", hash = "sha256:dc0fdf6787f37b1c6b08e6dfc892d9d068b5bdb671198c72072828b80bd5fe4c"},
|
541 |
+
{file = "cryptography-42.0.8-cp39-abi3-manylinux_2_28_x86_64.whl", hash = "sha256:9c0c1716c8447ee7dbf08d6db2e5c41c688544c61074b54fc4564196f55c25a7"},
|
542 |
+
{file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_aarch64.whl", hash = "sha256:fff12c88a672ab9c9c1cf7b0c80e3ad9e2ebd9d828d955c126be4fd3e5578c9e"},
|
543 |
+
{file = "cryptography-42.0.8-cp39-abi3-musllinux_1_1_x86_64.whl", hash = "sha256:cafb92b2bc622cd1aa6a1dce4b93307792633f4c5fe1f46c6b97cf67073ec961"},
|
544 |
+
{file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_aarch64.whl", hash = "sha256:31f721658a29331f895a5a54e7e82075554ccfb8b163a18719d342f5ffe5ecb1"},
|
545 |
+
{file = "cryptography-42.0.8-cp39-abi3-musllinux_1_2_x86_64.whl", hash = "sha256:b297f90c5723d04bcc8265fc2a0f86d4ea2e0f7ab4b6994459548d3a6b992a14"},
|
546 |
+
{file = "cryptography-42.0.8-cp39-abi3-win32.whl", hash = "sha256:2f88d197e66c65be5e42cd72e5c18afbfae3f741742070e3019ac8f4ac57262c"},
|
547 |
+
{file = "cryptography-42.0.8-cp39-abi3-win_amd64.whl", hash = "sha256:fa76fbb7596cc5839320000cdd5d0955313696d9511debab7ee7278fc8b5c84a"},
|
548 |
+
{file = "cryptography-42.0.8-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:ba4f0a211697362e89ad822e667d8d340b4d8d55fae72cdd619389fb5912eefe"},
|
549 |
+
{file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:81884c4d096c272f00aeb1f11cf62ccd39763581645b0812e99a91505fa48e0c"},
|
550 |
+
{file = "cryptography-42.0.8-pp310-pypy310_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:c9bb2ae11bfbab395bdd072985abde58ea9860ed84e59dbc0463a5d0159f5b71"},
|
551 |
+
{file = "cryptography-42.0.8-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:7016f837e15b0a1c119d27ecd89b3515f01f90a8615ed5e9427e30d9cdbfed3d"},
|
552 |
+
{file = "cryptography-42.0.8-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:5a94eccb2a81a309806027e1670a358b99b8fe8bfe9f8d329f27d72c094dde8c"},
|
553 |
+
{file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_aarch64.whl", hash = "sha256:dec9b018df185f08483f294cae6ccac29e7a6e0678996587363dc352dc65c842"},
|
554 |
+
{file = "cryptography-42.0.8-pp39-pypy39_pp73-manylinux_2_28_x86_64.whl", hash = "sha256:343728aac38decfdeecf55ecab3264b015be68fc2816ca800db649607aeee648"},
|
555 |
+
{file = "cryptography-42.0.8-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:013629ae70b40af70c9a7a5db40abe5d9054e6f4380e50ce769947b73bf3caad"},
|
556 |
+
{file = "cryptography-42.0.8.tar.gz", hash = "sha256:8d09d05439ce7baa8e9e95b07ec5b6c886f548deb7e0f69ef25f64b3bce842f2"},
|
557 |
]
|
558 |
|
559 |
[package.dependencies]
|
|
|
721 |
|
722 |
[[package]]
|
723 |
name = "fonttools"
|
724 |
+
version = "4.53.0"
|
725 |
description = "Tools to manipulate font files"
|
726 |
optional = false
|
727 |
python-versions = ">=3.8"
|
728 |
files = [
|
729 |
+
{file = "fonttools-4.53.0-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:52a6e0a7a0bf611c19bc8ec8f7592bdae79c8296c70eb05917fd831354699b20"},
|
730 |
+
{file = "fonttools-4.53.0-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:099634631b9dd271d4a835d2b2a9e042ccc94ecdf7e2dd9f7f34f7daf333358d"},
|
731 |
+
{file = "fonttools-4.53.0-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:e40013572bfb843d6794a3ce076c29ef4efd15937ab833f520117f8eccc84fd6"},
|
732 |
+
{file = "fonttools-4.53.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:715b41c3e231f7334cbe79dfc698213dcb7211520ec7a3bc2ba20c8515e8a3b5"},
|
733 |
+
{file = "fonttools-4.53.0-cp310-cp310-musllinux_1_2_aarch64.whl", hash = "sha256:74ae2441731a05b44d5988d3ac2cf784d3ee0a535dbed257cbfff4be8bb49eb9"},
|
734 |
+
{file = "fonttools-4.53.0-cp310-cp310-musllinux_1_2_x86_64.whl", hash = "sha256:95db0c6581a54b47c30860d013977b8a14febc206c8b5ff562f9fe32738a8aca"},
|
735 |
+
{file = "fonttools-4.53.0-cp310-cp310-win32.whl", hash = "sha256:9cd7a6beec6495d1dffb1033d50a3f82dfece23e9eb3c20cd3c2444d27514068"},
|
736 |
+
{file = "fonttools-4.53.0-cp310-cp310-win_amd64.whl", hash = "sha256:daaef7390e632283051e3cf3e16aff2b68b247e99aea916f64e578c0449c9c68"},
|
737 |
+
{file = "fonttools-4.53.0-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:a209d2e624ba492df4f3bfad5996d1f76f03069c6133c60cd04f9a9e715595ec"},
|
738 |
+
{file = "fonttools-4.53.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:4f520d9ac5b938e6494f58a25c77564beca7d0199ecf726e1bd3d56872c59749"},
|
739 |
+
{file = "fonttools-4.53.0-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:eceef49f457253000e6a2d0f7bd08ff4e9fe96ec4ffce2dbcb32e34d9c1b8161"},
|
740 |
+
{file = "fonttools-4.53.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:fa1f3e34373aa16045484b4d9d352d4c6b5f9f77ac77a178252ccbc851e8b2ee"},
|
741 |
+
{file = "fonttools-4.53.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:28d072169fe8275fb1a0d35e3233f6df36a7e8474e56cb790a7258ad822b6fd6"},
|
742 |
+
{file = "fonttools-4.53.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4a2a6ba400d386e904fd05db81f73bee0008af37799a7586deaa4aef8cd5971e"},
|
743 |
+
{file = "fonttools-4.53.0-cp311-cp311-win32.whl", hash = "sha256:bb7273789f69b565d88e97e9e1da602b4ee7ba733caf35a6c2affd4334d4f005"},
|
744 |
+
{file = "fonttools-4.53.0-cp311-cp311-win_amd64.whl", hash = "sha256:9fe9096a60113e1d755e9e6bda15ef7e03391ee0554d22829aa506cdf946f796"},
|
745 |
+
{file = "fonttools-4.53.0-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:d8f191a17369bd53a5557a5ee4bab91d5330ca3aefcdf17fab9a497b0e7cff7a"},
|
746 |
+
{file = "fonttools-4.53.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:93156dd7f90ae0a1b0e8871032a07ef3178f553f0c70c386025a808f3a63b1f4"},
|
747 |
+
{file = "fonttools-4.53.0-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:bff98816cb144fb7b85e4b5ba3888a33b56ecef075b0e95b95bcd0a5fbf20f06"},
|
748 |
+
{file = "fonttools-4.53.0-cp312-cp312-manylinux_2_5_x86_64.manylinux1_x86_64.manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:973d030180eca8255b1bce6ffc09ef38a05dcec0e8320cc9b7bcaa65346f341d"},
|
749 |
+
{file = "fonttools-4.53.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:c4ee5a24e281fbd8261c6ab29faa7fd9a87a12e8c0eed485b705236c65999109"},
|
750 |
+
{file = "fonttools-4.53.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:bd5bc124fae781a4422f61b98d1d7faa47985f663a64770b78f13d2c072410c2"},
|
751 |
+
{file = "fonttools-4.53.0-cp312-cp312-win32.whl", hash = "sha256:a239afa1126b6a619130909c8404070e2b473dd2b7fc4aacacd2e763f8597fea"},
|
752 |
+
{file = "fonttools-4.53.0-cp312-cp312-win_amd64.whl", hash = "sha256:45b4afb069039f0366a43a5d454bc54eea942bfb66b3fc3e9a2c07ef4d617380"},
|
753 |
+
{file = "fonttools-4.53.0-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:93bc9e5aaa06ff928d751dc6be889ff3e7d2aa393ab873bc7f6396a99f6fbb12"},
|
754 |
+
{file = "fonttools-4.53.0-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:2367d47816cc9783a28645bc1dac07f8ffc93e0f015e8c9fc674a5b76a6da6e4"},
|
755 |
+
{file = "fonttools-4.53.0-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:907fa0b662dd8fc1d7c661b90782ce81afb510fc4b7aa6ae7304d6c094b27bce"},
|
756 |
+
{file = "fonttools-4.53.0-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:3e0ad3c6ea4bd6a289d958a1eb922767233f00982cf0fe42b177657c86c80a8f"},
|
757 |
+
{file = "fonttools-4.53.0-cp38-cp38-musllinux_1_2_aarch64.whl", hash = "sha256:73121a9b7ff93ada888aaee3985a88495489cc027894458cb1a736660bdfb206"},
|
758 |
+
{file = "fonttools-4.53.0-cp38-cp38-musllinux_1_2_x86_64.whl", hash = "sha256:ee595d7ba9bba130b2bec555a40aafa60c26ce68ed0cf509983e0f12d88674fd"},
|
759 |
+
{file = "fonttools-4.53.0-cp38-cp38-win32.whl", hash = "sha256:fca66d9ff2ac89b03f5aa17e0b21a97c21f3491c46b583bb131eb32c7bab33af"},
|
760 |
+
{file = "fonttools-4.53.0-cp38-cp38-win_amd64.whl", hash = "sha256:31f0e3147375002aae30696dd1dc596636abbd22fca09d2e730ecde0baad1d6b"},
|
761 |
+
{file = "fonttools-4.53.0-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7d6166192dcd925c78a91d599b48960e0a46fe565391c79fe6de481ac44d20ac"},
|
762 |
+
{file = "fonttools-4.53.0-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:ef50ec31649fbc3acf6afd261ed89d09eb909b97cc289d80476166df8438524d"},
|
763 |
+
{file = "fonttools-4.53.0-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:7f193f060391a455920d61684a70017ef5284ccbe6023bb056e15e5ac3de11d1"},
|
764 |
+
{file = "fonttools-4.53.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:ba9f09ff17f947392a855e3455a846f9855f6cf6bec33e9a427d3c1d254c712f"},
|
765 |
+
{file = "fonttools-4.53.0-cp39-cp39-musllinux_1_2_aarch64.whl", hash = "sha256:0c555e039d268445172b909b1b6bdcba42ada1cf4a60e367d68702e3f87e5f64"},
|
766 |
+
{file = "fonttools-4.53.0-cp39-cp39-musllinux_1_2_x86_64.whl", hash = "sha256:5a4788036201c908079e89ae3f5399b33bf45b9ea4514913f4dbbe4fac08efe0"},
|
767 |
+
{file = "fonttools-4.53.0-cp39-cp39-win32.whl", hash = "sha256:d1a24f51a3305362b94681120c508758a88f207fa0a681c16b5a4172e9e6c7a9"},
|
768 |
+
{file = "fonttools-4.53.0-cp39-cp39-win_amd64.whl", hash = "sha256:1e677bfb2b4bd0e5e99e0f7283e65e47a9814b0486cb64a41adf9ef110e078f2"},
|
769 |
+
{file = "fonttools-4.53.0-py3-none-any.whl", hash = "sha256:6b4f04b1fbc01a3569d63359f2227c89ab294550de277fd09d8fca6185669fa4"},
|
770 |
+
{file = "fonttools-4.53.0.tar.gz", hash = "sha256:c93ed66d32de1559b6fc348838c7572d5c0ac1e4a258e76763a5caddd8944002"},
|
771 |
]
|
772 |
|
773 |
[package.extras]
|
|
|
872 |
|
873 |
[[package]]
|
874 |
name = "fsspec"
|
875 |
+
version = "2024.6.0"
|
876 |
description = "File-system specification"
|
877 |
optional = false
|
878 |
python-versions = ">=3.8"
|
879 |
files = [
|
880 |
+
{file = "fsspec-2024.6.0-py3-none-any.whl", hash = "sha256:58d7122eb8a1a46f7f13453187bfea4972d66bf01618d37366521b1998034cee"},
|
881 |
+
{file = "fsspec-2024.6.0.tar.gz", hash = "sha256:f579960a56e6d8038a9efc8f9c77279ec12e6299aa86b0769a7e9c46b94527c2"},
|
882 |
]
|
883 |
|
884 |
[package.extras]
|
|
|
887 |
arrow = ["pyarrow (>=1)"]
|
888 |
dask = ["dask", "distributed"]
|
889 |
dev = ["pre-commit", "ruff"]
|
890 |
+
doc = ["numpydoc", "sphinx", "sphinx-design", "sphinx-rtd-theme", "yarl"]
|
891 |
dropbox = ["dropbox", "dropboxdrivefs", "requests"]
|
892 |
full = ["adlfs", "aiohttp (!=4.0.0a0,!=4.0.0a1)", "dask", "distributed", "dropbox", "dropboxdrivefs", "fusepy", "gcsfs", "libarchive-c", "ocifs", "panel", "paramiko", "pyarrow (>=1)", "pygit2", "requests", "s3fs", "smbprotocol", "tqdm"]
|
893 |
fuse = ["fusepy"]
|
|
|
953 |
|
954 |
[[package]]
|
955 |
name = "google-api-python-client"
|
956 |
+
version = "2.132.0"
|
957 |
description = "Google API Client Library for Python"
|
958 |
optional = false
|
959 |
python-versions = ">=3.7"
|
960 |
files = [
|
961 |
+
{file = "google-api-python-client-2.132.0.tar.gz", hash = "sha256:d6340dc83b72d72333cee5d50f7dcfecbff66a8783164090e945f985ec4c374d"},
|
962 |
+
{file = "google_api_python_client-2.132.0-py2.py3-none-any.whl", hash = "sha256:cde87700bd4d37f39f5e940292c1c6cd0910990b5b01f50b1332a8cea38e8595"},
|
963 |
]
|
964 |
|
965 |
[package.dependencies]
|
|
|
1206 |
|
1207 |
[[package]]
|
1208 |
name = "googleapis-common-protos"
|
1209 |
+
version = "1.63.1"
|
1210 |
description = "Common protobufs used in Google APIs"
|
1211 |
optional = false
|
1212 |
python-versions = ">=3.7"
|
1213 |
files = [
|
1214 |
+
{file = "googleapis-common-protos-1.63.1.tar.gz", hash = "sha256:c6442f7a0a6b2a80369457d79e6672bb7dcbaab88e0848302497e3ec80780a6a"},
|
1215 |
+
{file = "googleapis_common_protos-1.63.1-py2.py3-none-any.whl", hash = "sha256:0e1c2cdfcbc354b76e4a211a35ea35d6926a835cba1377073c4861db904a1877"},
|
1216 |
]
|
1217 |
|
1218 |
[package.dependencies]
|
1219 |
grpcio = {version = ">=1.44.0,<2.0.0.dev0", optional = true, markers = "extra == \"grpc\""}
|
1220 |
+
protobuf = ">=3.19.5,<3.20.0 || >3.20.0,<3.20.1 || >3.20.1,<4.21.1 || >4.21.1,<4.21.2 || >4.21.2,<4.21.3 || >4.21.3,<4.21.4 || >4.21.4,<4.21.5 || >4.21.5,<6.0.0.dev0"
|
1221 |
|
1222 |
[package.extras]
|
1223 |
grpc = ["grpcio (>=1.44.0,<2.0.0.dev0)"]
|
1224 |
|
1225 |
[[package]]
|
1226 |
name = "gradio"
|
1227 |
+
version = "4.33.0"
|
1228 |
description = "Python library for easily interacting with trained machine learning models"
|
1229 |
optional = false
|
1230 |
python-versions = ">=3.8"
|
1231 |
files = [
|
1232 |
+
{file = "gradio-4.33.0-py3-none-any.whl", hash = "sha256:5d9a9c414927cb6cb535e0f4c64b735622859d1d1eb226a2ba39729a04e2c941"},
|
1233 |
+
{file = "gradio-4.33.0.tar.gz", hash = "sha256:ccf0535001e93ef354cdbfb632d76a12f200454e9fd6bf4fa593944d74016562"},
|
1234 |
]
|
1235 |
|
1236 |
[package.dependencies]
|
|
|
1245 |
jinja2 = "<4.0"
|
1246 |
markupsafe = ">=2.0,<3.0"
|
1247 |
matplotlib = ">=3.0,<4.0"
|
1248 |
+
numpy = ">=1.0,<3.0"
|
1249 |
orjson = ">=3.0,<4.0"
|
1250 |
packaging = "*"
|
1251 |
pandas = ">=1.0,<3.0"
|
|
|
1302 |
|
1303 |
[[package]]
|
1304 |
name = "grpcio"
|
1305 |
+
version = "1.64.1"
|
1306 |
description = "HTTP/2-based RPC framework"
|
1307 |
optional = false
|
1308 |
python-versions = ">=3.8"
|
1309 |
files = [
|
1310 |
+
{file = "grpcio-1.64.1-cp310-cp310-linux_armv7l.whl", hash = "sha256:55697ecec192bc3f2f3cc13a295ab670f51de29884ca9ae6cd6247df55df2502"},
|
1311 |
+
{file = "grpcio-1.64.1-cp310-cp310-macosx_12_0_universal2.whl", hash = "sha256:3b64ae304c175671efdaa7ec9ae2cc36996b681eb63ca39c464958396697daff"},
|
1312 |
+
{file = "grpcio-1.64.1-cp310-cp310-manylinux_2_17_aarch64.whl", hash = "sha256:bac71b4b28bc9af61efcdc7630b166440bbfbaa80940c9a697271b5e1dabbc61"},
|
1313 |
+
{file = "grpcio-1.64.1-cp310-cp310-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:6c024ffc22d6dc59000faf8ad781696d81e8e38f4078cb0f2630b4a3cf231a90"},
|
1314 |
+
{file = "grpcio-1.64.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e7cd5c1325f6808b8ae31657d281aadb2a51ac11ab081ae335f4f7fc44c1721d"},
|
1315 |
+
{file = "grpcio-1.64.1-cp310-cp310-musllinux_1_1_i686.whl", hash = "sha256:0a2813093ddb27418a4c99f9b1c223fab0b053157176a64cc9db0f4557b69bd9"},
|
1316 |
+
{file = "grpcio-1.64.1-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:2981c7365a9353f9b5c864595c510c983251b1ab403e05b1ccc70a3d9541a73b"},
|
1317 |
+
{file = "grpcio-1.64.1-cp310-cp310-win32.whl", hash = "sha256:1262402af5a511c245c3ae918167eca57342c72320dffae5d9b51840c4b2f86d"},
|
1318 |
+
{file = "grpcio-1.64.1-cp310-cp310-win_amd64.whl", hash = "sha256:19264fc964576ddb065368cae953f8d0514ecc6cb3da8903766d9fb9d4554c33"},
|
1319 |
+
{file = "grpcio-1.64.1-cp311-cp311-linux_armv7l.whl", hash = "sha256:58b1041e7c870bb30ee41d3090cbd6f0851f30ae4eb68228955d973d3efa2e61"},
|
1320 |
+
{file = "grpcio-1.64.1-cp311-cp311-macosx_10_9_universal2.whl", hash = "sha256:bbc5b1d78a7822b0a84c6f8917faa986c1a744e65d762ef6d8be9d75677af2ca"},
|
1321 |
+
{file = "grpcio-1.64.1-cp311-cp311-manylinux_2_17_aarch64.whl", hash = "sha256:5841dd1f284bd1b3d8a6eca3a7f062b06f1eec09b184397e1d1d43447e89a7ae"},
|
1322 |
+
{file = "grpcio-1.64.1-cp311-cp311-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:8caee47e970b92b3dd948371230fcceb80d3f2277b3bf7fbd7c0564e7d39068e"},
|
1323 |
+
{file = "grpcio-1.64.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:73819689c169417a4f978e562d24f2def2be75739c4bed1992435d007819da1b"},
|
1324 |
+
{file = "grpcio-1.64.1-cp311-cp311-musllinux_1_1_i686.whl", hash = "sha256:6503b64c8b2dfad299749cad1b595c650c91e5b2c8a1b775380fcf8d2cbba1e9"},
|
1325 |
+
{file = "grpcio-1.64.1-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:1de403fc1305fd96cfa75e83be3dee8538f2413a6b1685b8452301c7ba33c294"},
|
1326 |
+
{file = "grpcio-1.64.1-cp311-cp311-win32.whl", hash = "sha256:d4d29cc612e1332237877dfa7fe687157973aab1d63bd0f84cf06692f04c0367"},
|
1327 |
+
{file = "grpcio-1.64.1-cp311-cp311-win_amd64.whl", hash = "sha256:5e56462b05a6f860b72f0fa50dca06d5b26543a4e88d0396259a07dc30f4e5aa"},
|
1328 |
+
{file = "grpcio-1.64.1-cp312-cp312-linux_armv7l.whl", hash = "sha256:4657d24c8063e6095f850b68f2d1ba3b39f2b287a38242dcabc166453e950c59"},
|
1329 |
+
{file = "grpcio-1.64.1-cp312-cp312-macosx_10_9_universal2.whl", hash = "sha256:62b4e6eb7bf901719fce0ca83e3ed474ae5022bb3827b0a501e056458c51c0a1"},
|
1330 |
+
{file = "grpcio-1.64.1-cp312-cp312-manylinux_2_17_aarch64.whl", hash = "sha256:ee73a2f5ca4ba44fa33b4d7d2c71e2c8a9e9f78d53f6507ad68e7d2ad5f64a22"},
|
1331 |
+
{file = "grpcio-1.64.1-cp312-cp312-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:198908f9b22e2672a998870355e226a725aeab327ac4e6ff3a1399792ece4762"},
|
1332 |
+
{file = "grpcio-1.64.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:39b9d0acaa8d835a6566c640f48b50054f422d03e77e49716d4c4e8e279665a1"},
|
1333 |
+
{file = "grpcio-1.64.1-cp312-cp312-musllinux_1_1_i686.whl", hash = "sha256:5e42634a989c3aa6049f132266faf6b949ec2a6f7d302dbb5c15395b77d757eb"},
|
1334 |
+
{file = "grpcio-1.64.1-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:b1a82e0b9b3022799c336e1fc0f6210adc019ae84efb7321d668129d28ee1efb"},
|
1335 |
+
{file = "grpcio-1.64.1-cp312-cp312-win32.whl", hash = "sha256:55260032b95c49bee69a423c2f5365baa9369d2f7d233e933564d8a47b893027"},
|
1336 |
+
{file = "grpcio-1.64.1-cp312-cp312-win_amd64.whl", hash = "sha256:c1a786ac592b47573a5bb7e35665c08064a5d77ab88a076eec11f8ae86b3e3f6"},
|
1337 |
+
{file = "grpcio-1.64.1-cp38-cp38-linux_armv7l.whl", hash = "sha256:a011ac6c03cfe162ff2b727bcb530567826cec85eb8d4ad2bfb4bd023287a52d"},
|
1338 |
+
{file = "grpcio-1.64.1-cp38-cp38-macosx_10_9_universal2.whl", hash = "sha256:4d6dab6124225496010bd22690f2d9bd35c7cbb267b3f14e7a3eb05c911325d4"},
|
1339 |
+
{file = "grpcio-1.64.1-cp38-cp38-manylinux_2_17_aarch64.whl", hash = "sha256:a5e771d0252e871ce194d0fdcafd13971f1aae0ddacc5f25615030d5df55c3a2"},
|
1340 |
+
{file = "grpcio-1.64.1-cp38-cp38-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:2c3c1b90ab93fed424e454e93c0ed0b9d552bdf1b0929712b094f5ecfe7a23ad"},
|
1341 |
+
{file = "grpcio-1.64.1-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:20405cb8b13fd779135df23fabadc53b86522d0f1cba8cca0e87968587f50650"},
|
1342 |
+
{file = "grpcio-1.64.1-cp38-cp38-musllinux_1_1_i686.whl", hash = "sha256:0cc79c982ccb2feec8aad0e8fb0d168bcbca85bc77b080d0d3c5f2f15c24ea8f"},
|
1343 |
+
{file = "grpcio-1.64.1-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:a3a035c37ce7565b8f4f35ff683a4db34d24e53dc487e47438e434eb3f701b2a"},
|
1344 |
+
{file = "grpcio-1.64.1-cp38-cp38-win32.whl", hash = "sha256:1257b76748612aca0f89beec7fa0615727fd6f2a1ad580a9638816a4b2eb18fd"},
|
1345 |
+
{file = "grpcio-1.64.1-cp38-cp38-win_amd64.whl", hash = "sha256:0a12ddb1678ebc6a84ec6b0487feac020ee2b1659cbe69b80f06dbffdb249122"},
|
1346 |
+
{file = "grpcio-1.64.1-cp39-cp39-linux_armv7l.whl", hash = "sha256:75dbbf415026d2862192fe1b28d71f209e2fd87079d98470db90bebe57b33179"},
|
1347 |
+
{file = "grpcio-1.64.1-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:e3d9f8d1221baa0ced7ec7322a981e28deb23749c76eeeb3d33e18b72935ab62"},
|
1348 |
+
{file = "grpcio-1.64.1-cp39-cp39-manylinux_2_17_aarch64.whl", hash = "sha256:5f8b75f64d5d324c565b263c67dbe4f0af595635bbdd93bb1a88189fc62ed2e5"},
|
1349 |
+
{file = "grpcio-1.64.1-cp39-cp39-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:c84ad903d0d94311a2b7eea608da163dace97c5fe9412ea311e72c3684925602"},
|
1350 |
+
{file = "grpcio-1.64.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:940e3ec884520155f68a3b712d045e077d61c520a195d1a5932c531f11883489"},
|
1351 |
+
{file = "grpcio-1.64.1-cp39-cp39-musllinux_1_1_i686.whl", hash = "sha256:f10193c69fc9d3d726e83bbf0f3d316f1847c3071c8c93d8090cf5f326b14309"},
|
1352 |
+
{file = "grpcio-1.64.1-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:ac15b6c2c80a4d1338b04d42a02d376a53395ddf0ec9ab157cbaf44191f3ffdd"},
|
1353 |
+
{file = "grpcio-1.64.1-cp39-cp39-win32.whl", hash = "sha256:03b43d0ccf99c557ec671c7dede64f023c7da9bb632ac65dbc57f166e4970040"},
|
1354 |
+
{file = "grpcio-1.64.1-cp39-cp39-win_amd64.whl", hash = "sha256:ed6091fa0adcc7e4ff944090cf203a52da35c37a130efa564ded02b7aff63bcd"},
|
1355 |
+
{file = "grpcio-1.64.1.tar.gz", hash = "sha256:8d51dd1c59d5fa0f34266b80a3805ec29a1f26425c2a54736133f6d87fc4968a"},
|
1356 |
]
|
1357 |
|
1358 |
[package.extras]
|
1359 |
+
protobuf = ["grpcio-tools (>=1.64.1)"]
|
1360 |
|
1361 |
[[package]]
|
1362 |
name = "grpcio-status"
|
|
|
2320 |
|
2321 |
[[package]]
|
2322 |
name = "openai"
|
2323 |
+
version = "1.31.0"
|
2324 |
description = "The official Python library for the openai API"
|
2325 |
optional = false
|
2326 |
python-versions = ">=3.7.1"
|
2327 |
files = [
|
2328 |
+
{file = "openai-1.31.0-py3-none-any.whl", hash = "sha256:82044ee3122113f2a468a1f308a8882324d09556ba5348687c535d3655ee331c"},
|
2329 |
+
{file = "openai-1.31.0.tar.gz", hash = "sha256:54ae0625b005d6a3b895db2b8438dae1059cffff0cd262a26e9015c13a29ab06"},
|
2330 |
]
|
2331 |
|
2332 |
[package.dependencies]
|
|
|
2640 |
|
2641 |
[[package]]
|
2642 |
name = "pydantic"
|
2643 |
+
version = "2.7.3"
|
2644 |
description = "Data validation using Python type hints"
|
2645 |
optional = false
|
2646 |
python-versions = ">=3.8"
|
2647 |
files = [
|
2648 |
+
{file = "pydantic-2.7.3-py3-none-any.whl", hash = "sha256:ea91b002777bf643bb20dd717c028ec43216b24a6001a280f83877fd2655d0b4"},
|
2649 |
+
{file = "pydantic-2.7.3.tar.gz", hash = "sha256:c46c76a40bb1296728d7a8b99aa73dd70a48c3510111ff290034f860c99c419e"},
|
2650 |
]
|
2651 |
|
2652 |
[package.dependencies]
|
2653 |
annotated-types = ">=0.4.0"
|
2654 |
+
pydantic-core = "2.18.4"
|
2655 |
typing-extensions = ">=4.6.1"
|
2656 |
|
2657 |
[package.extras]
|
|
|
2659 |
|
2660 |
[[package]]
|
2661 |
name = "pydantic-core"
|
2662 |
+
version = "2.18.4"
|
2663 |
description = "Core functionality for Pydantic validation and serialization"
|
2664 |
optional = false
|
2665 |
python-versions = ">=3.8"
|
2666 |
files = [
|
2667 |
+
{file = "pydantic_core-2.18.4-cp310-cp310-macosx_10_12_x86_64.whl", hash = "sha256:f76d0ad001edd426b92233d45c746fd08f467d56100fd8f30e9ace4b005266e4"},
|
2668 |
+
{file = "pydantic_core-2.18.4-cp310-cp310-macosx_11_0_arm64.whl", hash = "sha256:59ff3e89f4eaf14050c8022011862df275b552caef8082e37b542b066ce1ff26"},
|
2669 |
+
{file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a55b5b16c839df1070bc113c1f7f94a0af4433fcfa1b41799ce7606e5c79ce0a"},
|
2670 |
+
{file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:4d0dcc59664fcb8974b356fe0a18a672d6d7cf9f54746c05f43275fc48636851"},
|
2671 |
+
{file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:8951eee36c57cd128f779e641e21eb40bc5073eb28b2d23f33eb0ef14ffb3f5d"},
|
2672 |
+
{file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:4701b19f7e3a06ea655513f7938de6f108123bf7c86bbebb1196eb9bd35cf724"},
|
2673 |
+
{file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:e00a3f196329e08e43d99b79b286d60ce46bed10f2280d25a1718399457e06be"},
|
2674 |
+
{file = "pydantic_core-2.18.4-cp310-cp310-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:97736815b9cc893b2b7f663628e63f436018b75f44854c8027040e05230eeddb"},
|
2675 |
+
{file = "pydantic_core-2.18.4-cp310-cp310-musllinux_1_1_aarch64.whl", hash = "sha256:6891a2ae0e8692679c07728819b6e2b822fb30ca7445f67bbf6509b25a96332c"},
|
2676 |
+
{file = "pydantic_core-2.18.4-cp310-cp310-musllinux_1_1_x86_64.whl", hash = "sha256:bc4ff9805858bd54d1a20efff925ccd89c9d2e7cf4986144b30802bf78091c3e"},
|
2677 |
+
{file = "pydantic_core-2.18.4-cp310-none-win32.whl", hash = "sha256:1b4de2e51bbcb61fdebd0ab86ef28062704f62c82bbf4addc4e37fa4b00b7cbc"},
|
2678 |
+
{file = "pydantic_core-2.18.4-cp310-none-win_amd64.whl", hash = "sha256:6a750aec7bf431517a9fd78cb93c97b9b0c496090fee84a47a0d23668976b4b0"},
|
2679 |
+
{file = "pydantic_core-2.18.4-cp311-cp311-macosx_10_12_x86_64.whl", hash = "sha256:942ba11e7dfb66dc70f9ae66b33452f51ac7bb90676da39a7345e99ffb55402d"},
|
2680 |
+
{file = "pydantic_core-2.18.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:b2ebef0e0b4454320274f5e83a41844c63438fdc874ea40a8b5b4ecb7693f1c4"},
|
2681 |
+
{file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:a642295cd0c8df1b86fc3dced1d067874c353a188dc8e0f744626d49e9aa51c4"},
|
2682 |
+
{file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:5f09baa656c904807e832cf9cce799c6460c450c4ad80803517032da0cd062e2"},
|
2683 |
+
{file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:98906207f29bc2c459ff64fa007afd10a8c8ac080f7e4d5beff4c97086a3dabd"},
|
2684 |
+
{file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:19894b95aacfa98e7cb093cd7881a0c76f55731efad31073db4521e2b6ff5b7d"},
|
2685 |
+
{file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:0fbbdc827fe5e42e4d196c746b890b3d72876bdbf160b0eafe9f0334525119c8"},
|
2686 |
+
{file = "pydantic_core-2.18.4-cp311-cp311-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:f85d05aa0918283cf29a30b547b4df2fbb56b45b135f9e35b6807cb28bc47951"},
|
2687 |
+
{file = "pydantic_core-2.18.4-cp311-cp311-musllinux_1_1_aarch64.whl", hash = "sha256:e85637bc8fe81ddb73fda9e56bab24560bdddfa98aa64f87aaa4e4b6730c23d2"},
|
2688 |
+
{file = "pydantic_core-2.18.4-cp311-cp311-musllinux_1_1_x86_64.whl", hash = "sha256:2f5966897e5461f818e136b8451d0551a2e77259eb0f73a837027b47dc95dab9"},
|
2689 |
+
{file = "pydantic_core-2.18.4-cp311-none-win32.whl", hash = "sha256:44c7486a4228413c317952e9d89598bcdfb06399735e49e0f8df643e1ccd0558"},
|
2690 |
+
{file = "pydantic_core-2.18.4-cp311-none-win_amd64.whl", hash = "sha256:8a7164fe2005d03c64fd3b85649891cd4953a8de53107940bf272500ba8a788b"},
|
2691 |
+
{file = "pydantic_core-2.18.4-cp311-none-win_arm64.whl", hash = "sha256:4e99bc050fe65c450344421017f98298a97cefc18c53bb2f7b3531eb39bc7805"},
|
2692 |
+
{file = "pydantic_core-2.18.4-cp312-cp312-macosx_10_12_x86_64.whl", hash = "sha256:6f5c4d41b2771c730ea1c34e458e781b18cc668d194958e0112455fff4e402b2"},
|
2693 |
+
{file = "pydantic_core-2.18.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:2fdf2156aa3d017fddf8aea5adfba9f777db1d6022d392b682d2a8329e087cef"},
|
2694 |
+
{file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:4748321b5078216070b151d5271ef3e7cc905ab170bbfd27d5c83ee3ec436695"},
|
2695 |
+
{file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:847a35c4d58721c5dc3dba599878ebbdfd96784f3fb8bb2c356e123bdcd73f34"},
|
2696 |
+
{file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:3c40d4eaad41f78e3bbda31b89edc46a3f3dc6e171bf0ecf097ff7a0ffff7cb1"},
|
2697 |
+
{file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:21a5e440dbe315ab9825fcd459b8814bb92b27c974cbc23c3e8baa2b76890077"},
|
2698 |
+
{file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:01dd777215e2aa86dfd664daed5957704b769e726626393438f9c87690ce78c3"},
|
2699 |
+
{file = "pydantic_core-2.18.4-cp312-cp312-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:4b06beb3b3f1479d32befd1f3079cc47b34fa2da62457cdf6c963393340b56e9"},
|
2700 |
+
{file = "pydantic_core-2.18.4-cp312-cp312-musllinux_1_1_aarch64.whl", hash = "sha256:564d7922e4b13a16b98772441879fcdcbe82ff50daa622d681dd682175ea918c"},
|
2701 |
+
{file = "pydantic_core-2.18.4-cp312-cp312-musllinux_1_1_x86_64.whl", hash = "sha256:0eb2a4f660fcd8e2b1c90ad566db2b98d7f3f4717c64fe0a83e0adb39766d5b8"},
|
2702 |
+
{file = "pydantic_core-2.18.4-cp312-none-win32.whl", hash = "sha256:8b8bab4c97248095ae0c4455b5a1cd1cdd96e4e4769306ab19dda135ea4cdb07"},
|
2703 |
+
{file = "pydantic_core-2.18.4-cp312-none-win_amd64.whl", hash = "sha256:14601cdb733d741b8958224030e2bfe21a4a881fb3dd6fbb21f071cabd48fa0a"},
|
2704 |
+
{file = "pydantic_core-2.18.4-cp312-none-win_arm64.whl", hash = "sha256:c1322d7dd74713dcc157a2b7898a564ab091ca6c58302d5c7b4c07296e3fd00f"},
|
2705 |
+
{file = "pydantic_core-2.18.4-cp38-cp38-macosx_10_12_x86_64.whl", hash = "sha256:823be1deb01793da05ecb0484d6c9e20baebb39bd42b5d72636ae9cf8350dbd2"},
|
2706 |
+
{file = "pydantic_core-2.18.4-cp38-cp38-macosx_11_0_arm64.whl", hash = "sha256:ebef0dd9bf9b812bf75bda96743f2a6c5734a02092ae7f721c048d156d5fabae"},
|
2707 |
+
{file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:ae1d6df168efb88d7d522664693607b80b4080be6750c913eefb77e34c12c71a"},
|
2708 |
+
{file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:f9899c94762343f2cc2fc64c13e7cae4c3cc65cdfc87dd810a31654c9b7358cc"},
|
2709 |
+
{file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:99457f184ad90235cfe8461c4d70ab7dd2680e28821c29eca00252ba90308c78"},
|
2710 |
+
{file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:18f469a3d2a2fdafe99296a87e8a4c37748b5080a26b806a707f25a902c040a8"},
|
2711 |
+
{file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b7cdf28938ac6b8b49ae5e92f2735056a7ba99c9b110a474473fd71185c1af5d"},
|
2712 |
+
{file = "pydantic_core-2.18.4-cp38-cp38-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:938cb21650855054dc54dfd9120a851c974f95450f00683399006aa6e8abb057"},
|
2713 |
+
{file = "pydantic_core-2.18.4-cp38-cp38-musllinux_1_1_aarch64.whl", hash = "sha256:44cd83ab6a51da80fb5adbd9560e26018e2ac7826f9626bc06ca3dc074cd198b"},
|
2714 |
+
{file = "pydantic_core-2.18.4-cp38-cp38-musllinux_1_1_x86_64.whl", hash = "sha256:972658f4a72d02b8abfa2581d92d59f59897d2e9f7e708fdabe922f9087773af"},
|
2715 |
+
{file = "pydantic_core-2.18.4-cp38-none-win32.whl", hash = "sha256:1d886dc848e60cb7666f771e406acae54ab279b9f1e4143babc9c2258213daa2"},
|
2716 |
+
{file = "pydantic_core-2.18.4-cp38-none-win_amd64.whl", hash = "sha256:bb4462bd43c2460774914b8525f79b00f8f407c945d50881568f294c1d9b4443"},
|
2717 |
+
{file = "pydantic_core-2.18.4-cp39-cp39-macosx_10_12_x86_64.whl", hash = "sha256:44a688331d4a4e2129140a8118479443bd6f1905231138971372fcde37e43528"},
|
2718 |
+
{file = "pydantic_core-2.18.4-cp39-cp39-macosx_11_0_arm64.whl", hash = "sha256:a2fdd81edd64342c85ac7cf2753ccae0b79bf2dfa063785503cb85a7d3593223"},
|
2719 |
+
{file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:86110d7e1907ab36691f80b33eb2da87d780f4739ae773e5fc83fb272f88825f"},
|
2720 |
+
{file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:46387e38bd641b3ee5ce247563b60c5ca098da9c56c75c157a05eaa0933ed154"},
|
2721 |
+
{file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:123c3cec203e3f5ac7b000bd82235f1a3eced8665b63d18be751f115588fea30"},
|
2722 |
+
{file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:dc1803ac5c32ec324c5261c7209e8f8ce88e83254c4e1aebdc8b0a39f9ddb443"},
|
2723 |
+
{file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:53db086f9f6ab2b4061958d9c276d1dbe3690e8dd727d6abf2321d6cce37fa94"},
|
2724 |
+
{file = "pydantic_core-2.18.4-cp39-cp39-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:abc267fa9837245cc28ea6929f19fa335f3dc330a35d2e45509b6566dc18be23"},
|
2725 |
+
{file = "pydantic_core-2.18.4-cp39-cp39-musllinux_1_1_aarch64.whl", hash = "sha256:a0d829524aaefdebccb869eed855e2d04c21d2d7479b6cada7ace5448416597b"},
|
2726 |
+
{file = "pydantic_core-2.18.4-cp39-cp39-musllinux_1_1_x86_64.whl", hash = "sha256:509daade3b8649f80d4e5ff21aa5673e4ebe58590b25fe42fac5f0f52c6f034a"},
|
2727 |
+
{file = "pydantic_core-2.18.4-cp39-none-win32.whl", hash = "sha256:ca26a1e73c48cfc54c4a76ff78df3727b9d9f4ccc8dbee4ae3f73306a591676d"},
|
2728 |
+
{file = "pydantic_core-2.18.4-cp39-none-win_amd64.whl", hash = "sha256:c67598100338d5d985db1b3d21f3619ef392e185e71b8d52bceacc4a7771ea7e"},
|
2729 |
+
{file = "pydantic_core-2.18.4-pp310-pypy310_pp73-macosx_10_12_x86_64.whl", hash = "sha256:574d92eac874f7f4db0ca653514d823a0d22e2354359d0759e3f6a406db5d55d"},
|
2730 |
+
{file = "pydantic_core-2.18.4-pp310-pypy310_pp73-macosx_11_0_arm64.whl", hash = "sha256:1f4d26ceb5eb9eed4af91bebeae4b06c3fb28966ca3a8fb765208cf6b51102ab"},
|
2731 |
+
{file = "pydantic_core-2.18.4-pp310-pypy310_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:77450e6d20016ec41f43ca4a6c63e9fdde03f0ae3fe90e7c27bdbeaece8b1ed4"},
|
2732 |
+
{file = "pydantic_core-2.18.4-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:d323a01da91851a4f17bf592faf46149c9169d68430b3146dcba2bb5e5719abc"},
|
2733 |
+
{file = "pydantic_core-2.18.4-pp310-pypy310_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:43d447dd2ae072a0065389092a231283f62d960030ecd27565672bd40746c507"},
|
2734 |
+
{file = "pydantic_core-2.18.4-pp310-pypy310_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:578e24f761f3b425834f297b9935e1ce2e30f51400964ce4801002435a1b41ef"},
|
2735 |
+
{file = "pydantic_core-2.18.4-pp310-pypy310_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:81b5efb2f126454586d0f40c4d834010979cb80785173d1586df845a632e4e6d"},
|
2736 |
+
{file = "pydantic_core-2.18.4-pp310-pypy310_pp73-win_amd64.whl", hash = "sha256:ab86ce7c8f9bea87b9d12c7f0af71102acbf5ecbc66c17796cff45dae54ef9a5"},
|
2737 |
+
{file = "pydantic_core-2.18.4-pp39-pypy39_pp73-macosx_10_12_x86_64.whl", hash = "sha256:90afc12421df2b1b4dcc975f814e21bc1754640d502a2fbcc6d41e77af5ec312"},
|
2738 |
+
{file = "pydantic_core-2.18.4-pp39-pypy39_pp73-macosx_11_0_arm64.whl", hash = "sha256:51991a89639a912c17bef4b45c87bd83593aee0437d8102556af4885811d59f5"},
|
2739 |
+
{file = "pydantic_core-2.18.4-pp39-pypy39_pp73-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:293afe532740370aba8c060882f7d26cfd00c94cae32fd2e212a3a6e3b7bc15e"},
|
2740 |
+
{file = "pydantic_core-2.18.4-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:b48ece5bde2e768197a2d0f6e925f9d7e3e826f0ad2271120f8144a9db18d5c8"},
|
2741 |
+
{file = "pydantic_core-2.18.4-pp39-pypy39_pp73-manylinux_2_5_i686.manylinux1_i686.whl", hash = "sha256:eae237477a873ab46e8dd748e515c72c0c804fb380fbe6c85533c7de51f23a8f"},
|
2742 |
+
{file = "pydantic_core-2.18.4-pp39-pypy39_pp73-musllinux_1_1_aarch64.whl", hash = "sha256:834b5230b5dfc0c1ec37b2fda433b271cbbc0e507560b5d1588e2cc1148cf1ce"},
|
2743 |
+
{file = "pydantic_core-2.18.4-pp39-pypy39_pp73-musllinux_1_1_x86_64.whl", hash = "sha256:e858ac0a25074ba4bce653f9b5d0a85b7456eaddadc0ce82d3878c22489fa4ee"},
|
2744 |
+
{file = "pydantic_core-2.18.4-pp39-pypy39_pp73-win_amd64.whl", hash = "sha256:2fd41f6eff4c20778d717af1cc50eca52f5afe7805ee530a4fbd0bae284f16e9"},
|
2745 |
+
{file = "pydantic_core-2.18.4.tar.gz", hash = "sha256:ec3beeada09ff865c344ff3bc2f427f5e6c26401cc6113d77e372c3fdac73864"},
|
2746 |
]
|
2747 |
|
2748 |
[package.dependencies]
|
|
|
3186 |
|
3187 |
[[package]]
|
3188 |
name = "ruff"
|
3189 |
+
version = "0.4.7"
|
3190 |
description = "An extremely fast Python linter and code formatter, written in Rust."
|
3191 |
optional = false
|
3192 |
python-versions = ">=3.7"
|
3193 |
files = [
|
3194 |
+
{file = "ruff-0.4.7-py3-none-macosx_10_12_x86_64.whl", hash = "sha256:e089371c67892a73b6bb1525608e89a2aca1b77b5440acf7a71dda5dac958f9e"},
|
3195 |
+
{file = "ruff-0.4.7-py3-none-macosx_11_0_arm64.whl", hash = "sha256:10f973d521d910e5f9c72ab27e409e839089f955be8a4c8826601a6323a89753"},
|
3196 |
+
{file = "ruff-0.4.7-py3-none-manylinux_2_17_aarch64.manylinux2014_aarch64.whl", hash = "sha256:59c3d110970001dfa494bcd95478e62286c751126dfb15c3c46e7915fc49694f"},
|
3197 |
+
{file = "ruff-0.4.7-py3-none-manylinux_2_17_armv7l.manylinux2014_armv7l.whl", hash = "sha256:fa9773c6c00f4958f73b317bc0fd125295110c3776089f6ef318f4b775f0abe4"},
|
3198 |
+
{file = "ruff-0.4.7-py3-none-manylinux_2_17_i686.manylinux2014_i686.whl", hash = "sha256:07fc80bbb61e42b3b23b10fda6a2a0f5a067f810180a3760c5ef1b456c21b9db"},
|
3199 |
+
{file = "ruff-0.4.7-py3-none-manylinux_2_17_ppc64.manylinux2014_ppc64.whl", hash = "sha256:fa4dafe3fe66d90e2e2b63fa1591dd6e3f090ca2128daa0be33db894e6c18648"},
|
3200 |
+
{file = "ruff-0.4.7-py3-none-manylinux_2_17_ppc64le.manylinux2014_ppc64le.whl", hash = "sha256:a7c0083febdec17571455903b184a10026603a1de078428ba155e7ce9358c5f6"},
|
3201 |
+
{file = "ruff-0.4.7-py3-none-manylinux_2_17_s390x.manylinux2014_s390x.whl", hash = "sha256:ad1b20e66a44057c326168437d680a2166c177c939346b19c0d6b08a62a37589"},
|
3202 |
+
{file = "ruff-0.4.7-py3-none-manylinux_2_17_x86_64.manylinux2014_x86_64.whl", hash = "sha256:cbf5d818553add7511c38b05532d94a407f499d1a76ebb0cad0374e32bc67202"},
|
3203 |
+
{file = "ruff-0.4.7-py3-none-musllinux_1_2_aarch64.whl", hash = "sha256:50e9651578b629baec3d1513b2534de0ac7ed7753e1382272b8d609997e27e83"},
|
3204 |
+
{file = "ruff-0.4.7-py3-none-musllinux_1_2_armv7l.whl", hash = "sha256:8874a9df7766cb956b218a0a239e0a5d23d9e843e4da1e113ae1d27ee420877a"},
|
3205 |
+
{file = "ruff-0.4.7-py3-none-musllinux_1_2_i686.whl", hash = "sha256:b9de9a6e49f7d529decd09381c0860c3f82fa0b0ea00ea78409b785d2308a567"},
|
3206 |
+
{file = "ruff-0.4.7-py3-none-musllinux_1_2_x86_64.whl", hash = "sha256:13a1768b0691619822ae6d446132dbdfd568b700ecd3652b20d4e8bc1e498f78"},
|
3207 |
+
{file = "ruff-0.4.7-py3-none-win32.whl", hash = "sha256:769e5a51df61e07e887b81e6f039e7ed3573316ab7dd9f635c5afaa310e4030e"},
|
3208 |
+
{file = "ruff-0.4.7-py3-none-win_amd64.whl", hash = "sha256:9e3ab684ad403a9ed1226894c32c3ab9c2e0718440f6f50c7c5829932bc9e054"},
|
3209 |
+
{file = "ruff-0.4.7-py3-none-win_arm64.whl", hash = "sha256:10f2204b9a613988e3484194c2c9e96a22079206b22b787605c255f130db5ed7"},
|
3210 |
+
{file = "ruff-0.4.7.tar.gz", hash = "sha256:2331d2b051dc77a289a653fcc6a42cce357087c5975738157cd966590b18b5e1"},
|
3211 |
]
|
3212 |
|
3213 |
[[package]]
|
|
|
3505 |
|
3506 |
[[package]]
|
3507 |
name = "typing-extensions"
|
3508 |
+
version = "4.12.1"
|
3509 |
description = "Backported and Experimental Type Hints for Python 3.8+"
|
3510 |
optional = false
|
3511 |
python-versions = ">=3.8"
|
3512 |
files = [
|
3513 |
+
{file = "typing_extensions-4.12.1-py3-none-any.whl", hash = "sha256:6024b58b69089e5a89c347397254e35f1bf02a907728ec7fee9bf0fe837d203a"},
|
3514 |
+
{file = "typing_extensions-4.12.1.tar.gz", hash = "sha256:915f5e35ff76f56588223f15fdd5938f9a1cf9195c0de25130c627e4d597f6d1"},
|
3515 |
]
|
3516 |
|
3517 |
[[package]]
|
|
|
3525 |
{file = "tzdata-2024.1.tar.gz", hash = "sha256:2674120f8d891909751c38abcdfd386ac0a5a1127954fbc332af6b5ceae07efd"},
|
3526 |
]
|
3527 |
|
3528 |
+
[[package]]
|
3529 |
+
name = "tzlocal"
|
3530 |
+
version = "5.2"
|
3531 |
+
description = "tzinfo object for the local timezone"
|
3532 |
+
optional = false
|
3533 |
+
python-versions = ">=3.8"
|
3534 |
+
files = [
|
3535 |
+
{file = "tzlocal-5.2-py3-none-any.whl", hash = "sha256:49816ef2fe65ea8ac19d19aa7a1ae0551c834303d5014c6d5a62e4cbda8047b8"},
|
3536 |
+
{file = "tzlocal-5.2.tar.gz", hash = "sha256:8d399205578f1a9342816409cc1e46a93ebd5755e39ea2d85334bea911bf0e6e"},
|
3537 |
+
]
|
3538 |
+
|
3539 |
+
[package.dependencies]
|
3540 |
+
tzdata = {version = "*", markers = "platform_system == \"Windows\""}
|
3541 |
+
|
3542 |
+
[package.extras]
|
3543 |
+
devenv = ["check-manifest", "pytest (>=4.3)", "pytest-cov", "pytest-mock (>=3.3)", "zest.releaser"]
|
3544 |
+
|
3545 |
[[package]]
|
3546 |
name = "ujson"
|
3547 |
version = "5.10.0"
|
|
|
3659 |
|
3660 |
[[package]]
|
3661 |
name = "uvicorn"
|
3662 |
+
version = "0.30.1"
|
3663 |
description = "The lightning-fast ASGI server."
|
3664 |
optional = false
|
3665 |
python-versions = ">=3.8"
|
3666 |
files = [
|
3667 |
+
{file = "uvicorn-0.30.1-py3-none-any.whl", hash = "sha256:cd17daa7f3b9d7a24de3617820e634d0933b69eed8e33a516071174427238c81"},
|
3668 |
+
{file = "uvicorn-0.30.1.tar.gz", hash = "sha256:d46cd8e0fd80240baffbcd9ec1012a712938754afcf81bce56c024c1656aece8"},
|
3669 |
]
|
3670 |
|
3671 |
[package.dependencies]
|
|
|
3997 |
|
3998 |
[[package]]
|
3999 |
name = "zipp"
|
4000 |
+
version = "3.19.2"
|
4001 |
description = "Backport of pathlib-compatible object wrapper for zip files"
|
4002 |
optional = false
|
4003 |
python-versions = ">=3.8"
|
4004 |
files = [
|
4005 |
+
{file = "zipp-3.19.2-py3-none-any.whl", hash = "sha256:f091755f667055f2d02b32c53771a7a6c8b47e1fdbc4b72a8b9072b3eef8015c"},
|
4006 |
+
{file = "zipp-3.19.2.tar.gz", hash = "sha256:bf1dcf6450f873a13e952a29504887c89e6de7506209e5b1bcc3460135d4de19"},
|
4007 |
]
|
4008 |
|
4009 |
[package.extras]
|
4010 |
+
doc = ["furo", "jaraco.packaging (>=9.3)", "jaraco.tidelift (>=1.4)", "rst.linker (>=1.9)", "sphinx (>=3.5)", "sphinx-lint"]
|
4011 |
+
test = ["big-O", "importlib-resources", "jaraco.functools", "jaraco.itertools", "jaraco.test", "more-itertools", "pytest (>=6,!=8.1.*)", "pytest-checkdocs (>=2.4)", "pytest-cov", "pytest-enabler (>=2.2)", "pytest-ignore-flaky", "pytest-mypy", "pytest-ruff (>=0.2.1)"]
|
4012 |
|
4013 |
[metadata]
|
4014 |
lock-version = "2.0"
|
pyproject.toml
CHANGED
@@ -7,6 +7,7 @@ readme = "README.md"
|
|
7 |
|
8 |
[tool.poetry.dependencies]
|
9 |
python = "^3.11"
|
|
|
10 |
firebase-admin = "^6.5.0"
|
11 |
google-cloud-secret-manager = "^2.20.0"
|
12 |
google-generativeai = "^0.5.4"
|
|
|
7 |
|
8 |
[tool.poetry.dependencies]
|
9 |
python = "^3.11"
|
10 |
+
apscheduler = "^3.10.4"
|
11 |
firebase-admin = "^6.5.0"
|
12 |
google-cloud-secret-manager = "^2.20.0"
|
13 |
google-generativeai = "^0.5.4"
|
rate_limit.py
ADDED
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""
|
2 |
+
This module contains functions for rate limiting requests.
|
3 |
+
|
4 |
+
The rate limiting system operates on two levels:
|
5 |
+
1. User-level rate limiting: Each user (identified by a token) has a
|
6 |
+
configurable minimum interval between requests.
|
7 |
+
|
8 |
+
2. System-wide rate limiting: There is a global limit on the total number of
|
9 |
+
requests across all users within a specified time period.
|
10 |
+
"""
|
11 |
+
|
12 |
+
from datetime import datetime
|
13 |
+
import signal
|
14 |
+
import sys
|
15 |
+
from typing import Dict
|
16 |
+
from uuid import uuid4
|
17 |
+
|
18 |
+
from apscheduler.schedulers import background
|
19 |
+
import gradio as gr
|
20 |
+
|
21 |
+
|
22 |
+
class InvalidTokenException(Exception):
|
23 |
+
pass
|
24 |
+
|
25 |
+
|
26 |
+
class UserRateLimitException(Exception):
|
27 |
+
pass
|
28 |
+
|
29 |
+
|
30 |
+
class SystemRateLimitException(Exception):
|
31 |
+
pass
|
32 |
+
|
33 |
+
|
34 |
+
class RateLimiter:
|
35 |
+
|
36 |
+
def __init__(self, limit=10000, period_in_seconds=60 * 60 * 24):
|
37 |
+
# Maps tokens to the last time they made a request.
|
38 |
+
# E.g, {"sometoken": datetime(2021, 8, 1, 0, 0, 0)}
|
39 |
+
self.last_request_times: Dict[str, datetime] = {}
|
40 |
+
|
41 |
+
# The number of requests made.
|
42 |
+
# This count is reset to zero at the end of each period.
|
43 |
+
self.request_count = 0
|
44 |
+
|
45 |
+
# The maximum number of requests allowed within the time period.
|
46 |
+
self.limit = limit
|
47 |
+
|
48 |
+
self.scheduler = background.BackgroundScheduler()
|
49 |
+
self.scheduler.add_job(self._remove_old_tokens,
|
50 |
+
"interval",
|
51 |
+
seconds=60 * 60 * 24)
|
52 |
+
self.scheduler.add_job(self._reset_request_count,
|
53 |
+
"interval",
|
54 |
+
seconds=period_in_seconds)
|
55 |
+
self.scheduler.start()
|
56 |
+
|
57 |
+
def check_rate_limit(self, token: str):
|
58 |
+
if not token or token not in self.last_request_times:
|
59 |
+
raise InvalidTokenException()
|
60 |
+
|
61 |
+
if (datetime.now() - self.last_request_times[token]).seconds < 5:
|
62 |
+
raise UserRateLimitException()
|
63 |
+
|
64 |
+
if self.request_count >= self.limit:
|
65 |
+
raise SystemRateLimitException()
|
66 |
+
|
67 |
+
self.last_request_times[token] = datetime.now()
|
68 |
+
self.request_count += 1
|
69 |
+
|
70 |
+
def initialize_request(self, token: str):
|
71 |
+
self.last_request_times[token] = datetime.min
|
72 |
+
|
73 |
+
def _remove_old_tokens(self):
|
74 |
+
for token, last_request_time in dict(self.last_request_times).items():
|
75 |
+
if (datetime.now() - last_request_time).days >= 1:
|
76 |
+
del self.last_request_times[token]
|
77 |
+
|
78 |
+
def _reset_request_count(self):
|
79 |
+
self.request_count = 0
|
80 |
+
|
81 |
+
|
82 |
+
rate_limiter = RateLimiter()
|
83 |
+
|
84 |
+
|
85 |
+
def set_token(app: gr.Blocks):
|
86 |
+
|
87 |
+
def set_token_server():
|
88 |
+
new_token = uuid4().hex
|
89 |
+
rate_limiter.initialize_request(new_token)
|
90 |
+
return new_token
|
91 |
+
|
92 |
+
set_token_client = """
|
93 |
+
function(newToken) {
|
94 |
+
const expiresDateString = new Date(Date.now() + 24 * 60 * 60 * 1000).toUTCString();
|
95 |
+
document.cookie = `arena_token=${newToken}; expires=${expiresDateString};`;
|
96 |
+
}
|
97 |
+
"""
|
98 |
+
|
99 |
+
token = gr.Textbox(visible=False)
|
100 |
+
app.load(fn=set_token_server, outputs=[token])
|
101 |
+
token.change(fn=lambda _: None, js=set_token_client, inputs=[token])
|
102 |
+
|
103 |
+
|
104 |
+
def signal_handler(sig, frame):
|
105 |
+
del sig, frame # Unused.
|
106 |
+
rate_limiter.scheduler.shutdown()
|
107 |
+
sys.exit(0)
|
108 |
+
|
109 |
+
|
110 |
+
if gr.NO_RELOAD:
|
111 |
+
# Catch signal to ensure scheduler shuts down when server stops.
|
112 |
+
signal.signal(signal.SIGINT, signal_handler)
|
requirements.txt
CHANGED
@@ -4,16 +4,17 @@ aiosignal==1.3.1 ; python_version >= "3.11" and python_version < "4.0"
|
|
4 |
altair==5.3.0 ; python_version >= "3.11" and python_version < "4.0"
|
5 |
annotated-types==0.7.0 ; python_version >= "3.11" and python_version < "4.0"
|
6 |
anyio==4.4.0 ; python_version >= "3.11" and python_version < "4.0"
|
|
|
7 |
attrs==23.2.0 ; python_version >= "3.11" and python_version < "4.0"
|
8 |
cachecontrol==0.14.0 ; python_version >= "3.11" and python_version < "4.0"
|
9 |
cachetools==5.3.3 ; python_version >= "3.11" and python_version < "4.0"
|
10 |
-
certifi==2024.
|
11 |
cffi==1.16.0 ; python_version >= "3.11" and python_version < "4.0" and platform_python_implementation != "PyPy"
|
12 |
charset-normalizer==3.3.2 ; python_version >= "3.11" and python_version < "4.0"
|
13 |
click==8.1.7 ; python_version >= "3.11" and python_version < "4.0"
|
14 |
colorama==0.4.6 ; python_version >= "3.11" and python_version < "4.0" and (platform_system == "Windows" or sys_platform == "win32")
|
15 |
contourpy==1.2.1 ; python_version >= "3.11" and python_version < "4.0"
|
16 |
-
cryptography==42.0.
|
17 |
cycler==0.12.1 ; python_version >= "3.11" and python_version < "4.0"
|
18 |
distro==1.9.0 ; python_version >= "3.11" and python_version < "4.0"
|
19 |
dnspython==2.6.1 ; python_version >= "3.11" and python_version < "4.0"
|
@@ -23,13 +24,13 @@ fastapi==0.111.0 ; python_version >= "3.11" and python_version < "4.0"
|
|
23 |
ffmpy==0.3.2 ; python_version >= "3.11" and python_version < "4.0"
|
24 |
filelock==3.14.0 ; python_version >= "3.11" and python_version < "4.0"
|
25 |
firebase-admin==6.5.0 ; python_version >= "3.11" and python_version < "4.0"
|
26 |
-
fonttools==4.
|
27 |
frozenlist==1.4.1 ; python_version >= "3.11" and python_version < "4.0"
|
28 |
-
fsspec==2024.
|
29 |
google-ai-generativelanguage==0.6.4 ; python_version >= "3.11" and python_version < "4.0"
|
30 |
google-api-core==2.19.0 ; python_version >= "3.11" and python_version < "4.0"
|
31 |
google-api-core[grpc]==2.19.0 ; python_version >= "3.11" and python_version < "4.0"
|
32 |
-
google-api-python-client==2.
|
33 |
google-auth-httplib2==0.2.0 ; python_version >= "3.11" and python_version < "4.0"
|
34 |
google-auth==2.29.0 ; python_version >= "3.11" and python_version < "4.0"
|
35 |
google-cloud-core==2.4.1 ; python_version >= "3.11" and python_version < "4.0"
|
@@ -39,13 +40,13 @@ google-cloud-storage==2.16.0 ; python_version >= "3.11" and python_version < "4.
|
|
39 |
google-crc32c==1.5.0 ; python_version >= "3.11" and python_version < "4.0"
|
40 |
google-generativeai==0.5.4 ; python_version >= "3.11" and python_version < "4.0"
|
41 |
google-resumable-media==2.7.0 ; python_version >= "3.11" and python_version < "4.0"
|
42 |
-
googleapis-common-protos==1.63.
|
43 |
-
googleapis-common-protos[grpc]==1.63.
|
44 |
gradio-client==0.17.0 ; python_version >= "3.11" and python_version < "4.0"
|
45 |
-
gradio==4.
|
46 |
grpc-google-iam-v1==0.13.0 ; python_version >= "3.11" and python_version < "4.0"
|
47 |
grpcio-status==1.62.2 ; python_version >= "3.11" and python_version < "4.0"
|
48 |
-
grpcio==1.64.
|
49 |
h11==0.14.0 ; python_version >= "3.11" and python_version < "4.0"
|
50 |
httpcore==1.0.5 ; python_version >= "3.11" and python_version < "4.0"
|
51 |
httplib2==0.22.0 ; python_version >= "3.11" and python_version < "4.0"
|
@@ -69,7 +70,7 @@ mdurl==0.1.2 ; python_version >= "3.11" and python_version < "4.0"
|
|
69 |
msgpack==1.0.8 ; python_version >= "3.11" and python_version < "4.0"
|
70 |
multidict==6.0.5 ; python_version >= "3.11" and python_version < "4.0"
|
71 |
numpy==1.26.4 ; python_version >= "3.11" and python_version < "4.0"
|
72 |
-
openai==1.
|
73 |
orjson==3.10.3 ; python_version >= "3.11" and python_version < "4.0"
|
74 |
packaging==24.0 ; python_version >= "3.11" and python_version < "4.0"
|
75 |
pandas==2.2.2 ; python_version >= "3.11" and python_version < "4.0"
|
@@ -79,8 +80,8 @@ protobuf==4.25.3 ; python_version >= "3.11" and python_version < "4.0"
|
|
79 |
pyasn1-modules==0.4.0 ; python_version >= "3.11" and python_version < "4.0"
|
80 |
pyasn1==0.6.0 ; python_version >= "3.11" and python_version < "4.0"
|
81 |
pycparser==2.22 ; python_version >= "3.11" and python_version < "4.0" and platform_python_implementation != "PyPy"
|
82 |
-
pydantic-core==2.18.
|
83 |
-
pydantic==2.7.
|
84 |
pydub==0.25.1 ; python_version >= "3.11" and python_version < "4.0"
|
85 |
pygments==2.18.0 ; python_version >= "3.11" and python_version < "4.0"
|
86 |
pyjwt[crypto]==2.8.0 ; python_version >= "3.11" and python_version < "4.0"
|
@@ -96,7 +97,7 @@ requests==2.32.3 ; python_version >= "3.11" and python_version < "4.0"
|
|
96 |
rich==13.7.1 ; python_version >= "3.11" and python_version < "4.0"
|
97 |
rpds-py==0.18.1 ; python_version >= "3.11" and python_version < "4.0"
|
98 |
rsa==4.9 ; python_version >= "3.11" and python_version < "4"
|
99 |
-
ruff==0.4.
|
100 |
semantic-version==2.10.0 ; python_version >= "3.11" and python_version < "4.0"
|
101 |
shellingham==1.5.4 ; python_version >= "3.11" and python_version < "4.0"
|
102 |
six==1.16.0 ; python_version >= "3.11" and python_version < "4.0"
|
@@ -108,15 +109,16 @@ tomlkit==0.12.0 ; python_version >= "3.11" and python_version < "4.0"
|
|
108 |
toolz==0.12.1 ; python_version >= "3.11" and python_version < "4.0"
|
109 |
tqdm==4.66.4 ; python_version >= "3.11" and python_version < "4.0"
|
110 |
typer==0.12.3 ; python_version >= "3.11" and python_version < "4.0"
|
111 |
-
typing-extensions==4.12.
|
112 |
tzdata==2024.1 ; python_version >= "3.11" and python_version < "4.0"
|
|
|
113 |
ujson==5.10.0 ; python_version >= "3.11" and python_version < "4.0"
|
114 |
uritemplate==4.1.1 ; python_version >= "3.11" and python_version < "4.0"
|
115 |
urllib3==2.2.1 ; python_version >= "3.11" and python_version < "4.0"
|
116 |
-
uvicorn==0.30.
|
117 |
-
uvicorn[standard]==0.30.
|
118 |
uvloop==0.19.0 ; (sys_platform != "win32" and sys_platform != "cygwin") and platform_python_implementation != "PyPy" and python_version >= "3.11" and python_version < "4.0"
|
119 |
watchfiles==0.22.0 ; python_version >= "3.11" and python_version < "4.0"
|
120 |
websockets==11.0.3 ; python_version >= "3.11" and python_version < "4.0"
|
121 |
yarl==1.9.4 ; python_version >= "3.11" and python_version < "4.0"
|
122 |
-
zipp==3.19.
|
|
|
4 |
altair==5.3.0 ; python_version >= "3.11" and python_version < "4.0"
|
5 |
annotated-types==0.7.0 ; python_version >= "3.11" and python_version < "4.0"
|
6 |
anyio==4.4.0 ; python_version >= "3.11" and python_version < "4.0"
|
7 |
+
apscheduler==3.10.4 ; python_version >= "3.11" and python_version < "4.0"
|
8 |
attrs==23.2.0 ; python_version >= "3.11" and python_version < "4.0"
|
9 |
cachecontrol==0.14.0 ; python_version >= "3.11" and python_version < "4.0"
|
10 |
cachetools==5.3.3 ; python_version >= "3.11" and python_version < "4.0"
|
11 |
+
certifi==2024.6.2 ; python_version >= "3.11" and python_version < "4.0"
|
12 |
cffi==1.16.0 ; python_version >= "3.11" and python_version < "4.0" and platform_python_implementation != "PyPy"
|
13 |
charset-normalizer==3.3.2 ; python_version >= "3.11" and python_version < "4.0"
|
14 |
click==8.1.7 ; python_version >= "3.11" and python_version < "4.0"
|
15 |
colorama==0.4.6 ; python_version >= "3.11" and python_version < "4.0" and (platform_system == "Windows" or sys_platform == "win32")
|
16 |
contourpy==1.2.1 ; python_version >= "3.11" and python_version < "4.0"
|
17 |
+
cryptography==42.0.8 ; python_version >= "3.11" and python_version < "4.0"
|
18 |
cycler==0.12.1 ; python_version >= "3.11" and python_version < "4.0"
|
19 |
distro==1.9.0 ; python_version >= "3.11" and python_version < "4.0"
|
20 |
dnspython==2.6.1 ; python_version >= "3.11" and python_version < "4.0"
|
|
|
24 |
ffmpy==0.3.2 ; python_version >= "3.11" and python_version < "4.0"
|
25 |
filelock==3.14.0 ; python_version >= "3.11" and python_version < "4.0"
|
26 |
firebase-admin==6.5.0 ; python_version >= "3.11" and python_version < "4.0"
|
27 |
+
fonttools==4.53.0 ; python_version >= "3.11" and python_version < "4.0"
|
28 |
frozenlist==1.4.1 ; python_version >= "3.11" and python_version < "4.0"
|
29 |
+
fsspec==2024.6.0 ; python_version >= "3.11" and python_version < "4.0"
|
30 |
google-ai-generativelanguage==0.6.4 ; python_version >= "3.11" and python_version < "4.0"
|
31 |
google-api-core==2.19.0 ; python_version >= "3.11" and python_version < "4.0"
|
32 |
google-api-core[grpc]==2.19.0 ; python_version >= "3.11" and python_version < "4.0"
|
33 |
+
google-api-python-client==2.132.0 ; python_version >= "3.11" and python_version < "4.0"
|
34 |
google-auth-httplib2==0.2.0 ; python_version >= "3.11" and python_version < "4.0"
|
35 |
google-auth==2.29.0 ; python_version >= "3.11" and python_version < "4.0"
|
36 |
google-cloud-core==2.4.1 ; python_version >= "3.11" and python_version < "4.0"
|
|
|
40 |
google-crc32c==1.5.0 ; python_version >= "3.11" and python_version < "4.0"
|
41 |
google-generativeai==0.5.4 ; python_version >= "3.11" and python_version < "4.0"
|
42 |
google-resumable-media==2.7.0 ; python_version >= "3.11" and python_version < "4.0"
|
43 |
+
googleapis-common-protos==1.63.1 ; python_version >= "3.11" and python_version < "4.0"
|
44 |
+
googleapis-common-protos[grpc]==1.63.1 ; python_version >= "3.11" and python_version < "4.0"
|
45 |
gradio-client==0.17.0 ; python_version >= "3.11" and python_version < "4.0"
|
46 |
+
gradio==4.33.0 ; python_version >= "3.11" and python_version < "4.0"
|
47 |
grpc-google-iam-v1==0.13.0 ; python_version >= "3.11" and python_version < "4.0"
|
48 |
grpcio-status==1.62.2 ; python_version >= "3.11" and python_version < "4.0"
|
49 |
+
grpcio==1.64.1 ; python_version >= "3.11" and python_version < "4.0"
|
50 |
h11==0.14.0 ; python_version >= "3.11" and python_version < "4.0"
|
51 |
httpcore==1.0.5 ; python_version >= "3.11" and python_version < "4.0"
|
52 |
httplib2==0.22.0 ; python_version >= "3.11" and python_version < "4.0"
|
|
|
70 |
msgpack==1.0.8 ; python_version >= "3.11" and python_version < "4.0"
|
71 |
multidict==6.0.5 ; python_version >= "3.11" and python_version < "4.0"
|
72 |
numpy==1.26.4 ; python_version >= "3.11" and python_version < "4.0"
|
73 |
+
openai==1.31.0 ; python_version >= "3.11" and python_version < "4.0"
|
74 |
orjson==3.10.3 ; python_version >= "3.11" and python_version < "4.0"
|
75 |
packaging==24.0 ; python_version >= "3.11" and python_version < "4.0"
|
76 |
pandas==2.2.2 ; python_version >= "3.11" and python_version < "4.0"
|
|
|
80 |
pyasn1-modules==0.4.0 ; python_version >= "3.11" and python_version < "4.0"
|
81 |
pyasn1==0.6.0 ; python_version >= "3.11" and python_version < "4.0"
|
82 |
pycparser==2.22 ; python_version >= "3.11" and python_version < "4.0" and platform_python_implementation != "PyPy"
|
83 |
+
pydantic-core==2.18.4 ; python_version >= "3.11" and python_version < "4.0"
|
84 |
+
pydantic==2.7.3 ; python_version >= "3.11" and python_version < "4.0"
|
85 |
pydub==0.25.1 ; python_version >= "3.11" and python_version < "4.0"
|
86 |
pygments==2.18.0 ; python_version >= "3.11" and python_version < "4.0"
|
87 |
pyjwt[crypto]==2.8.0 ; python_version >= "3.11" and python_version < "4.0"
|
|
|
97 |
rich==13.7.1 ; python_version >= "3.11" and python_version < "4.0"
|
98 |
rpds-py==0.18.1 ; python_version >= "3.11" and python_version < "4.0"
|
99 |
rsa==4.9 ; python_version >= "3.11" and python_version < "4"
|
100 |
+
ruff==0.4.7 ; python_version >= "3.11" and python_version < "4.0" and sys_platform != "emscripten"
|
101 |
semantic-version==2.10.0 ; python_version >= "3.11" and python_version < "4.0"
|
102 |
shellingham==1.5.4 ; python_version >= "3.11" and python_version < "4.0"
|
103 |
six==1.16.0 ; python_version >= "3.11" and python_version < "4.0"
|
|
|
109 |
toolz==0.12.1 ; python_version >= "3.11" and python_version < "4.0"
|
110 |
tqdm==4.66.4 ; python_version >= "3.11" and python_version < "4.0"
|
111 |
typer==0.12.3 ; python_version >= "3.11" and python_version < "4.0"
|
112 |
+
typing-extensions==4.12.1 ; python_version >= "3.11" and python_version < "4.0"
|
113 |
tzdata==2024.1 ; python_version >= "3.11" and python_version < "4.0"
|
114 |
+
tzlocal==5.2 ; python_version >= "3.11" and python_version < "4.0"
|
115 |
ujson==5.10.0 ; python_version >= "3.11" and python_version < "4.0"
|
116 |
uritemplate==4.1.1 ; python_version >= "3.11" and python_version < "4.0"
|
117 |
urllib3==2.2.1 ; python_version >= "3.11" and python_version < "4.0"
|
118 |
+
uvicorn==0.30.1 ; python_version >= "3.11" and python_version < "4.0" and sys_platform != "emscripten"
|
119 |
+
uvicorn[standard]==0.30.1 ; python_version >= "3.11" and python_version < "4.0"
|
120 |
uvloop==0.19.0 ; (sys_platform != "win32" and sys_platform != "cygwin") and platform_python_implementation != "PyPy" and python_version >= "3.11" and python_version < "4.0"
|
121 |
watchfiles==0.22.0 ; python_version >= "3.11" and python_version < "4.0"
|
122 |
websockets==11.0.3 ; python_version >= "3.11" and python_version < "4.0"
|
123 |
yarl==1.9.4 ; python_version >= "3.11" and python_version < "4.0"
|
124 |
+
zipp==3.19.2 ; python_version >= "3.11" and python_version < "4.0"
|
response.py
CHANGED
@@ -3,6 +3,7 @@ This module contains functions for generating responses using LLMs.
|
|
3 |
"""
|
4 |
|
5 |
import enum
|
|
|
6 |
import logging
|
7 |
from random import sample
|
8 |
from typing import List
|
@@ -15,6 +16,8 @@ from leaderboard import db
|
|
15 |
from model import ContextWindowExceededError
|
16 |
from model import Model
|
17 |
from model import supported_models
|
|
|
|
|
18 |
|
19 |
logging.basicConfig()
|
20 |
logger = logging.getLogger(__name__)
|
@@ -63,7 +66,7 @@ def get_instruction(category: str, model: Model, source_lang: str,
|
|
63 |
|
64 |
|
65 |
def get_responses(prompt: str, category: str, source_lang: str,
|
66 |
-
target_lang: str):
|
67 |
if not category:
|
68 |
raise gr.Error("Please select a category.")
|
69 |
|
@@ -71,6 +74,24 @@ def get_responses(prompt: str, category: str, source_lang: str,
|
|
71 |
not target_lang):
|
72 |
raise gr.Error("Please select source and target languages.")
|
73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
models: List[Model] = sample(list(supported_models), 2)
|
75 |
responses = []
|
76 |
for model in models:
|
|
|
3 |
"""
|
4 |
|
5 |
import enum
|
6 |
+
from http import cookies
|
7 |
import logging
|
8 |
from random import sample
|
9 |
from typing import List
|
|
|
16 |
from model import ContextWindowExceededError
|
17 |
from model import Model
|
18 |
from model import supported_models
|
19 |
+
import rate_limit
|
20 |
+
from rate_limit import rate_limiter
|
21 |
|
22 |
logging.basicConfig()
|
23 |
logger = logging.getLogger(__name__)
|
|
|
66 |
|
67 |
|
68 |
def get_responses(prompt: str, category: str, source_lang: str,
|
69 |
+
target_lang: str, request: gr.Request):
|
70 |
if not category:
|
71 |
raise gr.Error("Please select a category.")
|
72 |
|
|
|
74 |
not target_lang):
|
75 |
raise gr.Error("Please select source and target languages.")
|
76 |
|
77 |
+
cookie = cookies.SimpleCookie()
|
78 |
+
cookie.load(request.headers["cookie"])
|
79 |
+
token = cookie["arena_token"].value if "arena_token" in cookie else None
|
80 |
+
|
81 |
+
try:
|
82 |
+
rate_limiter.check_rate_limit(token)
|
83 |
+
except rate_limit.InvalidTokenException as e:
|
84 |
+
raise gr.Error(
|
85 |
+
"Your session has expired. Please refresh the page to continue.") from e
|
86 |
+
except rate_limit.UserRateLimitException as e:
|
87 |
+
raise gr.Error(
|
88 |
+
"You have made too many requests in a short period. Please try again later." # pylint: disable=line-too-long
|
89 |
+
) from e
|
90 |
+
except rate_limit.SystemRateLimitException as e:
|
91 |
+
raise gr.Error(
|
92 |
+
"Our service is currently experiencing high traffic. Please try again later." # pylint: disable=line-too-long
|
93 |
+
) from e
|
94 |
+
|
95 |
models: List[Model] = sample(list(supported_models), 2)
|
96 |
responses = []
|
97 |
for model in models:
|