most-client 1.0.12__tar.gz → 1.0.14__tar.gz
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.
- {most_client-1.0.12/most_client.egg-info → most_client-1.0.14}/PKG-INFO +1 -2
- {most_client-1.0.12 → most_client-1.0.14}/most/types.py +9 -7
- {most_client-1.0.12 → most_client-1.0.14/most_client.egg-info}/PKG-INFO +1 -2
- {most_client-1.0.12 → most_client-1.0.14}/most_client.egg-info/requires.txt +0 -1
- {most_client-1.0.12 → most_client-1.0.14}/requirements.txt +0 -1
- {most_client-1.0.12 → most_client-1.0.14}/setup.py +1 -1
- {most_client-1.0.12 → most_client-1.0.14}/MANIFEST.in +0 -0
- {most_client-1.0.12 → most_client-1.0.14}/README.md +0 -0
- {most_client-1.0.12 → most_client-1.0.14}/most/__init__.py +0 -0
- {most_client-1.0.12 → most_client-1.0.14}/most/api.py +0 -0
- {most_client-1.0.12 → most_client-1.0.14}/most/async_api.py +0 -0
- {most_client-1.0.12 → most_client-1.0.14}/most_client.egg-info/SOURCES.txt +0 -0
- {most_client-1.0.12 → most_client-1.0.14}/most_client.egg-info/dependency_links.txt +0 -0
- {most_client-1.0.12 → most_client-1.0.14}/most_client.egg-info/top_level.txt +0 -0
- {most_client-1.0.12 → most_client-1.0.14}/most_client.egg-info/zip-safe +0 -0
- {most_client-1.0.12 → most_client-1.0.14}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: most-client
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.14
|
4
4
|
Summary: Most AI API for https://the-most.ai
|
5
5
|
Home-page: https://github.com/the-most-ai/most-client
|
6
6
|
Author: George Kasparyants
|
@@ -26,7 +26,6 @@ Requires-Dist: pytest
|
|
26
26
|
Requires-Dist: tox
|
27
27
|
Requires-Dist: twine
|
28
28
|
Requires-Dist: httpx
|
29
|
-
Requires-Dist: bson
|
30
29
|
Dynamic: author
|
31
30
|
Dynamic: author-email
|
32
31
|
Dynamic: classifier
|
@@ -1,6 +1,5 @@
|
|
1
|
+
import re
|
1
2
|
from dataclasses import dataclass
|
2
|
-
|
3
|
-
from bson import ObjectId
|
4
3
|
from dataclasses_json import dataclass_json, DataClassJsonMixin
|
5
4
|
from typing import Optional, List, Literal, Dict
|
6
5
|
|
@@ -77,6 +76,13 @@ class Result(DataClassJsonMixin):
|
|
77
76
|
for column_result in self.results])
|
78
77
|
|
79
78
|
|
79
|
+
def is_valid_objectid(oid: str) -> bool:
|
80
|
+
"""
|
81
|
+
Check if a given string is a valid MongoDB ObjectId (24-character hex).
|
82
|
+
"""
|
83
|
+
return bool(re.fullmatch(r"^[0-9a-fA-F]{24}$", oid))
|
84
|
+
|
85
|
+
|
80
86
|
def is_valid_id(smth_id: Optional[str]) -> bool:
|
81
87
|
if smth_id is None:
|
82
88
|
return False
|
@@ -84,8 +90,4 @@ def is_valid_id(smth_id: Optional[str]) -> bool:
|
|
84
90
|
if smth_id.startswith("most-"):
|
85
91
|
smth_id = smth_id[5:]
|
86
92
|
|
87
|
-
|
88
|
-
ObjectId(smth_id)
|
89
|
-
return True
|
90
|
-
except:
|
91
|
-
return False
|
93
|
+
return is_valid_objectid(smth_id)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.2
|
2
2
|
Name: most-client
|
3
|
-
Version: 1.0.
|
3
|
+
Version: 1.0.14
|
4
4
|
Summary: Most AI API for https://the-most.ai
|
5
5
|
Home-page: https://github.com/the-most-ai/most-client
|
6
6
|
Author: George Kasparyants
|
@@ -26,7 +26,6 @@ Requires-Dist: pytest
|
|
26
26
|
Requires-Dist: tox
|
27
27
|
Requires-Dist: twine
|
28
28
|
Requires-Dist: httpx
|
29
|
-
Requires-Dist: bson
|
30
29
|
Dynamic: author
|
31
30
|
Dynamic: author-email
|
32
31
|
Dynamic: classifier
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|