pybiolib 1.2.1247__tar.gz → 1.2.1293__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 pybiolib might be problematic. Click here for more details.
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/PKG-INFO +1 -1
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/__init__.py +33 -10
- pybiolib-1.2.1293/biolib/_internal/utils/job_url.py +33 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/pyproject.toml +1 -1
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/LICENSE +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/PYPI_README.md +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_data_record/data_record.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/add_copilot_prompts.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/add_gui_files.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/data_record/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/data_record/data_record.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/data_record/push_data.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/data_record/remote_storage_endpoint.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/errors.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/file_utils.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/fuse_mount/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/fuse_mount/experiment_fuse_mount.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/http_client.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/lfs/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/lfs/cache.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/libs/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/libs/fusepy/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/push_application.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/runtime.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/string_utils.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/copilot_template/.github/instructions/general-app-knowledge.instructions.md +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/copilot_template/.github/instructions/style-general.instructions.md +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/copilot_template/.github/instructions/style-python.instructions.md +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/copilot_template/.github/instructions/style-react-ts.instructions.md +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/copilot_template/.github/prompts/biolib_app_inputs.prompt.md +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/copilot_template/.github/prompts/biolib_onboard_repo.prompt.md +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/copilot_template/.github/prompts/biolib_run_apps.prompt.md +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/gui_template/.yarnrc.yml +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/gui_template/App.tsx +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/gui_template/Dockerfile +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/gui_template/index.css +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/gui_template/index.html +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/gui_template/index.tsx +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/gui_template/package.json +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/gui_template/tsconfig.json +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/gui_template/vite.config.mts +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/init_template/.biolib/config.yml +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/init_template/.github/workflows/biolib.yml +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/init_template/.gitignore +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/init_template/Dockerfile +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/init_template/requirements.txt +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/init_template/run.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/init_template/run.sh +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/templates.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/tree_utils.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/account.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/account_member.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/app.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/data_record.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/experiment.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/file_node.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/push.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/resource.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/resource_permission.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/resource_version.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/result.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/typing.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/types/user.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/utils/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/utils/multinode.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_runtime/runtime.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_session/session.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/api/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/api/client.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/app/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/app/app.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/app/search_apps.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_api_client/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_api_client/api_client.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_api_client/app_types.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_api_client/auth.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_api_client/biolib_app_api.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_api_client/biolib_job_api.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_api_client/common_types.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_api_client/job_types.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_api_client/lfs_types.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_api_client/user_state.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_binary_format/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_binary_format/base_bbf_package.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_binary_format/file_in_container.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_binary_format/module_input.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_binary_format/module_output_v2.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_binary_format/remote_endpoints.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_binary_format/remote_stream_seeker.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_binary_format/saved_job.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_binary_format/stdout_and_stderr.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_binary_format/system_exception.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_binary_format/system_status_update.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_binary_format/utils.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_docker_client/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_download_container.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_errors.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/biolib_logging.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/cli/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/cli/auth.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/cli/data_record.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/cli/download_container.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/cli/init.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/cli/lfs.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/cli/push.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/cli/run.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/cli/runtime.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/cli/sdk.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/cli/start.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/.gitignore +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/cloud_utils/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/cloud_utils/cloud_utils.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/cache_state.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/cache_types.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/docker_image_cache.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/executors/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/executors/docker_executor.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/executors/docker_types.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/executors/tars/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/executors/types.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/job_legacy_input_wait_timeout_thread.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/job_max_runtime_timer_thread.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/job_storage.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/job_worker.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/large_file_system.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/mappings.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/utilization_reporter_thread.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/utils.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/remote_host_proxy.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/socker_listener_thread.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/socket_sender_thread.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/utils.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/webserver/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/webserver/compute_node_results_proxy.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/webserver/gunicorn_flask_application.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/webserver/proxy_utils.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/webserver/webserver.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/webserver/webserver_types.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/webserver/webserver_utils.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/webserver/worker_thread.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/experiments/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/experiments/experiment.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/jobs/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/jobs/job.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/jobs/job_result.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/jobs/types.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/py.typed +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/runtime/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/sdk/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/tables.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/typing_utils.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/user/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/user/sign_in.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/utils/__init__.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/utils/app_uri.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/utils/cache_state.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/utils/multipart_uploader.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/utils/seq_util.py +0 -0
- {pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/utils/zip/remote_zip.py +0 -0
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
# ruff: noqa: I001
|
|
1
2
|
# Imports to hide
|
|
2
3
|
import os
|
|
3
4
|
from urllib.parse import urlparse as _urlparse
|
|
@@ -15,6 +16,7 @@ from biolib.jobs.job import Result as _Result
|
|
|
15
16
|
from biolib import user as _user
|
|
16
17
|
from biolib.typing_utils import List, Optional, cast as _cast
|
|
17
18
|
from biolib._data_record.data_record import DataRecord as _DataRecord
|
|
19
|
+
from biolib._internal.utils.job_url import parse_result_id_or_url as _parse_result_id_or_url
|
|
18
20
|
|
|
19
21
|
import biolib.api
|
|
20
22
|
import biolib.app
|
|
@@ -22,7 +24,6 @@ import biolib.cli
|
|
|
22
24
|
import biolib.sdk
|
|
23
25
|
import biolib.utils
|
|
24
26
|
|
|
25
|
-
|
|
26
27
|
# ------------------------------------ Function definitions for public Python API ------------------------------------
|
|
27
28
|
|
|
28
29
|
|
|
@@ -83,43 +84,65 @@ def search(
|
|
|
83
84
|
|
|
84
85
|
|
|
85
86
|
def get_job(job_id: str, job_token: Optional[str] = None) -> _Result:
|
|
86
|
-
r"""Get a job by its ID.
|
|
87
|
+
r"""Get a job by its ID or full URL.
|
|
87
88
|
|
|
88
89
|
Args:
|
|
89
|
-
job_id (str): The UUID of the job to retrieve
|
|
90
|
+
job_id (str): The UUID of the job to retrieve, or a full URL to the job.
|
|
91
|
+
Can be either:
|
|
92
|
+
- Job UUID (e.g., 'abc123')
|
|
93
|
+
- Full URL (e.g., 'https://biolib.com/result/abc123/?token=xyz789')
|
|
94
|
+
- Full URL with token parameter (e.g., 'biolib.com/result/abc123/token=xyz789')
|
|
90
95
|
job_token (str, optional): Authentication token for accessing the job.
|
|
91
96
|
Only needed for jobs that aren't owned by the current user.
|
|
97
|
+
If the URL contains a token, this parameter is ignored.
|
|
92
98
|
|
|
93
99
|
Returns:
|
|
94
100
|
Job: The job object
|
|
95
101
|
|
|
96
102
|
Example::
|
|
97
103
|
|
|
104
|
+
>>> # Get by UUID
|
|
98
105
|
>>> job = biolib.get_job('abc123')
|
|
99
|
-
>>> #
|
|
106
|
+
>>> # Get with explicit token
|
|
100
107
|
>>> job = biolib.get_job('abc123', job_token='xyz789')
|
|
108
|
+
>>> # Get by full URL with token
|
|
109
|
+
>>> job = biolib.get_job('https://biolib.com/result/abc123/?token=xyz789')
|
|
110
|
+
>>> # Get by URL with inline token format
|
|
111
|
+
>>> job = biolib.get_job('biolib.com/result/abc123/token=xyz789')
|
|
101
112
|
"""
|
|
102
|
-
|
|
113
|
+
uuid, token = _parse_result_id_or_url(job_id, job_token)
|
|
114
|
+
return _Result.create_from_uuid(uuid=uuid, auth_token=token)
|
|
103
115
|
|
|
104
116
|
|
|
105
117
|
def get_result(result_id: str, result_token: Optional[str] = None) -> _Result:
|
|
106
|
-
r"""Get a result by its ID.
|
|
118
|
+
r"""Get a result by its ID or full URL.
|
|
107
119
|
|
|
108
120
|
Args:
|
|
109
|
-
result_id (str): The UUID of the result to retrieve
|
|
121
|
+
result_id (str): The UUID of the result to retrieve, or a full URL to the result.
|
|
122
|
+
Can be either:
|
|
123
|
+
- Result UUID (e.g., 'abc123')
|
|
124
|
+
- Full URL (e.g., 'https://biolib.com/result/abc123/?token=xyz789')
|
|
125
|
+
- Full URL with token parameter (e.g., 'biolib.com/result/abc123/token=xyz789')
|
|
110
126
|
result_token (str, optional): Authentication token for accessing the result.
|
|
111
|
-
Only needed for
|
|
127
|
+
Only needed for results that aren't owned by the current user.
|
|
128
|
+
If the URL contains a token, this parameter is ignored.
|
|
112
129
|
|
|
113
130
|
Returns:
|
|
114
131
|
Result: The result object
|
|
115
132
|
|
|
116
133
|
Example::
|
|
117
134
|
|
|
135
|
+
>>> # Get by UUID
|
|
118
136
|
>>> result = biolib.get_result('abc123')
|
|
119
|
-
>>> #
|
|
137
|
+
>>> # Get with explicit token
|
|
120
138
|
>>> result = biolib.get_result('abc123', result_token='xyz789')
|
|
139
|
+
>>> # Get by full URL with token
|
|
140
|
+
>>> result = biolib.get_result('https://biolib.com/result/abc123/?token=xyz789')
|
|
141
|
+
>>> # Get by URL with inline token format
|
|
142
|
+
>>> result = biolib.get_result('biolib.com/result/abc123/token=xyz789')
|
|
121
143
|
"""
|
|
122
|
-
|
|
144
|
+
uuid, token = _parse_result_id_or_url(result_id, result_token)
|
|
145
|
+
return _Result.create_from_uuid(uuid=uuid, auth_token=token)
|
|
123
146
|
|
|
124
147
|
|
|
125
148
|
def get_data_record(uri: str) -> _DataRecord:
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import re
|
|
2
|
+
from urllib.parse import urlparse
|
|
3
|
+
|
|
4
|
+
import biolib.utils
|
|
5
|
+
from biolib.typing_utils import Optional, Tuple
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
def parse_result_id_or_url(result_id_or_url: str, default_token: Optional[str] = None) -> Tuple[str, Optional[str]]:
|
|
9
|
+
result_id_or_url = result_id_or_url.strip()
|
|
10
|
+
|
|
11
|
+
if '/' not in result_id_or_url:
|
|
12
|
+
return (result_id_or_url, default_token)
|
|
13
|
+
|
|
14
|
+
if not result_id_or_url.startswith('http://') and not result_id_or_url.startswith('https://'):
|
|
15
|
+
result_id_or_url = 'https://' + result_id_or_url
|
|
16
|
+
|
|
17
|
+
parsed_url = urlparse(result_id_or_url)
|
|
18
|
+
|
|
19
|
+
if biolib.utils.BIOLIB_BASE_URL:
|
|
20
|
+
expected_base = urlparse(biolib.utils.BIOLIB_BASE_URL)
|
|
21
|
+
if parsed_url.scheme != expected_base.scheme or parsed_url.netloc != expected_base.netloc:
|
|
22
|
+
raise ValueError(f'URL must start with {biolib.utils.BIOLIB_BASE_URL}, got: {result_id_or_url}')
|
|
23
|
+
|
|
24
|
+
pattern = r'/results?/(?P<uuid>[a-f0-9-]+)/?(?:\?token=(?P<token>[^&]+))?'
|
|
25
|
+
match = re.search(pattern, result_id_or_url, re.IGNORECASE)
|
|
26
|
+
|
|
27
|
+
if not match:
|
|
28
|
+
raise ValueError(f'URL must be in format <base_url>/results/<UUID>/?token=<token>, got: {result_id_or_url}')
|
|
29
|
+
|
|
30
|
+
uuid = match.group('uuid')
|
|
31
|
+
token = match.group('token') or default_token
|
|
32
|
+
|
|
33
|
+
return (uuid, token)
|
|
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.2.1247 → pybiolib-1.2.1293}/biolib/_internal/data_record/remote_storage_endpoint.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/fuse_mount/experiment_fuse_mount.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
|
{pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/gui_template/package.json
RENAMED
|
File without changes
|
{pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/gui_template/tsconfig.json
RENAMED
|
File without changes
|
{pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/gui_template/vite.config.mts
RENAMED
|
File without changes
|
{pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/init_template/.biolib/config.yml
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/_internal/templates/init_template/requirements.txt
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
|
|
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.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/docker_image_cache.py
RENAMED
|
File without changes
|
{pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/executors/__init__.py
RENAMED
|
File without changes
|
{pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/executors/docker_executor.py
RENAMED
|
File without changes
|
{pybiolib-1.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/job_worker/executors/docker_types.py
RENAMED
|
File without changes
|
{pybiolib-1.2.1247 → pybiolib-1.2.1293}/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.2.1247 → pybiolib-1.2.1293}/biolib/compute_node/webserver/compute_node_results_proxy.py
RENAMED
|
File without changes
|
{pybiolib-1.2.1247 → pybiolib-1.2.1293}/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
|