nebu 0.1.61__tar.gz → 0.1.62__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 (31) hide show
  1. {nebu-0.1.61/src/nebu.egg-info → nebu-0.1.62}/PKG-INFO +1 -1
  2. {nebu-0.1.61 → nebu-0.1.62}/pyproject.toml +1 -1
  3. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/config.py +14 -0
  4. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/processors/decorate.py +1 -4
  5. {nebu-0.1.61 → nebu-0.1.62/src/nebu.egg-info}/PKG-INFO +1 -1
  6. {nebu-0.1.61 → nebu-0.1.62}/LICENSE +0 -0
  7. {nebu-0.1.61 → nebu-0.1.62}/README.md +0 -0
  8. {nebu-0.1.61 → nebu-0.1.62}/setup.cfg +0 -0
  9. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/__init__.py +0 -0
  10. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/auth.py +0 -0
  11. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/builders/builder.py +0 -0
  12. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/builders/models.py +0 -0
  13. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/cache.py +0 -0
  14. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/containers/container.py +0 -0
  15. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/containers/decorator.py +0 -0
  16. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/containers/models.py +0 -0
  17. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/containers/server.py +0 -0
  18. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/data.py +0 -0
  19. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/meta.py +0 -0
  20. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/processors/consumer.py +0 -0
  21. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/processors/default.py +0 -0
  22. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/processors/models.py +0 -0
  23. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/processors/processor.py +0 -0
  24. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/processors/remote.py +0 -0
  25. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/redis/models.py +0 -0
  26. {nebu-0.1.61 → nebu-0.1.62}/src/nebu/services/service.py +0 -0
  27. {nebu-0.1.61 → nebu-0.1.62}/src/nebu.egg-info/SOURCES.txt +0 -0
  28. {nebu-0.1.61 → nebu-0.1.62}/src/nebu.egg-info/dependency_links.txt +0 -0
  29. {nebu-0.1.61 → nebu-0.1.62}/src/nebu.egg-info/requires.txt +0 -0
  30. {nebu-0.1.61 → nebu-0.1.62}/src/nebu.egg-info/top_level.txt +0 -0
  31. {nebu-0.1.61 → nebu-0.1.62}/tests/test_containers.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nebu
3
- Version: 0.1.61
3
+ Version: 0.1.62
4
4
  Summary: A globally distributed container runtime
5
5
  Requires-Python: >=3.10.14
6
6
  Description-Content-Type: text/markdown
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "nebu"
3
- version = "0.1.61"
3
+ version = "0.1.62"
4
4
  description = "A globally distributed container runtime"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.10.14"
@@ -134,6 +134,20 @@ class GlobalConfig:
134
134
  return srv
135
135
  return None
136
136
 
137
+ @classmethod
138
+ def get_server_url(cls) -> str:
139
+ """
140
+ Get the server URL for the current_server name, or None if unset/missing.
141
+ """
142
+ config = cls.read()
143
+ server_config = config.get_current_server_config()
144
+ server = os.environ.get("NEBU_SERVER") or os.environ.get("NEBULOUS_SERVER")
145
+ if not server:
146
+ server = server_config.server if server_config else None
147
+ if not server:
148
+ raise ValueError("NEBULOUS_SERVER environment variable is not set")
149
+ return server
150
+
137
151
 
138
152
  def _get_config_file_path() -> str:
139
153
  """
@@ -57,9 +57,7 @@ _NEBU_INSIDE_CONSUMER_ENV_VAR = "_NEBU_INSIDE_CONSUMER_EXEC"
57
57
  CONTAINER_CODE_DIR = "/app/src"
58
58
  # Define S3 prefix for code storage (under the base URI from token endpoint)
59
59
  S3_CODE_PREFIX = "nebu-code"
60
- # Define the token endpoint URL (replace with actual URL)
61
- # Use environment variable for flexibility, provide a default for local dev
62
- NEBU_API_BASE_URL = os.environ.get("NEBU_API_BASE_URL", "http://localhost:3000")
60
+ NEBU_API_BASE_URL = GlobalConfig.get_server_url()
63
61
 
64
62
  # --- Jupyter Helper Functions ---
65
63
 
@@ -69,7 +67,6 @@ def is_jupyter_notebook():
69
67
  Determine if the current code is running inside a Jupyter notebook.
70
68
  Returns bool: True if running inside a Jupyter notebook, False otherwise.
71
69
  """
72
- # print("[DEBUG Helper] Checking if running in Jupyter...") # Reduce verbosity
73
70
  try:
74
71
  # Use importlib to avoid runtime dependency if not needed
75
72
  import importlib.util
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: nebu
3
- Version: 0.1.61
3
+ Version: 0.1.62
4
4
  Summary: A globally distributed container runtime
5
5
  Requires-Python: >=3.10.14
6
6
  Description-Content-Type: text/markdown
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