mmar-mapi 1.0.16__tar.gz → 1.0.18__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.
Potentially problematic release.
This version of mmar-mapi might be problematic. Click here for more details.
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/PKG-INFO +2 -2
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/pyproject.toml +2 -2
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/__init__.py +2 -0
- mmar_mapi-1.0.18/src/mmar_mapi/decorators_maybe_lru_cache.py +14 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/LICENSE +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/README.md +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/api.py +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/file_storage.py +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/models/__init__.py +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/models/base.py +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/models/chat.py +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/models/chat_item.py +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/models/enums.py +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/models/tracks.py +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/models/widget.py +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/type_union.py +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/utils.py +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/utils_import.py +0 -0
- {mmar_mapi-1.0.16 → mmar_mapi-1.0.18}/src/mmar_mapi/xml_parser.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: mmar-mapi
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.18
|
|
4
4
|
Summary: Common pure/IO utilities for multi-modal architectures team
|
|
5
5
|
Keywords:
|
|
6
6
|
Author: Eugene Tagin
|
|
@@ -21,7 +21,7 @@ Classifier: Topic :: Utilities
|
|
|
21
21
|
Classifier: Typing :: Typed
|
|
22
22
|
Requires-Dist: pydantic~=2.11.7
|
|
23
23
|
Requires-Dist: loguru~=0.7.3
|
|
24
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.11
|
|
25
25
|
Description-Content-Type: text/markdown
|
|
26
26
|
|
|
27
27
|
# mmar-mapi
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
[project]
|
|
2
2
|
name = "mmar-mapi"
|
|
3
3
|
# dynamic version is not supported yet on uv_build
|
|
4
|
-
version = "1.0.
|
|
4
|
+
version = "1.0.18"
|
|
5
5
|
description = "Common pure/IO utilities for multi-modal architectures team"
|
|
6
6
|
authors = [{name = "Eugene Tagin", email = "tagin@airi.net"}]
|
|
7
7
|
license = "MIT"
|
|
8
8
|
license-files = ["LICENSE"]
|
|
9
9
|
readme = "README.md"
|
|
10
|
-
requires-python = ">=3.
|
|
10
|
+
requires-python = ">=3.11"
|
|
11
11
|
keywords = []
|
|
12
12
|
classifiers = [
|
|
13
13
|
"Development Status :: 4 - Beta",
|
|
@@ -18,6 +18,7 @@ from .models.widget import Widget
|
|
|
18
18
|
from .utils import make_session_id, chunked
|
|
19
19
|
from .xml_parser import XMLParser
|
|
20
20
|
from .utils_import import load_main_objects
|
|
21
|
+
from .decorators_maybe_lru_cache import maybe_lru_cache
|
|
21
22
|
|
|
22
23
|
__all__ = [
|
|
23
24
|
"AIMessage",
|
|
@@ -47,4 +48,5 @@ __all__ = [
|
|
|
47
48
|
"load_main_objects",
|
|
48
49
|
"make_content",
|
|
49
50
|
"make_session_id",
|
|
51
|
+
"maybe_lru_cache",
|
|
50
52
|
]
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from collections.abc import Callable
|
|
2
|
+
from functools import lru_cache
|
|
3
|
+
|
|
4
|
+
from loguru import logger
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def maybe_lru_cache(maxsize: int, func: Callable) -> tuple[str, Callable]:
|
|
8
|
+
if maxsize >= 0:
|
|
9
|
+
maxsize = maxsize or None
|
|
10
|
+
logger.info(f"Caching for {func.__name__}: enabled: maxsize={maxsize}")
|
|
11
|
+
func = lru_cache(maxsize=maxsize)(func)
|
|
12
|
+
else:
|
|
13
|
+
logger.info(f"Caching for {func.__name__}: disabled")
|
|
14
|
+
return func
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|