dotstat_io 1.0.4__tar.gz → 1.0.6__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of dotstat_io might be problematic. Click here for more details.

@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.3
2
2
  Name: dotstat_io
3
- Version: 1.0.4
3
+ Version: 1.0.6
4
4
  Summary: Utility to download or upload data from/to .Stat Suite using ADFS authentication to connect to it
5
5
  License: MIT
6
6
  Author: Gyorgy Gyomai
@@ -144,13 +144,14 @@ returned_result = client_obj.download_data_stream(
144
144
  from dotstat_io.client import Client
145
145
  client_obj = Client.init_with_authentication_obj(Authentication_obj)
146
146
  returned_result = client_obj.upload_data_file(
147
- transfer_url, Path(file_path), space, validationType, use_filepath)
147
+ transfer_url, Path(file_path), space, validationType, use_filepath, optimize)
148
148
  ```
149
149
  * `transfer_url:` URL of the transfer service
150
150
  * `file_path:` The full path of the SDMX-CSV file to be imported
151
151
  * `space:` Data space where the file will be uploaded
152
152
  * `validationType:` The type of validation to use during upload. Possible values: Basic Validation (0), Advanced Validation (1)
153
153
  * `use_filepath:` Use a file path of a shared folder accessible by the .Stat Suite data upload engine (for unlimited file sizes)
154
+ * `optimize:` Controls whether optimization is applied after data changes
154
155
 
155
156
  #### 6. To upload an Excel data file to .Stat Suite:
156
157
  ```python
@@ -123,13 +123,14 @@ returned_result = client_obj.download_data_stream(
123
123
  from dotstat_io.client import Client
124
124
  client_obj = Client.init_with_authentication_obj(Authentication_obj)
125
125
  returned_result = client_obj.upload_data_file(
126
- transfer_url, Path(file_path), space, validationType, use_filepath)
126
+ transfer_url, Path(file_path), space, validationType, use_filepath, optimize)
127
127
  ```
128
128
  * `transfer_url:` URL of the transfer service
129
129
  * `file_path:` The full path of the SDMX-CSV file to be imported
130
130
  * `space:` Data space where the file will be uploaded
131
131
  * `validationType:` The type of validation to use during upload. Possible values: Basic Validation (0), Advanced Validation (1)
132
132
  * `use_filepath:` Use a file path of a shared folder accessible by the .Stat Suite data upload engine (for unlimited file sizes)
133
+ * `optimize:` Controls whether optimization is applied after data changes
133
134
 
134
135
  #### 6. To upload an Excel data file to .Stat Suite:
135
136
  ```python
@@ -156,7 +156,8 @@ class Client():
156
156
  file_path: Path,
157
157
  space: str,
158
158
  validationType: int,
159
- use_filepath: bool = False):
159
+ use_filepath: bool = False,
160
+ optimize: bool = True):
160
161
  try:
161
162
  returned_result = ""
162
163
 
@@ -166,7 +167,8 @@ class Client():
166
167
 
167
168
  payload = {
168
169
  'dataspace': space,
169
- 'validationType': validationType
170
+ 'validationType': validationType,
171
+ 'optimize': optimize
170
172
  }
171
173
 
172
174
  headers = {
@@ -178,12 +180,14 @@ class Client():
178
180
  files = {
179
181
  'dataspace': (None, payload['dataspace']),
180
182
  'validationType': (None, payload['validationType']),
183
+ 'optimize': (None, payload['optimize']),
181
184
  'filepath': (None, str(file_path))
182
185
  }
183
186
  else:
184
187
  files = {
185
188
  'dataspace': (None, payload['dataspace']),
186
189
  'validationType': (None, payload['validationType']),
190
+ 'optimize': (None, payload['optimize']),
187
191
  'file': (os.path.realpath(file_path), open(os.path.realpath(file_path), 'rb'), 'text/csv', '')
188
192
  }
189
193
 
@@ -1,6 +1,6 @@
1
1
  [tool.poetry]
2
2
  name = "dotstat_io"
3
- version = "1.0.4"
3
+ version = "1.0.6"
4
4
  description = "Utility to download or upload data from/to .Stat Suite using ADFS authentication to connect to it"
5
5
  license = "MIT"
6
6
  authors = ["Gyorgy Gyomai <gyorgy.gyomai@oecd.org>", "Abdel Aliaoui <abdel.aliaoui@oecd.org>"]