lusid-sdk 2.1.978__py3-none-any.whl → 2.1.980__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.
- lusid/__init__.py +4 -0
- lusid/api/property_definitions_api.py +180 -0
- lusid/configuration.py +1 -1
- lusid/models/__init__.py +4 -0
- lusid/models/derivation_formula_explain_request.py +105 -0
- lusid/models/derived_property_component.py +131 -0
- {lusid_sdk-2.1.978.dist-info → lusid_sdk-2.1.980.dist-info}/METADATA +4 -1
- {lusid_sdk-2.1.978.dist-info → lusid_sdk-2.1.980.dist-info}/RECORD +9 -7
- {lusid_sdk-2.1.978.dist-info → lusid_sdk-2.1.980.dist-info}/WHEEL +0 -0
lusid/__init__.py
CHANGED
@@ -442,6 +442,8 @@ from lusid.models.deleted_entity_response import DeletedEntityResponse
|
|
442
442
|
from lusid.models.dependency_source_filter import DependencySourceFilter
|
443
443
|
from lusid.models.deposit_close_event import DepositCloseEvent
|
444
444
|
from lusid.models.deposit_interest_payment_event import DepositInterestPaymentEvent
|
445
|
+
from lusid.models.derivation_formula_explain_request import DerivationFormulaExplainRequest
|
446
|
+
from lusid.models.derived_property_component import DerivedPropertyComponent
|
445
447
|
from lusid.models.described_address_key import DescribedAddressKey
|
446
448
|
from lusid.models.dialect import Dialect
|
447
449
|
from lusid.models.dialect_id import DialectId
|
@@ -1830,6 +1832,8 @@ __all__ = [
|
|
1830
1832
|
"DependencySourceFilter",
|
1831
1833
|
"DepositCloseEvent",
|
1832
1834
|
"DepositInterestPaymentEvent",
|
1835
|
+
"DerivationFormulaExplainRequest",
|
1836
|
+
"DerivedPropertyComponent",
|
1833
1837
|
"DescribedAddressKey",
|
1834
1838
|
"Dialect",
|
1835
1839
|
"DialectId",
|
@@ -30,6 +30,8 @@ from lusid.models.batch_upsert_property_definition_properties_response import Ba
|
|
30
30
|
from lusid.models.create_derived_property_definition_request import CreateDerivedPropertyDefinitionRequest
|
31
31
|
from lusid.models.create_property_definition_request import CreatePropertyDefinitionRequest
|
32
32
|
from lusid.models.deleted_entity_response import DeletedEntityResponse
|
33
|
+
from lusid.models.derivation_formula_explain_request import DerivationFormulaExplainRequest
|
34
|
+
from lusid.models.derived_property_component import DerivedPropertyComponent
|
33
35
|
from lusid.models.model_property import ModelProperty
|
34
36
|
from lusid.models.paged_resource_list_of_property_definition import PagedResourceListOfPropertyDefinition
|
35
37
|
from lusid.models.property_definition import PropertyDefinition
|
@@ -741,6 +743,184 @@ class PropertyDefinitionsApi:
|
|
741
743
|
_request_auth=_params.get('_request_auth'))
|
742
744
|
|
743
745
|
|
746
|
+
@overload
|
747
|
+
async def get_derived_formula_explanation(self, derivation_formula_explain_request : Annotated[DerivationFormulaExplainRequest, Field(..., description="Information about the derivation formula to explain, and optionally, the entity to resolve the formula against.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to resolve the entity. Defaults to returning the latest asAt in LUSID if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to resolve the entity. Defaults to the current LUSID system datetime if not specified.")] = None, **kwargs) -> DerivedPropertyComponent: # noqa: E501
|
748
|
+
...
|
749
|
+
|
750
|
+
@overload
|
751
|
+
def get_derived_formula_explanation(self, derivation_formula_explain_request : Annotated[DerivationFormulaExplainRequest, Field(..., description="Information about the derivation formula to explain, and optionally, the entity to resolve the formula against.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to resolve the entity. Defaults to returning the latest asAt in LUSID if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to resolve the entity. Defaults to the current LUSID system datetime if not specified.")] = None, async_req: Optional[bool]=True, **kwargs) -> DerivedPropertyComponent: # noqa: E501
|
752
|
+
...
|
753
|
+
|
754
|
+
@validate_arguments
|
755
|
+
def get_derived_formula_explanation(self, derivation_formula_explain_request : Annotated[DerivationFormulaExplainRequest, Field(..., description="Information about the derivation formula to explain, and optionally, the entity to resolve the formula against.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to resolve the entity. Defaults to returning the latest asAt in LUSID if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to resolve the entity. Defaults to the current LUSID system datetime if not specified.")] = None, async_req: Optional[bool]=None, **kwargs) -> Union[DerivedPropertyComponent, Awaitable[DerivedPropertyComponent]]: # noqa: E501
|
756
|
+
"""[INTERNAL] GetDerivedFormulaExplanation: Get explanation of a derived property formula # noqa: E501
|
757
|
+
|
758
|
+
Produces a manifest that shows the nested hierarchy of any source properties and the actions taken upon them to create the derived property. This can either be done against an existing entity, which will produce a manifest that includes the values of the source properties at the specified effective date time, or it can be done without providing an entity which will produce a manifest without values. # noqa: E501
|
759
|
+
This method makes a synchronous HTTP request by default. To make an
|
760
|
+
asynchronous HTTP request, please pass async_req=True
|
761
|
+
|
762
|
+
>>> thread = api.get_derived_formula_explanation(derivation_formula_explain_request, as_at, effective_at, async_req=True)
|
763
|
+
>>> result = thread.get()
|
764
|
+
|
765
|
+
:param derivation_formula_explain_request: Information about the derivation formula to explain, and optionally, the entity to resolve the formula against. (required)
|
766
|
+
:type derivation_formula_explain_request: DerivationFormulaExplainRequest
|
767
|
+
:param as_at: The asAt datetime at which to resolve the entity. Defaults to returning the latest asAt in LUSID if not specified.
|
768
|
+
:type as_at: datetime
|
769
|
+
:param effective_at: The effective datetime or cut label at which to resolve the entity. Defaults to the current LUSID system datetime if not specified.
|
770
|
+
:type effective_at: str
|
771
|
+
:param async_req: Whether to execute the request asynchronously.
|
772
|
+
:type async_req: bool, optional
|
773
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
774
|
+
:param opts: Configuration options for this request
|
775
|
+
:type opts: ConfigurationOptions, optional
|
776
|
+
:return: Returns the result object.
|
777
|
+
If the method is called asynchronously,
|
778
|
+
returns the request thread.
|
779
|
+
:rtype: DerivedPropertyComponent
|
780
|
+
"""
|
781
|
+
kwargs['_return_http_data_only'] = True
|
782
|
+
if '_preload_content' in kwargs:
|
783
|
+
message = "Error! Please call the get_derived_formula_explanation_with_http_info method with `_preload_content` instead and obtain raw data from ApiResponse.raw_data" # noqa: E501
|
784
|
+
raise ValueError(message)
|
785
|
+
if async_req is not None:
|
786
|
+
kwargs['async_req'] = async_req
|
787
|
+
return self.get_derived_formula_explanation_with_http_info(derivation_formula_explain_request, as_at, effective_at, **kwargs) # noqa: E501
|
788
|
+
|
789
|
+
@validate_arguments
|
790
|
+
def get_derived_formula_explanation_with_http_info(self, derivation_formula_explain_request : Annotated[DerivationFormulaExplainRequest, Field(..., description="Information about the derivation formula to explain, and optionally, the entity to resolve the formula against.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to resolve the entity. Defaults to returning the latest asAt in LUSID if not specified.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to resolve the entity. Defaults to the current LUSID system datetime if not specified.")] = None, **kwargs) -> ApiResponse: # noqa: E501
|
791
|
+
"""[INTERNAL] GetDerivedFormulaExplanation: Get explanation of a derived property formula # noqa: E501
|
792
|
+
|
793
|
+
Produces a manifest that shows the nested hierarchy of any source properties and the actions taken upon them to create the derived property. This can either be done against an existing entity, which will produce a manifest that includes the values of the source properties at the specified effective date time, or it can be done without providing an entity which will produce a manifest without values. # noqa: E501
|
794
|
+
This method makes a synchronous HTTP request by default. To make an
|
795
|
+
asynchronous HTTP request, please pass async_req=True
|
796
|
+
|
797
|
+
>>> thread = api.get_derived_formula_explanation_with_http_info(derivation_formula_explain_request, as_at, effective_at, async_req=True)
|
798
|
+
>>> result = thread.get()
|
799
|
+
|
800
|
+
:param derivation_formula_explain_request: Information about the derivation formula to explain, and optionally, the entity to resolve the formula against. (required)
|
801
|
+
:type derivation_formula_explain_request: DerivationFormulaExplainRequest
|
802
|
+
:param as_at: The asAt datetime at which to resolve the entity. Defaults to returning the latest asAt in LUSID if not specified.
|
803
|
+
:type as_at: datetime
|
804
|
+
:param effective_at: The effective datetime or cut label at which to resolve the entity. Defaults to the current LUSID system datetime if not specified.
|
805
|
+
:type effective_at: str
|
806
|
+
:param async_req: Whether to execute the request asynchronously.
|
807
|
+
:type async_req: bool, optional
|
808
|
+
:param _preload_content: if False, the ApiResponse.data will
|
809
|
+
be set to none and raw_data will store the
|
810
|
+
HTTP response body without reading/decoding.
|
811
|
+
Default is True.
|
812
|
+
:type _preload_content: bool, optional
|
813
|
+
:param _return_http_data_only: response data instead of ApiResponse
|
814
|
+
object with status code, headers, etc
|
815
|
+
:type _return_http_data_only: bool, optional
|
816
|
+
:param _request_timeout: Timeout setting. Do not use - use the opts parameter instead
|
817
|
+
:param opts: Configuration options for this request
|
818
|
+
:type opts: ConfigurationOptions, optional
|
819
|
+
:param _request_auth: set to override the auth_settings for an a single
|
820
|
+
request; this effectively ignores the authentication
|
821
|
+
in the spec for a single request.
|
822
|
+
:type _request_auth: dict, optional
|
823
|
+
:type _content_type: string, optional: force content-type for the request
|
824
|
+
:return: Returns the result object.
|
825
|
+
If the method is called asynchronously,
|
826
|
+
returns the request thread.
|
827
|
+
:rtype: tuple(DerivedPropertyComponent, status_code(int), headers(HTTPHeaderDict))
|
828
|
+
"""
|
829
|
+
|
830
|
+
_params = locals()
|
831
|
+
|
832
|
+
_all_params = [
|
833
|
+
'derivation_formula_explain_request',
|
834
|
+
'as_at',
|
835
|
+
'effective_at'
|
836
|
+
]
|
837
|
+
_all_params.extend(
|
838
|
+
[
|
839
|
+
'async_req',
|
840
|
+
'_return_http_data_only',
|
841
|
+
'_preload_content',
|
842
|
+
'_request_timeout',
|
843
|
+
'_request_auth',
|
844
|
+
'_content_type',
|
845
|
+
'_headers',
|
846
|
+
'opts'
|
847
|
+
]
|
848
|
+
)
|
849
|
+
|
850
|
+
# validate the arguments
|
851
|
+
for _key, _val in _params['kwargs'].items():
|
852
|
+
if _key not in _all_params:
|
853
|
+
raise ApiTypeError(
|
854
|
+
"Got an unexpected keyword argument '%s'"
|
855
|
+
" to method get_derived_formula_explanation" % _key
|
856
|
+
)
|
857
|
+
_params[_key] = _val
|
858
|
+
del _params['kwargs']
|
859
|
+
|
860
|
+
_collection_formats = {}
|
861
|
+
|
862
|
+
# process the path parameters
|
863
|
+
_path_params = {}
|
864
|
+
|
865
|
+
# process the query parameters
|
866
|
+
_query_params = []
|
867
|
+
if _params.get('as_at') is not None: # noqa: E501
|
868
|
+
if isinstance(_params['as_at'], datetime):
|
869
|
+
_query_params.append(('asAt', _params['as_at'].strftime(self.api_client.configuration.datetime_format)))
|
870
|
+
else:
|
871
|
+
_query_params.append(('asAt', _params['as_at']))
|
872
|
+
|
873
|
+
if _params.get('effective_at') is not None: # noqa: E501
|
874
|
+
_query_params.append(('effectiveAt', _params['effective_at']))
|
875
|
+
|
876
|
+
# process the header parameters
|
877
|
+
_header_params = dict(_params.get('_headers', {}))
|
878
|
+
# process the form parameters
|
879
|
+
_form_params = []
|
880
|
+
_files = {}
|
881
|
+
# process the body parameter
|
882
|
+
_body_params = None
|
883
|
+
if _params['derivation_formula_explain_request'] is not None:
|
884
|
+
_body_params = _params['derivation_formula_explain_request']
|
885
|
+
|
886
|
+
# set the HTTP header `Accept`
|
887
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
888
|
+
['text/plain', 'application/json', 'text/json']) # noqa: E501
|
889
|
+
|
890
|
+
# set the HTTP header `Content-Type`
|
891
|
+
_content_types_list = _params.get('_content_type',
|
892
|
+
self.api_client.select_header_content_type(
|
893
|
+
['application/json-patch+json', 'application/json', 'text/json', 'application/*+json']))
|
894
|
+
if _content_types_list:
|
895
|
+
_header_params['Content-Type'] = _content_types_list
|
896
|
+
|
897
|
+
# authentication setting
|
898
|
+
_auth_settings = ['oauth2'] # noqa: E501
|
899
|
+
|
900
|
+
_response_types_map = {
|
901
|
+
'200': "DerivedPropertyComponent",
|
902
|
+
'400': "LusidValidationProblemDetails",
|
903
|
+
}
|
904
|
+
|
905
|
+
return self.api_client.call_api(
|
906
|
+
'/api/propertydefinitions/derived/$formulaExplanation', 'GET',
|
907
|
+
_path_params,
|
908
|
+
_query_params,
|
909
|
+
_header_params,
|
910
|
+
body=_body_params,
|
911
|
+
post_params=_form_params,
|
912
|
+
files=_files,
|
913
|
+
response_types_map=_response_types_map,
|
914
|
+
auth_settings=_auth_settings,
|
915
|
+
async_req=_params.get('async_req'),
|
916
|
+
_return_http_data_only=_params.get('_return_http_data_only'), # noqa: E501
|
917
|
+
_preload_content=_params.get('_preload_content', True),
|
918
|
+
_request_timeout=_params.get('_request_timeout'),
|
919
|
+
opts=_params.get('opts'),
|
920
|
+
collection_formats=_collection_formats,
|
921
|
+
_request_auth=_params.get('_request_auth'))
|
922
|
+
|
923
|
+
|
744
924
|
@overload
|
745
925
|
async def get_multiple_property_definitions(self, property_keys : Annotated[conlist(StrictStr), Field(..., description="One or more property keys which identify each property that a definition should be retrieved for. The format for each property key is {domain}/{scope}/{code}, e.g. 'Portfolio/Manager/Id'.")], as_at : Annotated[Optional[datetime], Field(description="The asAt datetime at which to retrieve the property definitions. Defaults to return the latest version of each definition if not specified.")] = None, filter : Annotated[Optional[StrictStr], Field( description="Expression to filter the result set. For example, to filter on the Lifetime, use \"lifeTime eq 'Perpetual'\" Read more about filtering results from LUSID here https://support.lusid.com/filtering-results-from-lusid.")] = None, effective_at : Annotated[Optional[StrictStr], Field( description="The effective datetime or cut label at which to list properties attached to the Property Definition. Defaults to the current LUSID system datetime if not specified.")] = None, **kwargs) -> ResourceListOfPropertyDefinition: # noqa: E501
|
746
926
|
...
|
lusid/configuration.py
CHANGED
@@ -445,7 +445,7 @@ class Configuration:
|
|
445
445
|
return "Python SDK Debug Report:\n"\
|
446
446
|
"OS: {env}\n"\
|
447
447
|
"Python Version: {pyversion}\n"\
|
448
|
-
"Version of the API: 0.11.
|
448
|
+
"Version of the API: 0.11.8365\n"\
|
449
449
|
"SDK Package Version: {package_version}".\
|
450
450
|
format(env=sys.platform, pyversion=sys.version, package_version=package_version)
|
451
451
|
|
lusid/models/__init__.py
CHANGED
@@ -351,6 +351,8 @@ from lusid.models.deleted_entity_response import DeletedEntityResponse
|
|
351
351
|
from lusid.models.dependency_source_filter import DependencySourceFilter
|
352
352
|
from lusid.models.deposit_close_event import DepositCloseEvent
|
353
353
|
from lusid.models.deposit_interest_payment_event import DepositInterestPaymentEvent
|
354
|
+
from lusid.models.derivation_formula_explain_request import DerivationFormulaExplainRequest
|
355
|
+
from lusid.models.derived_property_component import DerivedPropertyComponent
|
354
356
|
from lusid.models.described_address_key import DescribedAddressKey
|
355
357
|
from lusid.models.dialect import Dialect
|
356
358
|
from lusid.models.dialect_id import DialectId
|
@@ -1649,6 +1651,8 @@ __all__ = [
|
|
1649
1651
|
"DependencySourceFilter",
|
1650
1652
|
"DepositCloseEvent",
|
1651
1653
|
"DepositInterestPaymentEvent",
|
1654
|
+
"DerivationFormulaExplainRequest",
|
1655
|
+
"DerivedPropertyComponent",
|
1652
1656
|
"DescribedAddressKey",
|
1653
1657
|
"Dialect",
|
1654
1658
|
"DialectId",
|
@@ -0,0 +1,105 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, Optional
|
22
|
+
from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr, constr, validator
|
23
|
+
|
24
|
+
class DerivationFormulaExplainRequest(BaseModel):
|
25
|
+
"""
|
26
|
+
DerivationFormulaExplainRequest
|
27
|
+
"""
|
28
|
+
entity_type: StrictStr = Field(...,alias="entityType", description="The type of the entity for which the derived property or partial formula is to be resolved against.")
|
29
|
+
scope: Optional[StrictStr] = Field(None,alias="scope", description="The scope that entity exists in. If no scope is provided, the default scope for the entity type will be used.")
|
30
|
+
identifier: Optional[Dict[str, StrictStr]] = Field(None, description="An identifier key/value pair that uniquely identifies the entity to explain the derived property for. This can be either an instrument identifier, an identifier property, or a scope/code identifier which take the format {entityType}/default/code : {identifier}. If no identifiers are provided, the logical evaluation tree without resolved values is returned.")
|
31
|
+
property_key: Optional[StrictStr] = Field(None,alias="propertyKey", description="The key of the derived property to explain. This takes the format {domain}/{scope}/{code}.")
|
32
|
+
partial_formula: Optional[StrictStr] = Field(None,alias="partialFormula", description="A partial derivation formula to explain. Can be provided in lieu of a property key.")
|
33
|
+
__properties = ["entityType", "scope", "identifier", "propertyKey", "partialFormula"]
|
34
|
+
|
35
|
+
class Config:
|
36
|
+
"""Pydantic configuration"""
|
37
|
+
allow_population_by_field_name = True
|
38
|
+
validate_assignment = True
|
39
|
+
|
40
|
+
def __str__(self):
|
41
|
+
"""For `print` and `pprint`"""
|
42
|
+
return pprint.pformat(self.dict(by_alias=False))
|
43
|
+
|
44
|
+
def __repr__(self):
|
45
|
+
"""For `print` and `pprint`"""
|
46
|
+
return self.to_str()
|
47
|
+
|
48
|
+
def to_str(self) -> str:
|
49
|
+
"""Returns the string representation of the model using alias"""
|
50
|
+
return pprint.pformat(self.dict(by_alias=True))
|
51
|
+
|
52
|
+
def to_json(self) -> str:
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
54
|
+
return json.dumps(self.to_dict())
|
55
|
+
|
56
|
+
@classmethod
|
57
|
+
def from_json(cls, json_str: str) -> DerivationFormulaExplainRequest:
|
58
|
+
"""Create an instance of DerivationFormulaExplainRequest from a JSON string"""
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
60
|
+
|
61
|
+
def to_dict(self):
|
62
|
+
"""Returns the dictionary representation of the model using alias"""
|
63
|
+
_dict = self.dict(by_alias=True,
|
64
|
+
exclude={
|
65
|
+
},
|
66
|
+
exclude_none=True)
|
67
|
+
# set to None if scope (nullable) is None
|
68
|
+
# and __fields_set__ contains the field
|
69
|
+
if self.scope is None and "scope" in self.__fields_set__:
|
70
|
+
_dict['scope'] = None
|
71
|
+
|
72
|
+
# set to None if identifier (nullable) is None
|
73
|
+
# and __fields_set__ contains the field
|
74
|
+
if self.identifier is None and "identifier" in self.__fields_set__:
|
75
|
+
_dict['identifier'] = None
|
76
|
+
|
77
|
+
# set to None if property_key (nullable) is None
|
78
|
+
# and __fields_set__ contains the field
|
79
|
+
if self.property_key is None and "property_key" in self.__fields_set__:
|
80
|
+
_dict['propertyKey'] = None
|
81
|
+
|
82
|
+
# set to None if partial_formula (nullable) is None
|
83
|
+
# and __fields_set__ contains the field
|
84
|
+
if self.partial_formula is None and "partial_formula" in self.__fields_set__:
|
85
|
+
_dict['partialFormula'] = None
|
86
|
+
|
87
|
+
return _dict
|
88
|
+
|
89
|
+
@classmethod
|
90
|
+
def from_dict(cls, obj: dict) -> DerivationFormulaExplainRequest:
|
91
|
+
"""Create an instance of DerivationFormulaExplainRequest from a dict"""
|
92
|
+
if obj is None:
|
93
|
+
return None
|
94
|
+
|
95
|
+
if not isinstance(obj, dict):
|
96
|
+
return DerivationFormulaExplainRequest.parse_obj(obj)
|
97
|
+
|
98
|
+
_obj = DerivationFormulaExplainRequest.parse_obj({
|
99
|
+
"entity_type": obj.get("entityType"),
|
100
|
+
"scope": obj.get("scope"),
|
101
|
+
"identifier": obj.get("identifier"),
|
102
|
+
"property_key": obj.get("propertyKey"),
|
103
|
+
"partial_formula": obj.get("partialFormula")
|
104
|
+
})
|
105
|
+
return _obj
|
@@ -0,0 +1,131 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
|
3
|
+
"""
|
4
|
+
LUSID API
|
5
|
+
|
6
|
+
FINBOURNE Technology # noqa: E501
|
7
|
+
|
8
|
+
Contact: info@finbourne.com
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
10
|
+
|
11
|
+
Do not edit the class manually.
|
12
|
+
"""
|
13
|
+
|
14
|
+
|
15
|
+
from __future__ import annotations
|
16
|
+
import pprint
|
17
|
+
import re # noqa: F401
|
18
|
+
import json
|
19
|
+
|
20
|
+
|
21
|
+
from typing import Any, Dict, List, Optional
|
22
|
+
from pydantic.v1 import StrictStr, Field, BaseModel, Field, StrictStr, conlist
|
23
|
+
from lusid.models.link import Link
|
24
|
+
from lusid.models.property_value import PropertyValue
|
25
|
+
|
26
|
+
class DerivedPropertyComponent(BaseModel):
|
27
|
+
"""
|
28
|
+
DerivedPropertyComponent
|
29
|
+
"""
|
30
|
+
component: Optional[StrictStr] = Field(None,alias="component", description="The component of the formula which is being evaluated.")
|
31
|
+
type: Optional[StrictStr] = Field(None,alias="type", description="The type of the formula component. This can be a Literal, Variable, DerivedProperty, or PartialFormula.")
|
32
|
+
value: Optional[PropertyValue] = None
|
33
|
+
derivation_formula: Optional[StrictStr] = Field(None,alias="derivationFormula", description="The derivation formula of the component. This field will only be populated if the component is a derived property.")
|
34
|
+
sub_components: Optional[conlist(DerivedPropertyComponent)] = Field(None, alias="subComponents", description="Any sub-components of this formula. If this formula cannot be further decomposed, this collection will be null.")
|
35
|
+
links: Optional[conlist(Link)] = None
|
36
|
+
__properties = ["component", "type", "value", "derivationFormula", "subComponents", "links"]
|
37
|
+
|
38
|
+
class Config:
|
39
|
+
"""Pydantic configuration"""
|
40
|
+
allow_population_by_field_name = True
|
41
|
+
validate_assignment = True
|
42
|
+
|
43
|
+
def __str__(self):
|
44
|
+
"""For `print` and `pprint`"""
|
45
|
+
return pprint.pformat(self.dict(by_alias=False))
|
46
|
+
|
47
|
+
def __repr__(self):
|
48
|
+
"""For `print` and `pprint`"""
|
49
|
+
return self.to_str()
|
50
|
+
|
51
|
+
def to_str(self) -> str:
|
52
|
+
"""Returns the string representation of the model using alias"""
|
53
|
+
return pprint.pformat(self.dict(by_alias=True))
|
54
|
+
|
55
|
+
def to_json(self) -> str:
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
57
|
+
return json.dumps(self.to_dict())
|
58
|
+
|
59
|
+
@classmethod
|
60
|
+
def from_json(cls, json_str: str) -> DerivedPropertyComponent:
|
61
|
+
"""Create an instance of DerivedPropertyComponent from a JSON string"""
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
63
|
+
|
64
|
+
def to_dict(self):
|
65
|
+
"""Returns the dictionary representation of the model using alias"""
|
66
|
+
_dict = self.dict(by_alias=True,
|
67
|
+
exclude={
|
68
|
+
},
|
69
|
+
exclude_none=True)
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of value
|
71
|
+
if self.value:
|
72
|
+
_dict['value'] = self.value.to_dict()
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of each item in sub_components (list)
|
74
|
+
_items = []
|
75
|
+
if self.sub_components:
|
76
|
+
for _item in self.sub_components:
|
77
|
+
if _item:
|
78
|
+
_items.append(_item.to_dict())
|
79
|
+
_dict['subComponents'] = _items
|
80
|
+
# override the default output from pydantic by calling `to_dict()` of each item in links (list)
|
81
|
+
_items = []
|
82
|
+
if self.links:
|
83
|
+
for _item in self.links:
|
84
|
+
if _item:
|
85
|
+
_items.append(_item.to_dict())
|
86
|
+
_dict['links'] = _items
|
87
|
+
# set to None if component (nullable) is None
|
88
|
+
# and __fields_set__ contains the field
|
89
|
+
if self.component is None and "component" in self.__fields_set__:
|
90
|
+
_dict['component'] = None
|
91
|
+
|
92
|
+
# set to None if type (nullable) is None
|
93
|
+
# and __fields_set__ contains the field
|
94
|
+
if self.type is None and "type" in self.__fields_set__:
|
95
|
+
_dict['type'] = None
|
96
|
+
|
97
|
+
# set to None if derivation_formula (nullable) is None
|
98
|
+
# and __fields_set__ contains the field
|
99
|
+
if self.derivation_formula is None and "derivation_formula" in self.__fields_set__:
|
100
|
+
_dict['derivationFormula'] = None
|
101
|
+
|
102
|
+
# set to None if sub_components (nullable) is None
|
103
|
+
# and __fields_set__ contains the field
|
104
|
+
if self.sub_components is None and "sub_components" in self.__fields_set__:
|
105
|
+
_dict['subComponents'] = None
|
106
|
+
|
107
|
+
# set to None if links (nullable) is None
|
108
|
+
# and __fields_set__ contains the field
|
109
|
+
if self.links is None and "links" in self.__fields_set__:
|
110
|
+
_dict['links'] = None
|
111
|
+
|
112
|
+
return _dict
|
113
|
+
|
114
|
+
@classmethod
|
115
|
+
def from_dict(cls, obj: dict) -> DerivedPropertyComponent:
|
116
|
+
"""Create an instance of DerivedPropertyComponent from a dict"""
|
117
|
+
if obj is None:
|
118
|
+
return None
|
119
|
+
|
120
|
+
if not isinstance(obj, dict):
|
121
|
+
return DerivedPropertyComponent.parse_obj(obj)
|
122
|
+
|
123
|
+
_obj = DerivedPropertyComponent.parse_obj({
|
124
|
+
"component": obj.get("component"),
|
125
|
+
"type": obj.get("type"),
|
126
|
+
"value": PropertyValue.from_dict(obj.get("value")) if obj.get("value") is not None else None,
|
127
|
+
"derivation_formula": obj.get("derivationFormula"),
|
128
|
+
"sub_components": [DerivedPropertyComponent.from_dict(_item) for _item in obj.get("subComponents")] if obj.get("subComponents") is not None else None,
|
129
|
+
"links": [Link.from_dict(_item) for _item in obj.get("links")] if obj.get("links") is not None else None
|
130
|
+
})
|
131
|
+
return _obj
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: lusid-sdk
|
3
|
-
Version: 2.1.
|
3
|
+
Version: 2.1.980
|
4
4
|
Summary: LUSID API
|
5
5
|
Home-page: https://github.com/finbourne/lusid-sdk-python
|
6
6
|
License: MIT
|
@@ -493,6 +493,7 @@ Class | Method | HTTP request | Description
|
|
493
493
|
*PropertyDefinitionsApi* | [**create_property_definition**](docs/PropertyDefinitionsApi.md#create_property_definition) | **POST** /api/propertydefinitions | CreatePropertyDefinition: Create property definition
|
494
494
|
*PropertyDefinitionsApi* | [**delete_property_definition**](docs/PropertyDefinitionsApi.md#delete_property_definition) | **DELETE** /api/propertydefinitions/{domain}/{scope}/{code} | DeletePropertyDefinition: Delete property definition
|
495
495
|
*PropertyDefinitionsApi* | [**delete_property_definition_properties**](docs/PropertyDefinitionsApi.md#delete_property_definition_properties) | **POST** /api/propertydefinitions/{domain}/{scope}/{code}/properties/$delete | [EARLY ACCESS] DeletePropertyDefinitionProperties: Delete property definition properties
|
496
|
+
*PropertyDefinitionsApi* | [**get_derived_formula_explanation**](docs/PropertyDefinitionsApi.md#get_derived_formula_explanation) | **GET** /api/propertydefinitions/derived/$formulaExplanation | [INTERNAL] GetDerivedFormulaExplanation: Get explanation of a derived property formula
|
496
497
|
*PropertyDefinitionsApi* | [**get_multiple_property_definitions**](docs/PropertyDefinitionsApi.md#get_multiple_property_definitions) | **GET** /api/propertydefinitions | GetMultiplePropertyDefinitions: Get multiple property definitions
|
497
498
|
*PropertyDefinitionsApi* | [**get_property_definition**](docs/PropertyDefinitionsApi.md#get_property_definition) | **GET** /api/propertydefinitions/{domain}/{scope}/{code} | GetPropertyDefinition: Get property definition
|
498
499
|
*PropertyDefinitionsApi* | [**get_property_definition_property_time_series**](docs/PropertyDefinitionsApi.md#get_property_definition_property_time_series) | **GET** /api/propertydefinitions/{domain}/{scope}/{code}/properties/time-series | [EARLY ACCESS] GetPropertyDefinitionPropertyTimeSeries: Get Property Definition Property Time Series
|
@@ -1031,6 +1032,8 @@ Class | Method | HTTP request | Description
|
|
1031
1032
|
- [DependencySourceFilter](docs/DependencySourceFilter.md)
|
1032
1033
|
- [DepositCloseEvent](docs/DepositCloseEvent.md)
|
1033
1034
|
- [DepositInterestPaymentEvent](docs/DepositInterestPaymentEvent.md)
|
1035
|
+
- [DerivationFormulaExplainRequest](docs/DerivationFormulaExplainRequest.md)
|
1036
|
+
- [DerivedPropertyComponent](docs/DerivedPropertyComponent.md)
|
1034
1037
|
- [DescribedAddressKey](docs/DescribedAddressKey.md)
|
1035
1038
|
- [Dialect](docs/Dialect.md)
|
1036
1039
|
- [DialectId](docs/DialectId.md)
|
@@ -1,4 +1,4 @@
|
|
1
|
-
lusid/__init__.py,sha256=
|
1
|
+
lusid/__init__.py,sha256=7jMeT4MnqKaDCaHGTuADcb6mDXE0QE1V2SSlJn_ZF4k,147489
|
2
2
|
lusid/api/__init__.py,sha256=yCGwgeQBZ1RZovOUo7Jq24Txz4o6naRgnWAzQVGdHAk,6784
|
3
3
|
lusid/api/abor_api.py,sha256=EdyHrd5yRcz7MOffhFa1cgtcBaPuPJmbArHWIXv7tuQ,174322
|
4
4
|
lusid/api/abor_configuration_api.py,sha256=xQ9HcXm02eDFhCdWUHjqFRWl1oQMxm2LNObJ9kcLauU,84216
|
@@ -49,7 +49,7 @@ lusid/api/persons_api.py,sha256=SlNOfUj8ww6vBD-zQoisNNe45scWn1QNkDOZu8ostb4,2502
|
|
49
49
|
lusid/api/placements_api.py,sha256=LsjljDP59rUcpkkGG_hJX-HX06fFIeNnoVomsFpL-QY,45498
|
50
50
|
lusid/api/portfolio_groups_api.py,sha256=dnbfzVTb7Ytn2PjHW4KcQD7w9PK2Swjz1zpgPPdPXXA,371285
|
51
51
|
lusid/api/portfolios_api.py,sha256=noShU8FEhBz1FEIWc9WQMuPnk9mlhSmZuZcoKax8SCY,417537
|
52
|
-
lusid/api/property_definitions_api.py,sha256=
|
52
|
+
lusid/api/property_definitions_api.py,sha256=PdAXmqxvhX5UXiD8wRo320LdFBVxKH_S7frwIl0nPDQ,149142
|
53
53
|
lusid/api/queryable_keys_api.py,sha256=oZWb9BugLDEKmYay_DhuYu4B7pwEramzz5dBHiqgGsc,10297
|
54
54
|
lusid/api/quotes_api.py,sha256=39bA_DRmTQDsvQ16xHqiAb3aOAGCBOBbxKJ2M_C6mao,112799
|
55
55
|
lusid/api/reconciliations_api.py,sha256=3E0OpDv4f6Si8wF1HCEItx0wp27Ii_UHR5FG40f6F5Q,140586
|
@@ -80,7 +80,7 @@ lusid/api/translation_api.py,sha256=xpRuTfwQvYBlWe6r_L2EI_uVpXqHFnEOim-i-kVQ85E,
|
|
80
80
|
lusid/api/workspace_api.py,sha256=0pCNi3ZCRbIo0NXKa85XE7vtq0WV5YOKcQKvFlcLUaY,120708
|
81
81
|
lusid/api_client.py,sha256=ewMTmf9SRurY8pYnUx9jy24RdldPCOa4US38pnrVxjA,31140
|
82
82
|
lusid/api_response.py,sha256=6-gnhty6lu8MMAERt3_kTVD7UxQgWFfcjgpcq6iN5IU,855
|
83
|
-
lusid/configuration.py,sha256=
|
83
|
+
lusid/configuration.py,sha256=cdwzWeOI9jdxmV3eiIarjHai2DX4Nm4KDqDO5WxQ1iE,17980
|
84
84
|
lusid/exceptions.py,sha256=HIQwgmQrszLlcVCLaqex8dO0laVuejUyOMz7U2ZWJ6s,5326
|
85
85
|
lusid/extensions/__init__.py,sha256=dzDHEzpn-9smd2-_UMWQzeyX6Ha4jGf6fnqx7qxKxNI,630
|
86
86
|
lusid/extensions/api_client.py,sha256=GzygWg_h603QK1QS2HvAijuE2R1TnvoF6-Yg0CeM3ug,30943
|
@@ -95,7 +95,7 @@ lusid/extensions/rest.py,sha256=dp-bD_LMR2zAL1tmC3-urhWKLomXx7r5iGN1VteMBVQ,1601
|
|
95
95
|
lusid/extensions/retry.py,sha256=EhW9OKJmGHipxN3H7eROH5DiMlAnfBVl95NQrttcsdg,14834
|
96
96
|
lusid/extensions/socket_keep_alive.py,sha256=eX5ICvGfVzUCGIm80Q2RknfFZrBQAdnrcpY61M29V_k,1997
|
97
97
|
lusid/extensions/tcp_keep_alive_connector.py,sha256=zaGtUsygRsxB1_4B3x39K3ILwztdhMLDv5bFZV7zmGE,3877
|
98
|
-
lusid/models/__init__.py,sha256=
|
98
|
+
lusid/models/__init__.py,sha256=ZTmJc1-mETQ0J9F39X7ggKOGs_q3niYo-Z1I0f8Kxko,139673
|
99
99
|
lusid/models/a2_b_breakdown.py,sha256=-FXgILrvtZXQDmvS0ARaJVGBq5LJ4AH-o3HjujFVmS4,3198
|
100
100
|
lusid/models/a2_b_category.py,sha256=WunXUgx-dCnApPeLC8Qo5tVCX8Ywxkehib1vmNqNgNs,2957
|
101
101
|
lusid/models/a2_b_data_record.py,sha256=qANTmV1_HUEo4l72-F8qzZjlQxOe0Onc9WPz7h-WWuY,9993
|
@@ -433,6 +433,8 @@ lusid/models/deleted_entity_response.py,sha256=B11ZEZwBxb_PLgbykXdBdLo6Iu6O8Otzq
|
|
433
433
|
lusid/models/dependency_source_filter.py,sha256=4GKl5zFqKpWH4ob8beEW7AgSQ97NffrxUXVeRZZU8ec,5939
|
434
434
|
lusid/models/deposit_close_event.py,sha256=XSLQbANRq2ADWjZ9N4tkxBlMd4RHQHaOQg16OTpbs8o,11341
|
435
435
|
lusid/models/deposit_interest_payment_event.py,sha256=7gxsFwx1inGEEwSy0UGNoNxobTg67GASgoM8if031fw,11782
|
436
|
+
lusid/models/derivation_formula_explain_request.py,sha256=p7eflm_24FSlekRFQrYn2mbkYg07Mdxvg_XfqvRF0vg,4481
|
437
|
+
lusid/models/derived_property_component.py,sha256=ZGFCCt8fCprTvEoCWk-A8zsmHndZCf757kQyOI2xuf0,5490
|
436
438
|
lusid/models/described_address_key.py,sha256=UHxYHgYe3uM-6rQSTCzeEqft0ngze4TdCc-JesxCp_I,2932
|
437
439
|
lusid/models/dialect.py,sha256=oiXWtrDKwEoOa9yGObMfDLhH0QlJAaKOgCRraDYiim0,3227
|
438
440
|
lusid/models/dialect_id.py,sha256=MLBNhLcBs2nrJZU7hZEFdkkDPOL_JAnbbXbEAZqO1Rg,3176
|
@@ -1393,6 +1395,6 @@ lusid/models/year_month_day.py,sha256=gwSoxFwlD_wffKdddo1wfvAcLq3Cht3FHQidiaHzAA
|
|
1393
1395
|
lusid/models/yield_curve_data.py,sha256=sifVmM0PAAB9wfI3aKf4dLbZS45bqiRv9ffZxQx7JRU,9663
|
1394
1396
|
lusid/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
1395
1397
|
lusid/rest.py,sha256=HQT__5LQEMu6_1sLKvYj-DI4FH1DJXBIPYfZCTTyrY4,13431
|
1396
|
-
lusid_sdk-2.1.
|
1397
|
-
lusid_sdk-2.1.
|
1398
|
-
lusid_sdk-2.1.
|
1398
|
+
lusid_sdk-2.1.980.dist-info/METADATA,sha256=Wcqh2Ckzywwk0CJbGIVLCaH8CnUWHmfTd-o5Cwg5dtk,234543
|
1399
|
+
lusid_sdk-2.1.980.dist-info/WHEEL,sha256=Nq82e9rUAnEjt98J6MlVmMCZb-t9cYE2Ir1kpBmnWfs,88
|
1400
|
+
lusid_sdk-2.1.980.dist-info/RECORD,,
|
File without changes
|