podstack 1.3.0__tar.gz → 1.3.1__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.
Files changed (32) hide show
  1. {podstack-1.3.0 → podstack-1.3.1}/PKG-INFO +1 -1
  2. {podstack-1.3.0 → podstack-1.3.1}/podstack/__init__.py +1 -1
  3. {podstack-1.3.0 → podstack-1.3.1}/podstack/gpu_runner.py +15 -1
  4. {podstack-1.3.0 → podstack-1.3.1}/podstack.egg-info/PKG-INFO +1 -1
  5. {podstack-1.3.0 → podstack-1.3.1}/pyproject.toml +1 -1
  6. {podstack-1.3.0 → podstack-1.3.1}/LICENSE +0 -0
  7. {podstack-1.3.0 → podstack-1.3.1}/README.md +0 -0
  8. {podstack-1.3.0 → podstack-1.3.1}/podstack/annotations.py +0 -0
  9. {podstack-1.3.0 → podstack-1.3.1}/podstack/client.py +0 -0
  10. {podstack-1.3.0 → podstack-1.3.1}/podstack/exceptions.py +0 -0
  11. {podstack-1.3.0 → podstack-1.3.1}/podstack/execution.py +0 -0
  12. {podstack-1.3.0 → podstack-1.3.1}/podstack/models.py +0 -0
  13. {podstack-1.3.0 → podstack-1.3.1}/podstack/notebook.py +0 -0
  14. {podstack-1.3.0 → podstack-1.3.1}/podstack/registry/__init__.py +0 -0
  15. {podstack-1.3.0 → podstack-1.3.1}/podstack/registry/client.py +0 -0
  16. {podstack-1.3.0 → podstack-1.3.1}/podstack/registry/exceptions.py +0 -0
  17. {podstack-1.3.0 → podstack-1.3.1}/podstack/registry/experiment.py +0 -0
  18. {podstack-1.3.0 → podstack-1.3.1}/podstack/registry/model.py +0 -0
  19. {podstack-1.3.0 → podstack-1.3.1}/podstack/registry/model_utils.py +0 -0
  20. {podstack-1.3.0 → podstack-1.3.1}/podstack.egg-info/SOURCES.txt +0 -0
  21. {podstack-1.3.0 → podstack-1.3.1}/podstack.egg-info/dependency_links.txt +0 -0
  22. {podstack-1.3.0 → podstack-1.3.1}/podstack.egg-info/requires.txt +0 -0
  23. {podstack-1.3.0 → podstack-1.3.1}/podstack.egg-info/top_level.txt +0 -0
  24. {podstack-1.3.0 → podstack-1.3.1}/podstack_gpu/__init__.py +0 -0
  25. {podstack-1.3.0 → podstack-1.3.1}/podstack_gpu/app.py +0 -0
  26. {podstack-1.3.0 → podstack-1.3.1}/podstack_gpu/exceptions.py +0 -0
  27. {podstack-1.3.0 → podstack-1.3.1}/podstack_gpu/image.py +0 -0
  28. {podstack-1.3.0 → podstack-1.3.1}/podstack_gpu/runner.py +0 -0
  29. {podstack-1.3.0 → podstack-1.3.1}/podstack_gpu/secret.py +0 -0
  30. {podstack-1.3.0 → podstack-1.3.1}/podstack_gpu/utils.py +0 -0
  31. {podstack-1.3.0 → podstack-1.3.1}/podstack_gpu/volume.py +0 -0
  32. {podstack-1.3.0 → podstack-1.3.1}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: podstack
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  Summary: Official Python SDK for Podstack GPU Notebook Platform
5
5
  Author-email: Podstack <support@podstack.ai>
6
6
  License-Expression: MIT
@@ -54,7 +54,7 @@ Decorators:
54
54
  ...
55
55
  """
56
56
 
57
- __version__ = "1.3.0"
57
+ __version__ = "1.3.1"
58
58
 
59
59
  from .client import Client
60
60
  from .notebook import Notebook, NotebookStatus
@@ -965,6 +965,19 @@ _stream_install(
965
965
  except:
966
966
  return {"status": "cancelled"}
967
967
 
968
+ def _get_platform_url(self) -> str:
969
+ """Derive the platform service URL from the notebook service URL."""
970
+ if os.environ.get("PODSTACK_PLATFORM_URL"):
971
+ return os.environ.get("PODSTACK_PLATFORM_URL")
972
+ # External: cloud.podstack.ai/notebooks -> cloud.podstack.ai/platform
973
+ if "/notebooks" in self.api_url:
974
+ return self.api_url.replace("/notebooks", "/platform")
975
+ # Internal K8s: notebook service URL -> platform service URL
976
+ if "notebook" in self.api_url and ".svc.cluster.local" in self.api_url:
977
+ return self.api_url.replace("notebook", "platform").replace(":8084", ":8081")
978
+ # Fallback: use the same base URL
979
+ return self.api_url
980
+
968
981
  def list_runners(self) -> list:
969
982
  """
970
983
  List available GPU/CPU runners.
@@ -972,7 +985,8 @@ _stream_install(
972
985
  Returns:
973
986
  List of runner dictionaries with name, type, description, image, libraries, scenarios.
974
987
  """
975
- url = f"{self.api_url}/api/v1/runners"
988
+ platform_url = self._get_platform_url()
989
+ url = f"{platform_url}/api/v1/runners"
976
990
 
977
991
  with httpx.Client(timeout=self.timeout) as client:
978
992
  try:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: podstack
3
- Version: 1.3.0
3
+ Version: 1.3.1
4
4
  Summary: Official Python SDK for Podstack GPU Notebook Platform
5
5
  Author-email: Podstack <support@podstack.ai>
6
6
  License-Expression: MIT
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "podstack"
7
- version = "1.3.0"
7
+ version = "1.3.1"
8
8
  description = "Official Python SDK for Podstack GPU Notebook Platform"
9
9
  readme = "README.md"
10
10
  license = "MIT"
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