pylegend 0.6.0__py3-none-any.whl → 0.7.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pylegend/__init__.py +7 -0
- pylegend/core/tds/legendql_api/frames/functions/legendql_api_window_extend_function.py +1 -1
- pylegend/extensions/tds/legendql_api/frames/legendql_api_legend_function_input_frame.py +46 -0
- pylegend/legendql_api_tds_client.py +73 -0
- {pylegend-0.6.0.dist-info → pylegend-0.7.0.dist-info}/METADATA +5 -2
- {pylegend-0.6.0.dist-info → pylegend-0.7.0.dist-info}/RECORD +10 -8
- {pylegend-0.6.0.dist-info → pylegend-0.7.0.dist-info}/WHEEL +1 -1
- {pylegend-0.6.0.dist-info → pylegend-0.7.0.dist-info/licenses}/LICENSE +0 -0
- {pylegend-0.6.0.dist-info → pylegend-0.7.0.dist-info/licenses}/LICENSE.spdx +0 -0
- {pylegend-0.6.0.dist-info → pylegend-0.7.0.dist-info/licenses}/NOTICE +0 -0
pylegend/__init__.py
CHANGED
|
@@ -19,6 +19,10 @@ from pylegend.legacy_api_tds_client import (
|
|
|
19
19
|
LegacyApiTdsClient,
|
|
20
20
|
legacy_api_tds_client,
|
|
21
21
|
)
|
|
22
|
+
from pylegend.legendql_api_tds_client import (
|
|
23
|
+
LegendQLApiTdsClient,
|
|
24
|
+
legendql_api_tds_client,
|
|
25
|
+
)
|
|
22
26
|
from pylegend.core.request import (
|
|
23
27
|
LegendClient,
|
|
24
28
|
AuthScheme,
|
|
@@ -43,6 +47,9 @@ from pylegend.core.language import (
|
|
|
43
47
|
__all__: PyLegendSequence[str] = [
|
|
44
48
|
"__version__",
|
|
45
49
|
|
|
50
|
+
"LegendQLApiTdsClient",
|
|
51
|
+
"legendql_api_tds_client",
|
|
52
|
+
|
|
46
53
|
"LegacyApiTdsClient",
|
|
47
54
|
"legacy_api_tds_client",
|
|
48
55
|
|
|
@@ -186,7 +186,7 @@ class LegendQLApiWindowExtendFunction(LegendQLApiAppliedFunction):
|
|
|
186
186
|
|
|
187
187
|
def to_sql(self, config: FrameToSqlConfig) -> QuerySpecification:
|
|
188
188
|
base_query = self.__base_frame.to_sql_query_object(config)
|
|
189
|
-
should_create_sub_query =
|
|
189
|
+
should_create_sub_query = True
|
|
190
190
|
db_extension = config.sql_to_string_generator().get_db_extension()
|
|
191
191
|
|
|
192
192
|
new_query = (
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
# Copyright 2025 Goldman Sachs
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
from pylegend._typing import (
|
|
16
|
+
PyLegendSequence
|
|
17
|
+
)
|
|
18
|
+
from pylegend.core.tds.legendql_api.frames.legendql_api_input_tds_frame import LegendQLApiExecutableInputTdsFrame
|
|
19
|
+
from pylegend.core.project_cooridnates import ProjectCoordinates
|
|
20
|
+
from pylegend.core.request.legend_client import LegendClient
|
|
21
|
+
from pylegend.extensions.tds.abstract.legend_function_input_frame import LegendFunctionInputFrameAbstract
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
__all__: PyLegendSequence[str] = [
|
|
25
|
+
"LegendQLApiLegendFunctionInputFrame"
|
|
26
|
+
]
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class LegendQLApiLegendFunctionInputFrame(LegendFunctionInputFrameAbstract, LegendQLApiExecutableInputTdsFrame):
|
|
30
|
+
|
|
31
|
+
def __init__(
|
|
32
|
+
self,
|
|
33
|
+
path: str,
|
|
34
|
+
project_coordinates: ProjectCoordinates,
|
|
35
|
+
legend_client: LegendClient,
|
|
36
|
+
) -> None:
|
|
37
|
+
LegendFunctionInputFrameAbstract.__init__(self, path=path, project_coordinates=project_coordinates)
|
|
38
|
+
LegendQLApiExecutableInputTdsFrame.__init__(
|
|
39
|
+
self,
|
|
40
|
+
legend_client=legend_client,
|
|
41
|
+
columns=legend_client.get_sql_string_schema(self.to_sql_query())
|
|
42
|
+
)
|
|
43
|
+
LegendFunctionInputFrameAbstract.set_initialized(self, True)
|
|
44
|
+
|
|
45
|
+
def __str__(self) -> str:
|
|
46
|
+
return f"LegendQLApiLegendFunctionInputFrame({'.'.join(self.get_path())})"
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
# Copyright 2025 Goldman Sachs
|
|
2
|
+
#
|
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
+
# you may not use this file except in compliance with the License.
|
|
5
|
+
# You may obtain a copy of the License at
|
|
6
|
+
#
|
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
|
8
|
+
#
|
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
|
+
# See the License for the specific language governing permissions and
|
|
13
|
+
# limitations under the License.
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from pylegend._typing import (
|
|
17
|
+
PyLegendSequence,
|
|
18
|
+
)
|
|
19
|
+
from pylegend.core.request import LegendClient
|
|
20
|
+
from pylegend.core.project_cooridnates import ProjectCoordinates
|
|
21
|
+
from pylegend.core.tds.legendql_api.frames.legendql_api_tds_frame import LegendQLApiTdsFrame
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
__all__: PyLegendSequence[str] = [
|
|
25
|
+
"LegendQLApiTdsClient",
|
|
26
|
+
"legendql_api_tds_client",
|
|
27
|
+
]
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
class LegendQLApiTdsClient:
|
|
31
|
+
__legend_client: LegendClient
|
|
32
|
+
|
|
33
|
+
def __init__(
|
|
34
|
+
self,
|
|
35
|
+
legend_client: LegendClient
|
|
36
|
+
) -> None:
|
|
37
|
+
self.__legend_client = legend_client
|
|
38
|
+
|
|
39
|
+
def legend_service_frame(
|
|
40
|
+
self,
|
|
41
|
+
service_pattern: str,
|
|
42
|
+
project_coordinates: ProjectCoordinates
|
|
43
|
+
) -> LegendQLApiTdsFrame:
|
|
44
|
+
from pylegend.extensions.tds.legendql_api.frames.legendql_api_legend_service_input_frame import (
|
|
45
|
+
LegendQLApiLegendServiceInputFrame
|
|
46
|
+
)
|
|
47
|
+
return LegendQLApiLegendServiceInputFrame(
|
|
48
|
+
pattern=service_pattern,
|
|
49
|
+
project_coordinates=project_coordinates,
|
|
50
|
+
legend_client=self.__legend_client
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
def legend_function_frame(
|
|
54
|
+
self,
|
|
55
|
+
function_path: str,
|
|
56
|
+
project_coordinates: ProjectCoordinates
|
|
57
|
+
) -> LegendQLApiTdsFrame:
|
|
58
|
+
from pylegend.extensions.tds.legendql_api.frames.legendql_api_legend_function_input_frame import (
|
|
59
|
+
LegendQLApiLegendFunctionInputFrame
|
|
60
|
+
)
|
|
61
|
+
return LegendQLApiLegendFunctionInputFrame(
|
|
62
|
+
path=function_path,
|
|
63
|
+
project_coordinates=project_coordinates,
|
|
64
|
+
legend_client=self.__legend_client
|
|
65
|
+
)
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
def legendql_api_tds_client(
|
|
69
|
+
legend_client: LegendClient
|
|
70
|
+
) -> LegendQLApiTdsClient:
|
|
71
|
+
return LegendQLApiTdsClient(
|
|
72
|
+
legend_client=legend_client
|
|
73
|
+
)
|
|
@@ -1,8 +1,11 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: pylegend
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.7.0
|
|
4
4
|
Summary: Python language binding for Legend data management platform
|
|
5
5
|
License: Apache-2.0
|
|
6
|
+
License-File: LICENSE
|
|
7
|
+
License-File: LICENSE.spdx
|
|
8
|
+
License-File: NOTICE
|
|
6
9
|
Author: PyLegend Maintainers
|
|
7
10
|
Author-email: legend@finos.org
|
|
8
11
|
Requires-Python: >=3.9,<3.14
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pylegend/__init__.py,sha256=
|
|
1
|
+
pylegend/__init__.py,sha256=wSvcilz-fuNv3iisVZh9juoBNv1ov0GJF6hnQhBK4U4,1832
|
|
2
2
|
pylegend/_typing.py,sha256=3P2K9xyyODrYRx3iDI8jtF1vGGqPbYiKqLEN9bBCdi0,1479
|
|
3
3
|
pylegend/core/__init__.py,sha256=LXTDJSDmHQXtnMDZouhZp9IZQVpY6ONkINbUYjtnMkE,578
|
|
4
4
|
pylegend/core/database/__init__.py,sha256=LXTDJSDmHQXtnMDZouhZp9IZQVpY6ONkINbUYjtnMkE,578
|
|
@@ -97,7 +97,7 @@ pylegend/core/tds/legendql_api/frames/functions/legendql_api_rename_function.py,
|
|
|
97
97
|
pylegend/core/tds/legendql_api/frames/functions/legendql_api_select_function.py,sha256=_7lYdKin-aQn5tw1zofuXC3T-DxC6XxSJPSfWJqS_7I,5617
|
|
98
98
|
pylegend/core/tds/legendql_api/frames/functions/legendql_api_slice_function.py,sha256=kt1VH-W-RitF-DUcJWKB73NvxSOeAAXN7deeeAwopw4,3249
|
|
99
99
|
pylegend/core/tds/legendql_api/frames/functions/legendql_api_sort_function.py,sha256=KHfxCCRXMSbIWG3KKuAR1BzThFx0rON8CJ_5g7QUTV4,3665
|
|
100
|
-
pylegend/core/tds/legendql_api/frames/functions/legendql_api_window_extend_function.py,sha256=
|
|
100
|
+
pylegend/core/tds/legendql_api/frames/functions/legendql_api_window_extend_function.py,sha256=TapsKtSgZGaMDK_33NsrvozmuV-VkiWtdJJSdLYSYnM,14253
|
|
101
101
|
pylegend/core/tds/legendql_api/frames/legendql_api_applied_function_tds_frame.py,sha256=kEh2XLoxYucQ6R7i5SKWSElUxbslufh5X5reIzOZbDw,1442
|
|
102
102
|
pylegend/core/tds/legendql_api/frames/legendql_api_base_tds_frame.py,sha256=QOV1NG8Ku9S3MQg_B-GkAvA0z1wEMR6Z1eZSLz3uqa8,17659
|
|
103
103
|
pylegend/core/tds/legendql_api/frames/legendql_api_input_tds_frame.py,sha256=x4rl6ER2ksy_PAcz9vlN_GNXejKpUg_e_YgAynfzS1Q,2147
|
|
@@ -135,6 +135,7 @@ pylegend/extensions/tds/legacy_api/frames/legacy_api_legend_service_input_frame.
|
|
|
135
135
|
pylegend/extensions/tds/legacy_api/frames/legacy_api_table_spec_input_frame.py,sha256=QMNTG82yb0KbI2MgevigvLUSOu4jdkCRWpP6FTGHVEk,1465
|
|
136
136
|
pylegend/extensions/tds/legendql_api/__init__.py,sha256=g6w4WCuQ2pqQG6yyn-QLLXED3ttOOB8YnXzVt3ijb28,578
|
|
137
137
|
pylegend/extensions/tds/legendql_api/frames/__init__.py,sha256=g6w4WCuQ2pqQG6yyn-QLLXED3ttOOB8YnXzVt3ijb28,578
|
|
138
|
+
pylegend/extensions/tds/legendql_api/frames/legendql_api_legend_function_input_frame.py,sha256=wT9bHzfSZ_nIllzx0SIEguUhrM6JdY31798gJAf8Gbc,1834
|
|
138
139
|
pylegend/extensions/tds/legendql_api/frames/legendql_api_legend_service_input_frame.py,sha256=UNvZEn1xbXS1y_1Nv6ibTmMpjq6fbFB66U7Ff9Hve2w,1841
|
|
139
140
|
pylegend/extensions/tds/legendql_api/frames/legendql_api_table_spec_input_frame.py,sha256=hJ4MEHOhSuc4i6iheKQtsbdEWxltD3-ilxpwbJYppPM,1481
|
|
140
141
|
pylegend/extensions/tds/pandas_api/__init__.py,sha256=LXTDJSDmHQXtnMDZouhZp9IZQVpY6ONkINbUYjtnMkE,578
|
|
@@ -145,11 +146,12 @@ pylegend/extensions/tds/pandas_api/frames/pandas_api_table_spec_input_frame.py,s
|
|
|
145
146
|
pylegend/extensions/tds/result_handler/__init__.py,sha256=NIIUcl39wpSc51IhUUEKtEYlve89Xncq0YEG78Gren4,864
|
|
146
147
|
pylegend/extensions/tds/result_handler/to_pandas_df_result_handler.py,sha256=tvVsxDOzHNTvzjdApIhmeefws5_u0N8Rqm7UvEtj70w,4958
|
|
147
148
|
pylegend/legacy_api_tds_client.py,sha256=IXfo2pdBFV3M3S4RYKJcvudMc_OGdR0yvJhTV-ovI3s,2319
|
|
149
|
+
pylegend/legendql_api_tds_client.py,sha256=oS6NET5pAA-hfVhVvwG6sRF7omyBs_gEYSAgA8Tky8U,2357
|
|
148
150
|
pylegend/utils/__init__.py,sha256=LXTDJSDmHQXtnMDZouhZp9IZQVpY6ONkINbUYjtnMkE,578
|
|
149
151
|
pylegend/utils/class_utils.py,sha256=t4PpF3jAXS_D6p9TqlSppryNYNOuy5C-kbKn2Kgb4QU,973
|
|
150
|
-
pylegend-0.
|
|
151
|
-
pylegend-0.
|
|
152
|
-
pylegend-0.
|
|
153
|
-
pylegend-0.
|
|
154
|
-
pylegend-0.
|
|
155
|
-
pylegend-0.
|
|
152
|
+
pylegend-0.7.0.dist-info/METADATA,sha256=UnFFbTxMJAH41GLOlNVtSgmA3YnDqqJRxDTT5gTmAzk,4280
|
|
153
|
+
pylegend-0.7.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
154
|
+
pylegend-0.7.0.dist-info/licenses/LICENSE,sha256=AGR96_qQPZO66Gjqq4G6r_g670K35VtW-IobTAkmZJM,11343
|
|
155
|
+
pylegend-0.7.0.dist-info/licenses/LICENSE.spdx,sha256=i7TsBclLotUvMjx9vZ_6S8Pp0r4uknWGw1RwiKBBvQ4,207
|
|
156
|
+
pylegend-0.7.0.dist-info/licenses/NOTICE,sha256=2Lr4FqiscyRI7-vyn7c2z-zqUw2p6x7upJyBvFKkHjk,167
|
|
157
|
+
pylegend-0.7.0.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|