blaxel 0.1.14rc49__py3-none-any.whl → 0.1.14rc50__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.
- blaxel/common/internal.py +19 -15
- blaxel/common/settings.py +8 -3
- {blaxel-0.1.14rc49.dist-info → blaxel-0.1.14rc50.dist-info}/METADATA +1 -1
- {blaxel-0.1.14rc49.dist-info → blaxel-0.1.14rc50.dist-info}/RECORD +6 -6
- {blaxel-0.1.14rc49.dist-info → blaxel-0.1.14rc50.dist-info}/WHEEL +0 -0
- {blaxel-0.1.14rc49.dist-info → blaxel-0.1.14rc50.dist-info}/licenses/LICENSE +0 -0
blaxel/common/internal.py
CHANGED
@@ -7,21 +7,25 @@ from typing import Optional
|
|
7
7
|
|
8
8
|
logger = getLogger(__name__)
|
9
9
|
|
10
|
-
def get_alphanumeric_limited_hash(input_str, max_size):
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
10
|
+
def get_alphanumeric_limited_hash(input_str, max_size=48):
|
11
|
+
"""
|
12
|
+
Create an alphanumeric hash using MD5 that can be reproduced in Go, TypeScript, and Python.
|
13
|
+
|
14
|
+
Args:
|
15
|
+
input_str (str): The input string to hash
|
16
|
+
max_size (int): The maximum length of the returned hash
|
17
|
+
|
18
|
+
Returns:
|
19
|
+
str: An alphanumeric hash of the input string, limited to max_size
|
20
|
+
"""
|
21
|
+
# Calculate MD5 hash and convert to hexadecimal
|
22
|
+
hash_hex = hashlib.md5(input_str.encode('utf-8')).hexdigest()
|
23
|
+
|
24
|
+
# Limit to max_size
|
25
|
+
if len(hash_hex) > max_size:
|
26
|
+
return hash_hex[:max_size]
|
27
|
+
|
28
|
+
return hash_hex
|
25
29
|
|
26
30
|
|
27
31
|
def get_global_unique_hash(workspace: str, type: str, name: str) -> str:
|
blaxel/common/settings.py
CHANGED
@@ -62,9 +62,14 @@ class Settings:
|
|
62
62
|
@property
|
63
63
|
def run_internal_hostname(self) -> str:
|
64
64
|
"""Get the run internal hostname."""
|
65
|
-
|
66
|
-
|
67
|
-
|
65
|
+
if self.generation == "":
|
66
|
+
return ""
|
67
|
+
return os.environ.get("BL_RUN_INTERNAL_HOSTNAME", "")
|
68
|
+
|
69
|
+
@property
|
70
|
+
def generation(self) -> str:
|
71
|
+
"""Get the generation."""
|
72
|
+
return os.environ.get("BL_GENERATION", "")
|
68
73
|
|
69
74
|
@property
|
70
75
|
def bl_cloud(self) -> bool:
|
@@ -262,9 +262,9 @@ blaxel/client/models/workspace_runtime.py,sha256=dxEpmwCFPOCRKHRKhY-iW7j6TbtL5qU
|
|
262
262
|
blaxel/client/models/workspace_user.py,sha256=70CcifQWYbeWG7TDui4pblTzUe5sVK0AS19vNCzKE8g,3423
|
263
263
|
blaxel/common/autoload.py,sha256=NFuK71-IHOY2JQyEBSjDCVfUaQ8D8PJsEUEryIdG4AU,263
|
264
264
|
blaxel/common/env.py,sha256=wTbzPDdNgz4HMJiS2NCZmQlN0qpxy1PQEYBaZgtvhoc,1247
|
265
|
-
blaxel/common/internal.py,sha256=
|
265
|
+
blaxel/common/internal.py,sha256=PExgeKfJEmjINKreNb3r2nB5GAfG7uJhbfqHxuxBED8,2395
|
266
266
|
blaxel/common/logger.py,sha256=emqgonfZMBIaQPowpngWOOZxWQieKP-yj_OzGZT8Oe8,1918
|
267
|
-
blaxel/common/settings.py,sha256=
|
267
|
+
blaxel/common/settings.py,sha256=S7Su64Tu9-7OL5qZIOMVfYOwQos9gs7B3XpRAvI50ho,2331
|
268
268
|
blaxel/instrumentation/exporters.py,sha256=EoX3uaBVku1Rg49pSNXKFyHhgY5OV3Ih6UlqgjF5epw,1670
|
269
269
|
blaxel/instrumentation/log.py,sha256=4tGyvLg6r4DbjqJfajYbbZ1toUzF4Q4H7kHVqYWFAEA,2537
|
270
270
|
blaxel/instrumentation/manager.py,sha256=jVwVasyMI6tu0zv27DVYOaN57nXYuHFJ8QzJQKaNoK4,8880
|
@@ -341,7 +341,7 @@ blaxel/tools/llamaindex.py,sha256=-gQ-C9V_h9a11J4ItsbWjXrCJOg0lRKsb98v9rVsNak,71
|
|
341
341
|
blaxel/tools/openai.py,sha256=GuFXkj6bXEwldyVr89jEsRAi5ihZUVEVe327QuWiGNs,653
|
342
342
|
blaxel/tools/pydantic.py,sha256=CvnNbAG_J4yBtA-XFI4lQrq3FYKjNd39hu841vZT004,1801
|
343
343
|
blaxel/tools/types.py,sha256=YPCGJ4vZDhqR0X2H_TWtc5chQScsC32nGTQdRKJlO8Y,707
|
344
|
-
blaxel-0.1.
|
345
|
-
blaxel-0.1.
|
346
|
-
blaxel-0.1.
|
347
|
-
blaxel-0.1.
|
344
|
+
blaxel-0.1.14rc50.dist-info/METADATA,sha256=ZCoNc3i7CshGtPr2XqfSFFEPwuJAfZfuopesn5G4Zno,11776
|
345
|
+
blaxel-0.1.14rc50.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
346
|
+
blaxel-0.1.14rc50.dist-info/licenses/LICENSE,sha256=p5PNQvpvyDT_0aYBDgmV1fFI_vAD2aSV0wWG7VTgRis,1069
|
347
|
+
blaxel-0.1.14rc50.dist-info/RECORD,,
|
File without changes
|
File without changes
|