pam-python 0.1.37__tar.gz → 0.1.38__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.
- {pam_python-0.1.37/pam_python.egg-info → pam_python-0.1.38}/PKG-INFO +1 -1
- pam_python-0.1.38/pam/request_file_format.py +5 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/service.py +3 -3
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/task_manager.py +2 -6
- {pam_python-0.1.37 → pam_python-0.1.38/pam_python.egg-info}/PKG-INFO +1 -1
- {pam_python-0.1.37 → pam_python-0.1.38}/pam_python.egg-info/SOURCES.txt +1 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/setup.py +1 -1
- {pam_python-0.1.37 → pam_python-0.1.38}/LICENSE.txt +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/README.md +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/__init__.py +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/api.py +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/cli.py +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/interface_task_manager.py +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/models/__init__.py +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/models/request_command.py +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/server.py +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/sqlite.py +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/temp_file_utils.py +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/buildcmd/pamb +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/buildcmd/pamb-base.sh +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/docker/Dockerfile +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/init/AGENT.md +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/init/dockerignore.tmpl +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/init/gitignore.tmpl +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/init/main.tmpl +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/init/pylintrc.tmpl +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/init/run_unit_test.bat +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/init/run_unit_test.ps1 +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/init/run_unit_test.sh +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/service/functions.tmpl +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/service/service.test.tmpl +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/service/service.yaml +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/templates/service/service_class.tmpl +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/tester_task.py +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam/utils.py +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam_python.egg-info/dependency_links.txt +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam_python.egg-info/entry_points.txt +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam_python.egg-info/requires.txt +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/pam_python.egg-info/top_level.txt +0 -0
- {pam_python-0.1.37 → pam_python-0.1.38}/setup.cfg +0 -0
|
@@ -8,7 +8,7 @@ import dask.dataframe as dd
|
|
|
8
8
|
from pam.utils import log, deep_convert_numbers_to_strings, get_adapter_id
|
|
9
9
|
from pam.models.request_command import RequestCommand
|
|
10
10
|
from pam.temp_file_utils import TempfileUtils
|
|
11
|
-
|
|
11
|
+
from pam.request_file_format import RequestFileFormat
|
|
12
12
|
if TYPE_CHECKING:
|
|
13
13
|
from pam.task_manager import TaskManager
|
|
14
14
|
|
|
@@ -29,10 +29,10 @@ class Service:
|
|
|
29
29
|
return get_adapter_id(self.request.response_api)
|
|
30
30
|
|
|
31
31
|
# == REQUEST DATA ===
|
|
32
|
-
def _request_data(self, page: str = "", filter_contact_ids: Optional[List[str]] = None) -> None:
|
|
32
|
+
def _request_data(self, page: str = "", filter_contact_ids: Optional[List[str]] = None, file_format: RequestFileFormat = RequestFileFormat.CSV) -> None:
|
|
33
33
|
"""Requests data for the specified page."""
|
|
34
34
|
log(f"{self.request.service_name}: Requesting data for page={page}")
|
|
35
|
-
self.task_manager.service_request_data(self, page, filter_contact_ids)
|
|
35
|
+
self.task_manager.service_request_data(self, page, filter_contact_ids, file_format)
|
|
36
36
|
|
|
37
37
|
# == UPLOAD RESULT ===
|
|
38
38
|
def _upload_result(
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from datetime import datetime, timedelta
|
|
2
|
-
from enum import Enum
|
|
3
2
|
from pathlib import Path
|
|
4
3
|
import os
|
|
5
4
|
import time
|
|
@@ -11,10 +10,7 @@ from pam.service import Service
|
|
|
11
10
|
from pam.models.request_command import RequestCommand
|
|
12
11
|
from pam.interface_task_manager import ITaskManager
|
|
13
12
|
from pam.temp_file_utils import TempfileUtils
|
|
14
|
-
|
|
15
|
-
CSV="csv"
|
|
16
|
-
PARQUET="parquet"
|
|
17
|
-
|
|
13
|
+
from pam.request_file_format import RequestFileFormat
|
|
18
14
|
class ServiceHolder:
|
|
19
15
|
def __init__(self, service: Service):
|
|
20
16
|
self.service = service
|
|
@@ -169,7 +165,7 @@ class TaskManager(ITaskManager):
|
|
|
169
165
|
self._remove_service(token)
|
|
170
166
|
|
|
171
167
|
# ==== Service Callbacks ====
|
|
172
|
-
def service_request_data(self, service: Service, page, filter_contact_ids=None, file_format:
|
|
168
|
+
def service_request_data(self, service: Service, page, filter_contact_ids=None, file_format: RequestFileFormat = RequestFileFormat.CSV):
|
|
173
169
|
"""
|
|
174
170
|
Makes an asynchronous request for data from a service.
|
|
175
171
|
Logs the response without blocking the main thread.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|