everysk-lib 1.10.2__cp312-cp312-win_amd64.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.
Files changed (137) hide show
  1. everysk/__init__.py +30 -0
  2. everysk/_version.py +683 -0
  3. everysk/api/__init__.py +61 -0
  4. everysk/api/api_requestor.py +167 -0
  5. everysk/api/api_resources/__init__.py +23 -0
  6. everysk/api/api_resources/api_resource.py +371 -0
  7. everysk/api/api_resources/calculation.py +779 -0
  8. everysk/api/api_resources/custom_index.py +42 -0
  9. everysk/api/api_resources/datastore.py +81 -0
  10. everysk/api/api_resources/file.py +42 -0
  11. everysk/api/api_resources/market_data.py +223 -0
  12. everysk/api/api_resources/parser.py +66 -0
  13. everysk/api/api_resources/portfolio.py +43 -0
  14. everysk/api/api_resources/private_security.py +42 -0
  15. everysk/api/api_resources/report.py +65 -0
  16. everysk/api/api_resources/report_template.py +39 -0
  17. everysk/api/api_resources/tests.py +115 -0
  18. everysk/api/api_resources/worker_execution.py +64 -0
  19. everysk/api/api_resources/workflow.py +65 -0
  20. everysk/api/api_resources/workflow_execution.py +93 -0
  21. everysk/api/api_resources/workspace.py +42 -0
  22. everysk/api/http_client.py +63 -0
  23. everysk/api/tests.py +32 -0
  24. everysk/api/utils.py +262 -0
  25. everysk/config.py +451 -0
  26. everysk/core/_tests/serialize/test_json.py +336 -0
  27. everysk/core/_tests/serialize/test_orjson.py +295 -0
  28. everysk/core/_tests/serialize/test_pickle.py +48 -0
  29. everysk/core/cloud_function/main.py +78 -0
  30. everysk/core/cloud_function/tests.py +86 -0
  31. everysk/core/compress.py +245 -0
  32. everysk/core/datetime/__init__.py +12 -0
  33. everysk/core/datetime/calendar.py +144 -0
  34. everysk/core/datetime/date.py +424 -0
  35. everysk/core/datetime/date_expression.py +299 -0
  36. everysk/core/datetime/date_mixin.py +1475 -0
  37. everysk/core/datetime/date_settings.py +30 -0
  38. everysk/core/datetime/datetime.py +713 -0
  39. everysk/core/exceptions.py +435 -0
  40. everysk/core/fields.py +1176 -0
  41. everysk/core/firestore.py +555 -0
  42. everysk/core/fixtures/_settings.py +29 -0
  43. everysk/core/fixtures/other/_settings.py +18 -0
  44. everysk/core/fixtures/user_agents.json +88 -0
  45. everysk/core/http.py +691 -0
  46. everysk/core/lists.py +92 -0
  47. everysk/core/log.py +709 -0
  48. everysk/core/number.py +37 -0
  49. everysk/core/object.py +1469 -0
  50. everysk/core/redis.py +1021 -0
  51. everysk/core/retry.py +51 -0
  52. everysk/core/serialize.py +674 -0
  53. everysk/core/sftp.py +414 -0
  54. everysk/core/signing.py +53 -0
  55. everysk/core/slack.py +127 -0
  56. everysk/core/string.py +199 -0
  57. everysk/core/tests.py +240 -0
  58. everysk/core/threads.py +199 -0
  59. everysk/core/undefined.py +70 -0
  60. everysk/core/unittests.py +73 -0
  61. everysk/core/workers.py +241 -0
  62. everysk/sdk/__init__.py +23 -0
  63. everysk/sdk/base.py +98 -0
  64. everysk/sdk/brutils/cnpj.py +391 -0
  65. everysk/sdk/brutils/cnpj_pd.py +129 -0
  66. everysk/sdk/engines/__init__.py +26 -0
  67. everysk/sdk/engines/cache.py +185 -0
  68. everysk/sdk/engines/compliance.py +37 -0
  69. everysk/sdk/engines/cryptography.py +69 -0
  70. everysk/sdk/engines/expression.cp312-win_amd64.pyd +0 -0
  71. everysk/sdk/engines/expression.pyi +55 -0
  72. everysk/sdk/engines/helpers.cp312-win_amd64.pyd +0 -0
  73. everysk/sdk/engines/helpers.pyi +26 -0
  74. everysk/sdk/engines/lock.py +120 -0
  75. everysk/sdk/engines/market_data.py +244 -0
  76. everysk/sdk/engines/settings.py +19 -0
  77. everysk/sdk/entities/__init__.py +23 -0
  78. everysk/sdk/entities/base.py +784 -0
  79. everysk/sdk/entities/base_list.py +131 -0
  80. everysk/sdk/entities/custom_index/base.py +209 -0
  81. everysk/sdk/entities/custom_index/settings.py +29 -0
  82. everysk/sdk/entities/datastore/base.py +160 -0
  83. everysk/sdk/entities/datastore/settings.py +17 -0
  84. everysk/sdk/entities/fields.py +375 -0
  85. everysk/sdk/entities/file/base.py +215 -0
  86. everysk/sdk/entities/file/settings.py +63 -0
  87. everysk/sdk/entities/portfolio/base.py +248 -0
  88. everysk/sdk/entities/portfolio/securities.py +241 -0
  89. everysk/sdk/entities/portfolio/security.py +580 -0
  90. everysk/sdk/entities/portfolio/settings.py +97 -0
  91. everysk/sdk/entities/private_security/base.py +226 -0
  92. everysk/sdk/entities/private_security/settings.py +17 -0
  93. everysk/sdk/entities/query.py +603 -0
  94. everysk/sdk/entities/report/base.py +214 -0
  95. everysk/sdk/entities/report/settings.py +23 -0
  96. everysk/sdk/entities/script.py +310 -0
  97. everysk/sdk/entities/secrets/base.py +128 -0
  98. everysk/sdk/entities/secrets/script.py +119 -0
  99. everysk/sdk/entities/secrets/settings.py +17 -0
  100. everysk/sdk/entities/settings.py +48 -0
  101. everysk/sdk/entities/tags.py +174 -0
  102. everysk/sdk/entities/worker_execution/base.py +307 -0
  103. everysk/sdk/entities/worker_execution/settings.py +63 -0
  104. everysk/sdk/entities/workflow_execution/base.py +113 -0
  105. everysk/sdk/entities/workflow_execution/settings.py +32 -0
  106. everysk/sdk/entities/workspace/base.py +99 -0
  107. everysk/sdk/entities/workspace/settings.py +27 -0
  108. everysk/sdk/settings.py +67 -0
  109. everysk/sdk/tests.py +105 -0
  110. everysk/sdk/worker_base.py +47 -0
  111. everysk/server/__init__.py +9 -0
  112. everysk/server/applications.py +63 -0
  113. everysk/server/endpoints.py +516 -0
  114. everysk/server/example_api.py +69 -0
  115. everysk/server/middlewares.py +80 -0
  116. everysk/server/requests.py +62 -0
  117. everysk/server/responses.py +119 -0
  118. everysk/server/routing.py +64 -0
  119. everysk/server/settings.py +36 -0
  120. everysk/server/tests.py +36 -0
  121. everysk/settings.py +98 -0
  122. everysk/sql/__init__.py +9 -0
  123. everysk/sql/connection.py +232 -0
  124. everysk/sql/model.py +376 -0
  125. everysk/sql/query.py +417 -0
  126. everysk/sql/row_factory.py +63 -0
  127. everysk/sql/settings.py +49 -0
  128. everysk/sql/utils.py +129 -0
  129. everysk/tests.py +23 -0
  130. everysk/utils.py +81 -0
  131. everysk/version.py +15 -0
  132. everysk_lib-1.10.2.dist-info/.gitignore +5 -0
  133. everysk_lib-1.10.2.dist-info/METADATA +326 -0
  134. everysk_lib-1.10.2.dist-info/RECORD +137 -0
  135. everysk_lib-1.10.2.dist-info/WHEEL +5 -0
  136. everysk_lib-1.10.2.dist-info/licenses/LICENSE.txt +9 -0
  137. everysk_lib-1.10.2.dist-info/top_level.txt +2 -0
