analytic-workspace-client 1.29.1__tar.gz → 1.29.2__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.
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/PKG-INFO +4 -1
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/setup.py +2 -2
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/analytic_workspace_client.egg-info/PKG-INFO +4 -1
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/analytic_workspace_client.egg-info/requires.txt +3 -3
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/data_master/base.py +2 -2
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/data_master/v2.py +1 -1
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/etl_blocks/dto.py +1 -1
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/etl_blocks/runtime.py +1 -1
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/model_dev/runner.py +3 -2
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/models/model_schema.py +9 -1
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/README.md +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/pyproject.toml +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/setup.cfg +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/analytic_workspace_client.egg-info/SOURCES.txt +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/analytic_workspace_client.egg-info/dependency_links.txt +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/analytic_workspace_client.egg-info/top_level.txt +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/__init__.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/cache.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/core/__init__.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/core/bundle.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/core/compiler.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/core/model_vault.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/core/spark.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/data_master/__init__.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/data_master/v0.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/data_master/v1.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/domain.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/etl_blocks/__init__.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/etl_blocks/application.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/etl_blocks/services.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/etl_blocks/test_data.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/etl_blocks/tools.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/exceptions.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/ml/__init__.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/ml/mlflow_wrapper.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/model_dev/__init__.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/model_dev/application.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/model_dev/cache.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/model_dev/virtual_objects.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/models/__init__.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/session.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/tools.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_etl/__init__.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_etl/compiler.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_etl/etl_blocks.py +0 -0
- {analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_etl/models.py +0 -0
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: analytic_workspace_client
|
|
3
|
-
Version: 1.29.
|
|
3
|
+
Version: 1.29.2
|
|
4
4
|
Summary: Библиотека для подключения к Analytic Workspace
|
|
5
5
|
Home-page: https://analyticworkspace.ru/
|
|
6
6
|
Author: Analytic Workspace
|
|
7
7
|
Author-email: aw_help@analyticworkspace.ru
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Platform: UNKNOWN
|
|
8
10
|
Classifier: Programming Language :: Python :: 3
|
|
9
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
12
|
Classifier: Operating System :: OS Independent
|
|
@@ -39,3 +41,4 @@ df = session.load(model_id=123) # df: pandas.DataFrame
|
|
|
39
41
|
|
|
40
42
|
display(df)
|
|
41
43
|
```
|
|
44
|
+
|
|
@@ -10,7 +10,7 @@ long_description = (here / "README.md").read_text(encoding="utf-8")
|
|
|
10
10
|
|
|
11
11
|
setup(
|
|
12
12
|
name='analytic_workspace_client',
|
|
13
|
-
version='1.29.
|
|
13
|
+
version='1.29.2',
|
|
14
14
|
|
|
15
15
|
description='Библиотека для подключения к Analytic Workspace',
|
|
16
16
|
long_description=long_description,
|
|
@@ -36,7 +36,7 @@ setup(
|
|
|
36
36
|
'python-dotenv>=1.0,<1.1',
|
|
37
37
|
'httpx>=0.25,<1.0',
|
|
38
38
|
'pandas',
|
|
39
|
-
'pydantic>=
|
|
39
|
+
'pydantic>=2.0',
|
|
40
40
|
'colorama>=0.4,<0.5'
|
|
41
41
|
],
|
|
42
42
|
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: analytic-workspace-client
|
|
3
|
-
Version: 1.29.
|
|
3
|
+
Version: 1.29.2
|
|
4
4
|
Summary: Библиотека для подключения к Analytic Workspace
|
|
5
5
|
Home-page: https://analyticworkspace.ru/
|
|
6
6
|
Author: Analytic Workspace
|
|
7
7
|
Author-email: aw_help@analyticworkspace.ru
|
|
8
|
+
License: UNKNOWN
|
|
9
|
+
Platform: UNKNOWN
|
|
8
10
|
Classifier: Programming Language :: Python :: 3
|
|
9
11
|
Classifier: License :: OSI Approved :: MIT License
|
|
10
12
|
Classifier: Operating System :: OS Independent
|
|
@@ -39,3 +41,4 @@ df = session.load(model_id=123) # df: pandas.DataFrame
|
|
|
39
41
|
|
|
40
42
|
display(df)
|
|
41
43
|
```
|
|
44
|
+
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
from typing import Optional
|
|
1
|
+
from typing import Optional, Iterator
|
|
2
2
|
|
|
3
3
|
import abc
|
|
4
4
|
from pathlib import Path
|
|
@@ -38,7 +38,7 @@ class DataMasterApi(metaclass=abc.ABCMeta):
|
|
|
38
38
|
""" """
|
|
39
39
|
|
|
40
40
|
@contextmanager
|
|
41
|
-
def get_http_client(self) -> httpx.Client:
|
|
41
|
+
def get_http_client(self) -> Iterator[httpx.Client]:
|
|
42
42
|
""" """
|
|
43
43
|
if not self.api_config.aw_url:
|
|
44
44
|
raise DataMasterApi.MisconfiguredError('Не указан URL к Analytic Workspace')
|
|
@@ -34,7 +34,7 @@ class DataMasterV2(DataMasterApi):
|
|
|
34
34
|
raise AwModelForbidden(f'Доступ к модели {model_id} запрещен')
|
|
35
35
|
raise Exception(f'Ошибка запроса схемы модели HTTP {r.status_code} GET {r.url}: {r.text}')
|
|
36
36
|
|
|
37
|
-
return ModelSchema.
|
|
37
|
+
return ModelSchema.model_validate(r.json())
|
|
38
38
|
|
|
39
39
|
def load_model_object_data(self, folder: Path, model_id: int, model_object_name: str, limit: Optional[int]):
|
|
40
40
|
""" """
|
|
@@ -32,7 +32,7 @@ def get_etl_block_meta(block_path: Path) -> ETLBlockMeta:
|
|
|
32
32
|
raise Exception(f'Файл с метаданным блока не найден: {block_meta_path}')
|
|
33
33
|
|
|
34
34
|
with open(block_meta_path, 'rt') as f:
|
|
35
|
-
return ETLBlockMeta.
|
|
35
|
+
return ETLBlockMeta.model_validate_json(f.read())
|
|
36
36
|
|
|
37
37
|
|
|
38
38
|
def get_etl_block_schema(block_path: Path,
|
|
@@ -150,7 +150,8 @@ if __name__ == '__main__':
|
|
|
150
150
|
if cache.model_schema_path().exists() and not args.no_cache:
|
|
151
151
|
print(Fore.YELLOW + f'Не удалось получить схему модели {model_id}: {e}. '
|
|
152
152
|
f'Для запуска скрипта используется схема модели из кеша.' + Fore.RESET)
|
|
153
|
-
|
|
153
|
+
with open(cache.model_schema_path(), 'rt') as f:
|
|
154
|
+
model_schema = ModelSchema.model_validate_json(f.read())
|
|
154
155
|
else:
|
|
155
156
|
print(Fore.RED + f'ОШИБКА: Не удалось получить схему модели {model_id}: {e}' + Fore.RESET)
|
|
156
157
|
sys.exit(1)
|
|
@@ -162,7 +163,7 @@ if __name__ == '__main__':
|
|
|
162
163
|
cache_folder = cache.get_model_folder()
|
|
163
164
|
os.makedirs(cache_folder, exist_ok=True)
|
|
164
165
|
with open(cache.model_schema_path(), 'wt') as f:
|
|
165
|
-
f.write(model_schema.
|
|
166
|
+
f.write(model_schema.model_dump_json(indent=2))
|
|
166
167
|
|
|
167
168
|
# ------------------------------------------------------------------------------
|
|
168
169
|
# Загрузка данных объектов модели
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
from typing import Optional, List, Dict
|
|
2
2
|
|
|
3
|
-
from pydantic import BaseModel
|
|
3
|
+
from pydantic import BaseModel, ConfigDict
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
class ModelObjectField(BaseModel):
|
|
@@ -9,6 +9,10 @@ class ModelObjectField(BaseModel):
|
|
|
9
9
|
model_name: str
|
|
10
10
|
simple_type: str
|
|
11
11
|
|
|
12
|
+
model_config = ConfigDict(
|
|
13
|
+
protected_namespaces=()
|
|
14
|
+
)
|
|
15
|
+
|
|
12
16
|
|
|
13
17
|
class ModelObject(BaseModel):
|
|
14
18
|
""" """
|
|
@@ -18,6 +22,10 @@ class ModelObject(BaseModel):
|
|
|
18
22
|
sql_text: Optional[str] = None
|
|
19
23
|
fields: List[ModelObjectField] = []
|
|
20
24
|
|
|
25
|
+
model_config = ConfigDict(
|
|
26
|
+
protected_namespaces=()
|
|
27
|
+
)
|
|
28
|
+
|
|
21
29
|
|
|
22
30
|
class ModelSql(BaseModel):
|
|
23
31
|
"""
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/__init__.py
RENAMED
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/cache.py
RENAMED
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/core/__init__.py
RENAMED
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/core/bundle.py
RENAMED
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/core/compiler.py
RENAMED
|
File without changes
|
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/core/spark.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/domain.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/exceptions.py
RENAMED
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/ml/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/session.py
RENAMED
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_client/tools.py
RENAMED
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_etl/__init__.py
RENAMED
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_etl/compiler.py
RENAMED
|
File without changes
|
{analytic_workspace_client-1.29.1 → analytic_workspace_client-1.29.2}/src/aw_etl/etl_blocks.py
RENAMED
|
File without changes
|
|
File without changes
|