aap-utils 0.2.9__py3-none-any.whl → 0.2.10__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.
aap_utils/cli.py CHANGED
@@ -4,6 +4,9 @@ import requests
4
4
  import socket # To get the hostname
5
5
 
6
6
  API_URL = "http://commit-svc.aiplatform/publish"
7
+ def is_debug_mode():
8
+ """Check if debug mode is enabled via the DEBUG environment variable."""
9
+ return os.getenv("DEBUG", "false").lower() == "true"
7
10
 
8
11
  def extract_default_image():
9
12
  """Extracts the image name from KERNEL_IMAGE if available and formats it."""
@@ -75,6 +78,9 @@ def publish_env():
75
78
  }
76
79
 
77
80
  print(f"Publishing environment: {username}/{image_name}:{';'.join(formatted_tags)}")
81
+
82
+ if is_debug_mode():
83
+ print(f"🔍 DEBUG: Sending data to API: {data}")
78
84
 
79
85
  try:
80
86
  response = requests.post(API_URL, json=data)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: aap_utils
3
- Version: 0.2.9
3
+ Version: 0.2.10
4
4
  Summary: A Python library for registering an IP address for AAP
5
5
  Author: Minh Dang
6
6
  Author-email: danghoangminh86@gmail.com
@@ -0,0 +1,8 @@
1
+ aap_utils/__init__.py,sha256=g6G3i3a5ANDJWqFX2oPsLpP93aTaoTj0gkMQzeqQIJw,172
2
+ aap_utils/cli.py,sha256=4Tou854Q00oZMzopGlAe4CtTOGzgPAAR2dRZCA31Wb0,3899
3
+ aap_utils/register.py,sha256=J9tukByU1mcy4SoaJOoGY8jjzL9JMuNTZGtCBSwwon0,3823
4
+ aap_utils-0.2.10.dist-info/METADATA,sha256=11U8OVCwdVYg_rGOfCstZVUdGZiMDIWctENkcwL7tWc,347
5
+ aap_utils-0.2.10.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
+ aap_utils-0.2.10.dist-info/entry_points.txt,sha256=K-h2toLoqFxAg4Bx2r7FWggKgYnAX9zp9s4Ms4r-d6s,49
7
+ aap_utils-0.2.10.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
8
+ aap_utils-0.2.10.dist-info/RECORD,,
@@ -1,8 +0,0 @@
1
- aap_utils/__init__.py,sha256=g6G3i3a5ANDJWqFX2oPsLpP93aTaoTj0gkMQzeqQIJw,172
2
- aap_utils/cli.py,sha256=lEnZeDeKe9a7VthrTWeRx0SBox6Hi_GzwN1k4b0MKQI,3657
3
- aap_utils/register.py,sha256=J9tukByU1mcy4SoaJOoGY8jjzL9JMuNTZGtCBSwwon0,3823
4
- aap_utils-0.2.9.dist-info/METADATA,sha256=ts-P_XFJj3IrM2QlE8jZCcOYMxoblnmCFL75ll7yL6Y,346
5
- aap_utils-0.2.9.dist-info/WHEEL,sha256=GJ7t_kWBFywbagK5eo9IoUwLW6oyOeTKmQ-9iHFVNxQ,92
6
- aap_utils-0.2.9.dist-info/entry_points.txt,sha256=K-h2toLoqFxAg4Bx2r7FWggKgYnAX9zp9s4Ms4r-d6s,49
7
- aap_utils-0.2.9.dist-info/top_level.txt,sha256=Qt5xmL8_0_jhMl9uA3lg-xnvs4nCEyVj1tBE4vnp36M,10
8
- aap_utils-0.2.9.dist-info/RECORD,,