@@ -0,0 +1,42 @@
1
+ ###############################################################################
2
+ #
3
+ # (C) Copyright 2025 EVERYSK TECHNOLOGIES
4
+ #
5
+ # This is an unpublished work containing confidential and proprietary
6
+ # information of EVERYSK TECHNOLOGIES. Disclosure, use, or reproduction
7
+ # without authorization of EVERYSK TECHNOLOGIES is prohibited.
8
+ #
9
+ ###############################################################################
10
+
11
+ ###############################################################################
12
+ # Imports
13
+ ###############################################################################
14
+ from everysk.api.api_resources.api_resource import (
15
+ RetrievableAPIResource,
16
+ ListableAPIResource,
17
+ DeletableAPIResource,
18
+ CreateableAPIResource,
19
+ UpdateableAPIResource
20
+ )
21
+
22
+ ###############################################################################
23
+ # Custom Index Implementation
24
+ ###############################################################################
25
+ class CustomIndex(
26
+ RetrievableAPIResource,
27
+ ListableAPIResource,
28
+ DeletableAPIResource,
29
+ CreateableAPIResource,
30
+ UpdateableAPIResource
31
+ ):
32
+ """
33
+ Represents a custom index resource.
34
+
35
+ This class inherits from the following API resources:
36
+ - RetrievableAPIResource
37
+ - ListableAPIResource
38
+ - DeletableAPIResource
39
+ - CreateableAPIResource
40
+ - UpdateableAPIResource
41
+ """
42
+ pass
@@ -0,0 +1,81 @@
1
+ ###############################################################################
2
+ #
3
+ # (C) Copyright 2025 EVERYSK TECHNOLOGIES
4
+ #
5
+ # This is an unpublished work containing confidential and proprietary
6
+ # information of EVERYSK TECHNOLOGIES. Disclosure, use, or reproduction
7
+ # without authorization of EVERYSK TECHNOLOGIES is prohibited.
8
+ #
9
+ ###############################################################################
10
+
11
+ ###############################################################################
12
+ # Imports
13
+ ###############################################################################
14
+ from everysk.api.api_resources.api_resource import (
15
+ RetrievableAPIResource,
16
+ ListableAPIResource,
17
+ DeletableAPIResource,
18
+ CreateableAPIResource,
19
+ UpdateableAPIResource,
20
+ FilterableAPIResource
21
+ )
22
+ from everysk.api import utils
23
+
24
+ ###############################################################################
25
+ # Datastore Implementation
26
+ ###############################################################################
27
+ class Datastore(
28
+ RetrievableAPIResource,
29
+ ListableAPIResource,
30
+ DeletableAPIResource,
31
+ CreateableAPIResource,
32
+ UpdateableAPIResource,
33
+ FilterableAPIResource
34
+ ):
35
+ @classmethod
36
+ def explore(cls, **kwargs):
37
+ """
38
+ Explores the Datastore resource by executing a query with specified parameters to retrieve or manipulate data
39
+ within a given workspace.
40
+
41
+ Args:
42
+ user_id (int):
43
+ The ID of the user initiating the request, ensuring that the operation is conducted within
44
+ the user's context and permissions.
45
+
46
+ user_role (str):
47
+ The role of the user, which may define the access level and capabilities within the explore operation.
48
+
49
+ user_time_zone (str):
50
+ The user's time zone, which can influence how time-based data is retrieved or displayed.
51
+
52
+ model (object):
53
+ The model object or identifier specifying the data or views to be explored within the datastore.
54
+ This parameter is mandatory and should start with 'view_' if it's a string object.
55
+
56
+ overwrites (object, optional):
57
+ An optional object containing properties to overwrite in the model. This allows
58
+ for dynamic modifications to the model during the exploration.
59
+
60
+ workspace (str):
61
+ The workspace identifier within which the exploration is to be conducted. This parameter is mandatory
62
+ and specifies the context or environment for the operation.
63
+
64
+ Returns:
65
+ dict: The response from the API request.
66
+
67
+ Example:
68
+ >>> response = ClassName.explore(
69
+ >>> ... user_id=12345,
70
+ >>> ... user_role='analyst',
71
+ >>> ... user_time_zone='UTC',
72
+ >>> ... model={'some_model_key': 'some_model_value'},
73
+ >>> ... overwrites={'key_to_overwrite': 'new_value'},
74
+ >>> ... workspace='my_workspace'
75
+ >>> )
76
+ >>> print(response)
77
+ """
78
+ api_req = utils.create_api_requestor(kwargs)
79
+ url = f'/{cls.class_name_list()}/explore'
80
+ response = api_req.post(url, kwargs)
81
+ return response
@@ -0,0 +1,42 @@
1
+ ###############################################################################
2
+ #
3
+ # (C) Copyright 2025 EVERYSK TECHNOLOGIES
4
+ #
5
+ # This is an unpublished work containing confidential and proprietary
6
+ # information of EVERYSK TECHNOLOGIES. Disclosure, use, or reproduction
7
+ # without authorization of EVERYSK TECHNOLOGIES is prohibited.
8
+ #
9
+ ###############################################################################
10
+
11
+ ###############################################################################
12
+ # Imports
13
+ ###############################################################################
14
+ from everysk.api.api_resources.api_resource import (
15
+ RetrievableAPIResource,
16
+ ListableAPIResource,
17
+ DeletableAPIResource,
18
+ CreateableAPIResource,
19
+ UpdateableAPIResource
20
+ )
21
+
22
+ ###############################################################################
23
+ # File Implementation
24
+ ###############################################################################
25
+ class File(
26
+ RetrievableAPIResource,
27
+ ListableAPIResource,
28
+ DeletableAPIResource,
29
+ CreateableAPIResource,
30
+ UpdateableAPIResource
31
+ ):
32
+ """
33
+ Represents a file resource.
34
+
35
+ This class inherits from the following API resource classes:
36
+ - RetrievableAPIResource
37
+ - ListableAPIResource
38
+ - DeletableAPIResource
39
+ - CreateableAPIResource
40
+ - UpdateableAPIResource
41
+ """
42
+ pass
@@ -0,0 +1,223 @@
1
+ ###############################################################################
2
+ #
3
+ # (C) Copyright 2025 EVERYSK TECHNOLOGIES
4
+ #
5
+ # This is an unpublished work containing confidential and proprietary
6
+ # information of EVERYSK TECHNOLOGIES. Disclosure, use, or reproduction
7
+ # without authorization of EVERYSK TECHNOLOGIES is prohibited.
8
+ #
9
+ ###############################################################################
10
+
11
+ ###############################################################################
12
+ # Imports
13
+ ###############################################################################
14
+ from everysk.api.api_resources.api_resource import APIResource
15
+ from everysk.api import utils
16
+
17
+ ###############################################################################
18
+ # Market Data Implementation
19
+ ###############################################################################
20
+ class MarketData(APIResource):
21
+
22
+ def refresh(self): # pylint: disable=arguments-differ
23
+ """
24
+ Refreshes the current instance of MarketData.
25
+ """
26
+ return self
27
+
28
+ @classmethod
29
+ def class_url(cls) -> str:
30
+ """
31
+ Returns the class URL in the following format: '/market_data'
32
+
33
+ Returns:
34
+ str: The class url
35
+
36
+ Example:
37
+ >>> from everysk.api.api_resources.market_data import MarketData
38
+ >>> MarketData.class_url()
39
+ >>> '/market_data'
40
+ """
41
+ return f'/{cls.class_name()}'
42
+
43
+ @classmethod
44
+ def __call_method(cls, method, **kwargs):
45
+ """
46
+ A generic function to call various methods on the MarketData object dynamically.
47
+ It constructs and sends an API request based on the specified method and additional keyword arguments.
48
+
49
+ Args:
50
+ method (str):
51
+ The name of the method to be called on the MarketData object.
52
+
53
+ **kwargs:
54
+ Variable keyword arguments that are passed to the method being called.
55
+ These arguments should align with the expected parameters of the target method.
56
+
57
+ Returns:
58
+ response: The response from the API after executing the specified method with the provided arguments.
59
+ """
60
+ api_req = utils.create_api_requestor(kwargs)
61
+ url = f'{cls.class_url()}/{method}'
62
+ response = api_req.post(url, kwargs)
63
+ return response
64
+
65
+ @classmethod
66
+ def symbolsSearch(cls, **kwargs):
67
+ """
68
+ Searches symbols in MarketData using the user's id to verify permissions and sessions.
69
+ The function internally calls '__call_method' with 'symbols_search' to perform the actual search operation.
70
+ The results and their format are dependent on the implementation of the 'symbols_search' method within the MarketData object.
71
+
72
+ Args:
73
+ **kwargs:
74
+ A dictionary of keyword arguments that should include, but not limited to:
75
+
76
+ user_id (str):
77
+ The ID of the user initiating the symbol search. It is essential for identifying the user's session and permissions.
78
+
79
+ user_role (str, optional):
80
+ The role of the user which may influence the search results based on role-based access controls.
81
+
82
+ time_zone (str, optional):
83
+ The user's time zone, potentially used to adjust the timing information in the search results.
84
+
85
+ query (str):
86
+ The search string used to query the symbol database. This parameter is essential for executing the search and must be provided.
87
+ """
88
+ return cls.__call_method('symbols_search', **kwargs)
89
+
90
+ @classmethod
91
+ def symbolsCheck(cls, **kwargs):
92
+ """
93
+ This class method checks the validity of market data symbols by invoking the 'symbols_check' method.
94
+ It validates the symbols against the current market data and potentially other validation criteria.
95
+ The outcome depends on the implementation of the 'symbols_check' method within the MarketData object.
96
+
97
+ Args:
98
+ **kwargs:
99
+ A dictionary of keyword arguments that should include:
100
+
101
+ securities (list):
102
+ A list of securities to be checked. Each security should be a dictionary containing at least 'symbol' and optionally 'quantity'.
103
+
104
+ date (str, optional):
105
+ The date for which the securities are to be validated. Defaults to a predefined portfolio date if not specified.
106
+
107
+ base_currency (str, optional):
108
+ The base currency to be used for validation. Defaults to a predefined currency if not specified.
109
+
110
+ Returns:
111
+ dict: The symbols check data
112
+ """
113
+ return cls.__call_method('symbols_check', **kwargs)
114
+
115
+ @classmethod
116
+ def symbolsPrice(cls, **kwargs):
117
+ """
118
+ Retrieves market prices for specified symbols on a given date using MarketData. This method
119
+ calls the 'symbols_price' method, passing the user's specifications for symbols and date.
120
+ The method internally delegates the request to '__call_method' with 'symbols_price' and the provided keyword arguments.
121
+ Which should align with the expected parameters of the 'symbols_price' method within the MarketData object.
122
+
123
+ Args:
124
+ **kwargs:
125
+ A dictionary of keyword arguments that should include:
126
+
127
+ user_id (str):
128
+ The ID of the user requesting the price data. Essential for access control and auditing.
129
+
130
+ user_role (str):
131
+ The role of the user which may influence data access permissions.
132
+
133
+ time_zone (str):
134
+ The time zone of the user, possibly affecting the timing and relevancy of the returned data.
135
+
136
+ symbols (list):
137
+ A list of symbol identifiers for which prices are being retrieved. This is a mandatory argument.
138
+
139
+ date (str, optional):
140
+ The specific date for which the price information is requested. Defaults to a pre-defined portfolio date if not provided.
141
+
142
+ Returns:
143
+ dict: The symbols price data.
144
+ """
145
+ return cls.__call_method('symbols_price', **kwargs)
146
+
147
+ @classmethod
148
+ def symbolsRealtimePrice(cls, **kwargs):
149
+ """
150
+ Retrieves real-time price data for specified symbols using MarketData. This method is
151
+ a wrapper around the 'symbols_real_time_prices' method, detailing the expected arguments and
152
+ processing them to fetch real-time prices.
153
+ This method utilizes '__call_method' to invoke 'symbols_real_time_prices' with the provided keyword arguments
154
+
155
+ Args:
156
+ **kwargs:
157
+ A dictionary of keyword arguments that should include:
158
+
159
+ user_id (str):
160
+ The ID of the user requesting real-time price data, important for identifying the session and applying data access rules.
161
+
162
+ user_role (str):
163
+ The role of the user, which may affect the scope of data accessible based on permissions.
164
+
165
+ time_zone (str):
166
+ The time zone specification of the user, potentially relevant for time-based data adjustments.
167
+
168
+ symbols (list):
169
+ A list of market data symbols for which real-time prices are requested. This argument is mandatory.
170
+
171
+ Returns:
172
+ dict: The real time price.
173
+ """
174
+ return cls.__call_method('symbols_real_time_prices', **kwargs)
175
+
176
+ @classmethod
177
+ def symbolsHistorical(cls, **kwargs):
178
+ """
179
+ Retrieves historical data for specified symbols from MarketData. This method interacts
180
+ with the 'symbols_historical' method, detailing the required arguments to fetch historical
181
+ price information.
182
+ The method internally calls '__call_method' with 'symbols_historical' and the provided keyword arguments.
183
+
184
+ Args:
185
+ **kwargs:
186
+ A dictionary of keyword arguments that should include:
187
+ user_id (str):
188
+ The ID of the user requesting historical data, crucial for access control and session identification.
189
+
190
+ user_role (str):
191
+ The role of the user, which can influence the granularity and scope of accessible data.
192
+
193
+ time_zone (str):
194
+ The user's time zone, potentially important for time-aligning the returned data.
195
+
196
+ symbols (list):
197
+ The list of symbols for which historical data is being requested. This is a mandatory field.
198
+
199
+ start_date (str, optional):
200
+ The start date for the historical data retrieval.
201
+
202
+ end_date (str, optional):
203
+ The end date for the historical data query.
204
+
205
+ fill_method (str, optional):
206
+ Method to fill missing data.
207
+
208
+ drop_na (bool, optional):
209
+ Flag to drop or retain missing values.
210
+
211
+ with_date_range (bool, optional):
212
+ Include a complete date range in the response.
213
+
214
+ periodicity (str, optional):
215
+ The granularity of the historical data.
216
+
217
+ vendor (str, optional):
218
+ The data vendor source.
219
+
220
+ Returns:
221
+ dict: The historical data.
222
+ """
223
+ return cls.__call_method('symbols_historical', **kwargs)
@@ -0,0 +1,66 @@
1
+ ###############################################################################
2
+ #
3
+ # (C) Copyright 2025 EVERYSK TECHNOLOGIES
4
+ #
5
+ # This is an unpublished work containing confidential and proprietary
6
+ # information of EVERYSK TECHNOLOGIES. Disclosure, use, or reproduction
7
+ # without authorization of EVERYSK TECHNOLOGIES is prohibited.
8
+ #
9
+ ###############################################################################
10
+
11
+ ###############################################################################
12
+ # Imports
13
+ ###############################################################################
14
+ from everysk.api.api_resources.api_resource import APIResource
15
+ from everysk.api import utils
16
+
17
+ ###############################################################################
18
+ # Parser Implementation
19
+ ###############################################################################
20
+ class Parser(
21
+ APIResource
22
+ ):
23
+
24
+ @classmethod
25
+ def __call_method(cls, method, **kwargs):
26
+ """
27
+ A generic method to call various methods on the Parser object. This function dynamically
28
+ constructs and executes an API request based on the specified method and additional arguments.
29
+ It constructs and sends an API request, adapting the URL method and the arguments provided.
30
+ Since this is a generic function, the callers must ensure that the 'method' argument and the '**kwargs' are appropriate for the specific API function.
31
+
32
+ Args:
33
+ method (str):
34
+ The name of the method to be called. This method should correspond to a valid API endpoint
35
+ or a function within the class, determining the nature of the API request to be made.
36
+
37
+ **kwargs:
38
+ A variable set of keyword arguments. These are passed dynamically to the method being called and
39
+ should align with the expected parameters for that specific method or API endpoint.
40
+
41
+ Returns:
42
+ dict: The API response.
43
+
44
+ Example:
45
+ Assuming there's a method 'fetch_data' that expects parameters 'data_id' and 'filter':
46
+ >>> response = ClassName.__call_method('fetch_data', data_id=123, filter='typeA')
47
+ >>> print(response)
48
+ """
49
+ api_req = utils.create_api_requestor(kwargs)
50
+ url = f'{cls.class_url()}/{method}'
51
+ response = api_req.post(url, kwargs)
52
+ return response
53
+
54
+ @classmethod
55
+ def parse(cls, method, **kwargs):
56
+ """
57
+ Parses data using the specified method.
58
+
59
+ Args:
60
+ method (str): The parsing method.
61
+ **kwargs: Additional keyword arguments.
62
+
63
+ Returns:
64
+ dict: The parsed data.
65
+ """
66
+ return cls.__call_method(f'{method}/parse', **kwargs)
@@ -0,0 +1,43 @@
1
+ ###############################################################################
2
+ #
3
+ # (C) Copyright 2025 EVERYSK TECHNOLOGIES
4
+ #
5
+ # This is an unpublished work containing confidential and proprietary
6
+ # information of EVERYSK TECHNOLOGIES. Disclosure, use, or reproduction
7
+ # without authorization of EVERYSK TECHNOLOGIES is prohibited.
8
+ #
9
+ ###############################################################################
10
+
11
+ ###############################################################################
12
+ # Imports
13
+ ###############################################################################
14
+ from everysk.api.api_resources.api_resource import (
15
+ RetrievableAPIResource,
16
+ ListableAPIResource,
17
+ DeletableAPIResource,
18
+ CreateableAPIResource,
19
+ UpdateableAPIResource,
20
+ FilterableAPIResource
21
+ )
22
+
23
+ ###############################################################################
24
+ # Portfolio Implementation
25
+ ###############################################################################
26
+ class Portfolio(
27
+ RetrievableAPIResource,
28
+ ListableAPIResource,
29
+ DeletableAPIResource,
30
+ CreateableAPIResource,
31
+ UpdateableAPIResource,
32
+ FilterableAPIResource
33
+ ):
34
+ """
35
+ This class inherits from various API resource classes to provide different operations on the portfolio resource:
36
+ - RetrievableAPIResource
37
+ - ListableAPIResource
38
+ - DeletableAPIResource
39
+ - CreateableAPIResource
40
+ - UpdateableAPIResource
41
+ - FilterableAPIResource
42
+ """
43
+ pass
@@ -0,0 +1,42 @@
1
+ ###############################################################################
2
+ #
3
+ # (C) Copyright 2025 EVERYSK TECHNOLOGIES
4
+ #
5
+ # This is an unpublished work containing confidential and proprietary
6
+ # information of EVERYSK TECHNOLOGIES. Disclosure, use, or reproduction
7
+ # without authorization of EVERYSK TECHNOLOGIES is prohibited.
8
+ #
9
+ ###############################################################################
10
+
11
+ ###############################################################################
12
+ # Imports
13
+ ###############################################################################
14
+ from everysk.api.api_resources.api_resource import (
15
+ RetrievableAPIResource,
16
+ ListableAPIResource,
17
+ DeletableAPIResource,
18
+ CreateableAPIResource,
19
+ UpdateableAPIResource
20
+ )
21
+
22
+ ###############################################################################
23
+ # Private Security Implementation
24
+ ###############################################################################
25
+ class PrivateSecurity(
26
+ RetrievableAPIResource,
27
+ ListableAPIResource,
28
+ DeletableAPIResource,
29
+ CreateableAPIResource,
30
+ UpdateableAPIResource
31
+ ):
32
+ """
33
+ Represents a private security resource.
34
+
35
+ This class inherits from the following API resource classes:
36
+ - RetrievableAPIResource
37
+ - ListableAPIResource
38
+ - DeletableAPIResource
39
+ - CreateableAPIResource
40
+ - UpdateableAPIResource
41
+ """
42
+ pass
@@ -0,0 +1,65 @@
1
+ ###############################################################################
2
+ #
3
+ # (C) Copyright 2025 EVERYSK TECHNOLOGIES
4
+ #
5
+ # This is an unpublished work containing confidential and proprietary
6
+ # information of EVERYSK TECHNOLOGIES. Disclosure, use, or reproduction
7
+ # without authorization of EVERYSK TECHNOLOGIES is prohibited.
8
+ #
9
+ ###############################################################################
10
+
11
+ ###############################################################################
12
+ # Imports
13
+ ###############################################################################
14
+ from everysk.api.api_resources.api_resource import (
15
+ RetrievableAPIResource,
16
+ ListableAPIResource,
17
+ DeletableAPIResource,
18
+ UpdateableAPIResource
19
+ )
20
+ from everysk.api import utils
21
+
22
+ ###############################################################################
23
+ # Report Implementation
24
+ ###############################################################################
25
+ class Report(
26
+ RetrievableAPIResource,
27
+ ListableAPIResource,
28
+ DeletableAPIResource,
29
+ UpdateableAPIResource
30
+ ):
31
+
32
+ def share(self, **kwargs):
33
+ """
34
+ Shares the current instance of the report by creating a shareable link. This method sends a POST request
35
+ to the API, setting up the sharing configurations based on the provided arguments.
36
+
37
+ Args:
38
+ expires_after (str, optional):
39
+ A key representing the time for the shareable link before it expires.
40
+ Valid keys and their corresponding time values should be predefined and
41
+ mapped correctly in the 'SHARED_URL_MAX_AGE_MAP'.
42
+
43
+ skin_theme (str, optional):
44
+ A key to determine the theme of the shared report. This should correspond to
45
+ one of the predefined themes in the 'SKIN_THEME_MAP'.
46
+
47
+ **kwargs:
48
+ Additional keyword arguments that are passed to the API endpoint, allowing further customization
49
+ of the share operation.
50
+
51
+ Returns:
52
+ Report: The updated report instance.
53
+
54
+ Example:
55
+ >>> report = Report.retrieve('report_id')
56
+ >>> report.share(user_id='user_id')
57
+ >>> Shared report_object
58
+ """
59
+ api_req = utils.create_api_requestor(kwargs)
60
+ url = f"{self.class_url()}/{self.get('id')}/share"
61
+ response = api_req.post(url, kwargs)
62
+ data = response[self.class_name()]
63
+ self.update(data)
64
+ self.clear_unsaved_values()
65
+ return self
@@ -0,0 +1,39 @@
1
+ ###############################################################################
2
+ #
3
+ # (C) Copyright 2025 EVERYSK TECHNOLOGIES
4
+ #
5
+ # This is an unpublished work containing confidential and proprietary
6
+ # information of EVERYSK TECHNOLOGIES. Disclosure, use, or reproduction
7
+ # without authorization of EVERYSK TECHNOLOGIES is prohibited.
8
+ #
9
+ ###############################################################################
10
+
11
+ ###############################################################################
12
+ # Imports
13
+ ###############################################################################
14
+ from everysk.api.api_resources.api_resource import (
15
+ DeletableAPIResource,
16
+ RetrievableAPIResource,
17
+ ListableAPIResource,
18
+ UpdateableAPIResource
19
+ )
20
+
21
+ ###############################################################################
22
+ # Report Template Implementation
23
+ ###############################################################################
24
+ class ReportTemplate(
25
+ RetrievableAPIResource,
26
+ ListableAPIResource,
27
+ DeletableAPIResource,
28
+ UpdateableAPIResource
29
+ ):
30
+ """
31
+ Represents a report template.
32
+
33
+ This class inherits from the following API resource classes:
34
+ - RetrievableAPIResource
35
+ - ListableAPIResource
36
+ - DeletableAPIResource
37
+ - UpdateableAPIResource
38
+ """
39
+ pass