pam-python 0.1.36__tar.gz → 0.1.37__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.36/pam_python.egg-info → pam_python-0.1.37}/PKG-INFO +1 -1
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/task_manager.py +6 -2
- {pam_python-0.1.36 → pam_python-0.1.37/pam_python.egg-info}/PKG-INFO +1 -1
- {pam_python-0.1.36 → pam_python-0.1.37}/setup.py +1 -1
- {pam_python-0.1.36 → pam_python-0.1.37}/LICENSE.txt +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/README.md +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/__init__.py +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/api.py +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/cli.py +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/interface_task_manager.py +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/models/__init__.py +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/models/request_command.py +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/server.py +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/service.py +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/sqlite.py +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/temp_file_utils.py +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/buildcmd/pamb +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/buildcmd/pamb-base.sh +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/docker/Dockerfile +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/init/AGENT.md +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/init/dockerignore.tmpl +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/init/gitignore.tmpl +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/init/main.tmpl +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/init/pylintrc.tmpl +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/init/run_unit_test.bat +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/init/run_unit_test.ps1 +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/init/run_unit_test.sh +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/service/functions.tmpl +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/service/service.test.tmpl +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/service/service.yaml +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/templates/service/service_class.tmpl +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/tester_task.py +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam/utils.py +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam_python.egg-info/SOURCES.txt +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam_python.egg-info/dependency_links.txt +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam_python.egg-info/entry_points.txt +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam_python.egg-info/requires.txt +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/pam_python.egg-info/top_level.txt +0 -0
- {pam_python-0.1.36 → pam_python-0.1.37}/setup.cfg +0 -0
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
from datetime import datetime, timedelta
|
|
2
|
+
from enum import Enum
|
|
2
3
|
from pathlib import Path
|
|
3
4
|
import os
|
|
4
5
|
import time
|
|
@@ -10,6 +11,9 @@ from pam.service import Service
|
|
|
10
11
|
from pam.models.request_command import RequestCommand
|
|
11
12
|
from pam.interface_task_manager import ITaskManager
|
|
12
13
|
from pam.temp_file_utils import TempfileUtils
|
|
14
|
+
class FileFormat(Enum):
|
|
15
|
+
CSV="csv"
|
|
16
|
+
PARQUET="parquet"
|
|
13
17
|
|
|
14
18
|
class ServiceHolder:
|
|
15
19
|
def __init__(self, service: Service):
|
|
@@ -165,14 +169,14 @@ class TaskManager(ITaskManager):
|
|
|
165
169
|
self._remove_service(token)
|
|
166
170
|
|
|
167
171
|
# ==== Service Callbacks ====
|
|
168
|
-
def service_request_data(self, service: Service, page, filter_contact_ids=None):
|
|
172
|
+
def service_request_data(self, service: Service, page, filter_contact_ids=None, file_format: FileFormat = FileFormat.CSV):
|
|
169
173
|
"""
|
|
170
174
|
Makes an asynchronous request for data from a service.
|
|
171
175
|
Logs the response without blocking the main thread.
|
|
172
176
|
"""
|
|
173
177
|
endpoint = service.request.data_api
|
|
174
178
|
token = service.request.token
|
|
175
|
-
json_data = {"page": page, "token": token}
|
|
179
|
+
json_data = {"page": page, "token": token, "file_format": file_format.value}
|
|
176
180
|
if filter_contact_ids is not None:
|
|
177
181
|
json_data["filter_contact_ids"] = filter_contact_ids
|
|
178
182
|
|
|
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
|
|
File without changes
|
|
File without changes
|