pybiolib 1.1.1569__tar.gz → 1.1.1571__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.
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/PKG-INFO +1 -1
- pybiolib-1.1.1571/biolib/biolib_binary_format/remote_endpoints.py +32 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/pyproject.toml +1 -1
- pybiolib-1.1.1569/biolib/biolib_binary_format/remote_endpoints.py +0 -30
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/LICENSE +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/README.md +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/api/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/api/client.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/api/http_client.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/app/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/app/app.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/app/search_apps.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/api_client.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/app_types.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/auth.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/biolib_account_api.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/biolib_app_api.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/biolib_job_api.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/biolib_large_file_system_api.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/common_types.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/job_types.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/lfs_types.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/user_state.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_binary_format/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_binary_format/base_bbf_package.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_binary_format/file_in_container.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_binary_format/module_input.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_binary_format/module_output_v2.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_binary_format/remote_stream_seeker.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_binary_format/saved_job.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_binary_format/stdout_and_stderr.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_binary_format/system_exception.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_binary_format/system_status_update.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_binary_format/utils.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_docker_client/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_download_container.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_errors.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_logging.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_push.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/cli/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/cli/download_container.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/cli/init.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/cli/lfs.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/cli/push.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/cli/run.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/cli/runtime.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/cli/start.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/.gitignore +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/cloud_utils/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/cloud_utils/cloud_utils.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/cache_state.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/cache_types.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/docker_image_cache.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/executors/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/executors/docker_executor.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/executors/docker_types.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/executors/tars/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/executors/types.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/job_legacy_input_wait_timeout_thread.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/job_max_runtime_timer_thread.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/job_storage.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/job_worker.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/large_file_system.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/mappings.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/utilization_reporter_thread.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/utils.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/remote_host_proxy.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/socker_listener_thread.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/socket_sender_thread.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/utils.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/webserver/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/webserver/gunicorn_flask_application.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/webserver/webserver.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/webserver/webserver_types.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/webserver/webserver_utils.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/webserver/worker_thread.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/experiments/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/experiments/experiment.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/experiments/types.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/jobs/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/jobs/job.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/jobs/job_result.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/jobs/types.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/lfs/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/lfs/cache.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/lfs/utils.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/runtime/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/runtime/results.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/tables.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/templates/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/templates/example_app.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/typing_utils.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/user/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/user/sign_in.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/utils/__init__.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/utils/app_uri.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/utils/cache_state.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/utils/multipart_uploader.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/utils/seq_util.py +0 -0
- {pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/utils/zip/remote_zip.py +0 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
from datetime import datetime, timedelta
|
2
|
+
# from urllib.parse import urlparse, parse_qs
|
3
|
+
|
4
|
+
from biolib.biolib_logging import logger
|
5
|
+
|
6
|
+
from biolib.biolib_api_client.biolib_job_api import BiolibJobApi
|
7
|
+
from biolib.biolib_binary_format.utils import RemoteEndpoint
|
8
|
+
|
9
|
+
|
10
|
+
class RemoteJobStorageResultEndpoint(RemoteEndpoint):
|
11
|
+
def __init__(self, job_id: str, job_auth_token: str):
|
12
|
+
self._job_id = job_id
|
13
|
+
self._job_auth_token = job_auth_token
|
14
|
+
self._expires_at = None
|
15
|
+
self._presigned_url = None
|
16
|
+
|
17
|
+
def get_remote_url(self):
|
18
|
+
if not self._presigned_url or datetime.utcnow() > self._expires_at:
|
19
|
+
self._presigned_url = BiolibJobApi.get_job_storage_download_url(
|
20
|
+
job_auth_token=self._job_auth_token,
|
21
|
+
job_uuid=self._job_id,
|
22
|
+
storage_type='results'
|
23
|
+
)
|
24
|
+
self._expires_at = datetime.utcnow() + timedelta(minutes=8)
|
25
|
+
# TODO: Use expires at from url
|
26
|
+
# parsed_url = urlparse(self._presigned_url)
|
27
|
+
# query_params = parse_qs(parsed_url.query)
|
28
|
+
# time_at_generation = datetime.datetime.strptime(query_params['X-Amz-Date'][0], '%Y%m%dT%H%M%SZ')
|
29
|
+
# self._expires_at = time_at_generation + timedelta(seconds=int(query_params['X-Amz-Expires'][0]))
|
30
|
+
logger.debug(f'Job "{self._job_id}" fetched presigned URL with expiry at {self._expires_at.isoformat()}')
|
31
|
+
|
32
|
+
return self._presigned_url
|
@@ -1,30 +0,0 @@
|
|
1
|
-
import datetime
|
2
|
-
from urllib.parse import urlparse, parse_qs
|
3
|
-
|
4
|
-
from biolib.biolib_logging import logger
|
5
|
-
|
6
|
-
from biolib.biolib_api_client.biolib_job_api import BiolibJobApi
|
7
|
-
from biolib.biolib_binary_format.utils import RemoteEndpoint
|
8
|
-
|
9
|
-
|
10
|
-
class RemoteJobStorageResultEndpoint(RemoteEndpoint):
|
11
|
-
def __init__(self, job_id: str, job_auth_token: str):
|
12
|
-
self._job_id = job_id
|
13
|
-
self._job_auth_token = job_auth_token
|
14
|
-
self._expires_at = None
|
15
|
-
self.presigned_url = None
|
16
|
-
|
17
|
-
def get_remote_url(self):
|
18
|
-
if not self.presigned_url or datetime.datetime.now() > self._expires_at:
|
19
|
-
self.presigned_url = BiolibJobApi.get_job_storage_download_url(
|
20
|
-
job_auth_token=self._job_auth_token,
|
21
|
-
job_uuid=self._job_id,
|
22
|
-
storage_type='results'
|
23
|
-
)
|
24
|
-
parsed_url = urlparse(self.presigned_url)
|
25
|
-
query_params = parse_qs(parsed_url.query)
|
26
|
-
time_at_generation = datetime.datetime.strptime(query_params['X-Amz-Date'][0], '%Y%m%dT%H%M%SZ')
|
27
|
-
self._expires_at = time_at_generation + datetime.timedelta(seconds=int(query_params['X-Amz-Expires'][0]))
|
28
|
-
logger.debug(f'Job "{self._job_id}" fetched presigned URL with expiry at {self._expires_at.isoformat()}')
|
29
|
-
|
30
|
-
return self.presigned_url
|
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
|
{pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/biolib_api_client/biolib_large_file_system_api.py
RENAMED
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
|
File without changes
|
{pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/docker_image_cache.py
RENAMED
File without changes
|
{pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/executors/__init__.py
RENAMED
File without changes
|
{pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/executors/docker_executor.py
RENAMED
File without changes
|
{pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/executors/docker_types.py
RENAMED
File without changes
|
{pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/job_worker/executors/tars/__init__.py
RENAMED
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
|
{pybiolib-1.1.1569 → pybiolib-1.1.1571}/biolib/compute_node/webserver/gunicorn_flask_application.py
RENAMED
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
|