-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinspect_adk.py
More file actions
31 lines (27 loc) Β· 1.06 KB
/
inspect_adk.py
File metadata and controls
31 lines (27 loc) Β· 1.06 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# inspect_adk.py (Version 4 - Callback Finder)
import pkgutil
import importlib
import inspect
import google.adk
print("π Searching for all callback-related classes in google.adk...")
print("-" * 60)
found = False
# Walk through all modules in the google.adk package
for _, modname, _ in pkgutil.walk_packages(path=google.adk.__path__, prefix=google.adk.__name__ + '.'):
# We are interested in any module with 'callback' in its name
if 'callback' in modname:
try:
module = importlib.import_module(modname)
# Find all classes within that module
classes = [name for name, obj in inspect.getmembers(module, inspect.isclass)]
if classes:
print(f"π Found module: {modname}")
print(f" βββ Contains classes: {classes}\n")
found = True
except Exception:
# Ignore modules that can't be imported
pass
if not found:
print("β No modules containing 'callback' with classes were found.")
print("-" * 60)
print("Search complete.")