nebu 0.1.61__py3-none-any.whl → 0.1.62__py3-none-any.whl

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.
nebu/config.py CHANGED
@@ -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
@@ -1,7 +1,7 @@
1
1
  nebu/__init__.py,sha256=gJ49VnAs4GC_bUV90j-SS-iiYWESuCf4uuE7mx4T78k,385
2
2
  nebu/auth.py,sha256=N_v6SPFD9HU_UoRDTaouH03g2Hmo9C-xxqInE1FweXE,1471
3
3
  nebu/cache.py,sha256=jmluqvWnE9N8uNq6nppXSxEJK7DKWaB79GicaGg9KmY,4718
4
- nebu/config.py,sha256=jb-yknaTh3rF5XRhBZOccEsmMxd06DN0wxwn6_drHgc,6483
4
+ nebu/config.py,sha256=C5Jt9Bd0i0HrgzBSVNJ-Ml3KwX_gaYbYYZEtNL2gvJg,7031
5
5
  nebu/data.py,sha256=X0aAJYuHNVcTCRHpIDDm546HwMqIZpv40lGrozlL41A,39797
6
6
  nebu/meta.py,sha256=CzFHMND9seuewzq9zNNx9WTr6JvrCBExe7BLqDSr7lM,745
7
7
  nebu/builders/builder.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
@@ -11,15 +11,15 @@ nebu/containers/decorator.py,sha256=uFtzlAXRHYZECJ-NPusY7oN9GXvdHrHDd_JNrIGr8aQ,
11
11
  nebu/containers/models.py,sha256=0j6NGy4yto-enRDh_4JH_ZTbHrLdSpuMOqNQPnIrwC4,6815
12
12
  nebu/containers/server.py,sha256=yFa2Y9PzBn59E1HftKiv0iapPonli2rbGAiU6r-wwe0,2513
13
13
  nebu/processors/consumer.py,sha256=q4cFKPEfMf1xIs0Y3CjUDCR35QVjr0F_hSOZUKUYc_U,33667
14
- nebu/processors/decorate.py,sha256=f4y0BL2W07XMMVzm0GPwh7GfJ-QRioSjBofJSa7hQtg,53175
14
+ nebu/processors/decorate.py,sha256=Fq1stlDGhpiV0Rl9R95xGEHyQmDv6mw4g0E_AXZKWLg,52927
15
15
  nebu/processors/default.py,sha256=W4slJenG59rvyTlJ7gRp58eFfXcNOTT2Hfi6zzJAobI,365
16
16
  nebu/processors/models.py,sha256=y40HoW-MEzDWB2dm_tsYlUy3Nf3s6eiLC0iGO9BoNog,3956
17
17
  nebu/processors/processor.py,sha256=PsLs-Oo0bcvqoDKHErpOaic25y8uvTQ8KxtyFwLptW0,16165
18
18
  nebu/processors/remote.py,sha256=TeAIPGEMqnDIb7H1iett26IEZrBlcbPB_-DSm6jcH1E,1285
19
19
  nebu/redis/models.py,sha256=coPovAcVXnOU1Xh_fpJL4PO3QctgK9nBe5QYoqEcnxg,1230
20
20
  nebu/services/service.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
21
- nebu-0.1.61.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
22
- nebu-0.1.61.dist-info/METADATA,sha256=UmM6pvHTUfkUV8xNt8gCTW3Dv_g70ye0E1NcKHCgWaA,1731
23
- nebu-0.1.61.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
24
- nebu-0.1.61.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
25
- nebu-0.1.61.dist-info/RECORD,,
21
+ nebu-0.1.62.dist-info/licenses/LICENSE,sha256=xx0jnfkXJvxRnG63LTGOxlggYnIysveWIZ6H3PNdCrQ,11357
22
+ nebu-0.1.62.dist-info/METADATA,sha256=6pa3T3kmYOPRY3mJjO0rw__q3pb7YE3fkEhVAS-E-JQ,1731
23
+ nebu-0.1.62.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
24
+ nebu-0.1.62.dist-info/top_level.txt,sha256=uLIbEKJeGSHWOAJN5S0i5XBGwybALlF9bYoB1UhdEgQ,5
25
+ nebu-0.1.62.dist-info/RECORD,,
File without changes