reasoning-deployment-service 0.2.8__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.

Potentially problematic release.


This version of reasoning-deployment-service might be problematic. Click here for more details.

Files changed (29) hide show
  1. examples/programmatic_usage.py +154 -0
  2. reasoning_deployment_service/__init__.py +25 -0
  3. reasoning_deployment_service/cli_editor/__init__.py +5 -0
  4. reasoning_deployment_service/cli_editor/api_client.py +666 -0
  5. reasoning_deployment_service/cli_editor/cli_runner.py +343 -0
  6. reasoning_deployment_service/cli_editor/config.py +82 -0
  7. reasoning_deployment_service/cli_editor/google_deps.py +29 -0
  8. reasoning_deployment_service/cli_editor/reasoning_engine_creator.py +448 -0
  9. reasoning_deployment_service/gui_editor/__init__.py +5 -0
  10. reasoning_deployment_service/gui_editor/main.py +280 -0
  11. reasoning_deployment_service/gui_editor/requirements_minimal.txt +54 -0
  12. reasoning_deployment_service/gui_editor/run_program.sh +55 -0
  13. reasoning_deployment_service/gui_editor/src/__init__.py +1 -0
  14. reasoning_deployment_service/gui_editor/src/core/__init__.py +1 -0
  15. reasoning_deployment_service/gui_editor/src/core/api_client.py +647 -0
  16. reasoning_deployment_service/gui_editor/src/core/config.py +43 -0
  17. reasoning_deployment_service/gui_editor/src/core/google_deps.py +22 -0
  18. reasoning_deployment_service/gui_editor/src/core/reasoning_engine_creator.py +448 -0
  19. reasoning_deployment_service/gui_editor/src/ui/__init__.py +1 -0
  20. reasoning_deployment_service/gui_editor/src/ui/agent_space_view.py +312 -0
  21. reasoning_deployment_service/gui_editor/src/ui/authorization_view.py +280 -0
  22. reasoning_deployment_service/gui_editor/src/ui/reasoning_engine_view.py +354 -0
  23. reasoning_deployment_service/gui_editor/src/ui/reasoning_engines_view.py +204 -0
  24. reasoning_deployment_service/gui_editor/src/ui/ui_components.py +1221 -0
  25. reasoning_deployment_service/reasoning_deployment_service.py +687 -0
  26. reasoning_deployment_service-0.2.8.dist-info/METADATA +177 -0
  27. reasoning_deployment_service-0.2.8.dist-info/RECORD +29 -0
  28. reasoning_deployment_service-0.2.8.dist-info/WHEEL +5 -0
  29. reasoning_deployment_service-0.2.8.dist-info/top_level.txt +2 -0
@@ -0,0 +1,154 @@
1
+ #!/usr/bin/env python3
2
+ """
3
+ Example: Programmatic usage of reasoning deployment service components
4
+ """
5
+
6
+ import os
7
+ import threading
8
+ import time
9
+
10
+ def example_cli_usage():
11
+ """Example of starting CLI editor programmatically."""
12
+ print("šŸ“‹ CLI Editor Example:")
13
+ print("-" * 30)
14
+
15
+ try:
16
+ from reasoning_deployment_service.cli_editor import CLIRunner
17
+
18
+ # Create CLI runner
19
+ cli = CLIRunner()
20
+
21
+ # Note: cli.run() is interactive and will block
22
+ # For demo purposes, we'll just show it's available
23
+ print("āœ… CLI Runner created successfully")
24
+ print("šŸ’” To run: cli.run()")
25
+ print("šŸ”„ This will start an interactive CLI session")
26
+
27
+ return cli
28
+
29
+ except Exception as e:
30
+ print(f"āŒ Error with CLI: {e}")
31
+ return None
32
+
33
+ def example_gui_usage():
34
+ """Example of starting GUI editor programmatically."""
35
+ print("\nšŸ–¼ļø GUI Editor Example:")
36
+ print("-" * 30)
37
+
38
+ try:
39
+ from reasoning_deployment_service.gui_editor import GUIEditor
40
+
41
+ # Note: We don't actually create the GUI to avoid issues in headless environments
42
+ print("āœ… GUI Editor class available")
43
+ print("šŸ’” To run: app = GUIEditor(); app.mainloop()")
44
+ print("šŸ”„ This will start the tkinter GUI application")
45
+
46
+ return GUIEditor
47
+
48
+ except Exception as e:
49
+ print(f"āŒ Error with GUI: {e}")
50
+ return None
51
+
52
+ def example_core_deployment():
53
+ """Example of using core deployment service."""
54
+ print("\nāš™ļø Core Deployment Service Example:")
55
+ print("-" * 40)
56
+
57
+ try:
58
+ from reasoning_deployment_service import ReasoningEngineDeploymentService
59
+
60
+ print("āœ… Core deployment service available")
61
+ print("šŸ’” Usage:")
62
+ print(" service = ReasoningEngineDeploymentService(agent, 'DEV')")
63
+ print(" service.one_deployment_with_everything_on_it()")
64
+
65
+ return ReasoningEngineDeploymentService
66
+
67
+ except Exception as e:
68
+ print(f"āŒ Error with core service: {e}")
69
+ return None
70
+
71
+ def example_integrated_workflow():
72
+ """Example of an integrated workflow."""
73
+ print("\nšŸ”— Integrated Workflow Example:")
74
+ print("-" * 35)
75
+
76
+ print("""
77
+ def integrated_agent_workflow():
78
+ # 1. Deploy your agent
79
+ from reasoning_deployment_service import ReasoningEngineDeploymentService
80
+ from google.adk.agents import BaseAgent
81
+
82
+ class MyAgent(BaseAgent):
83
+ def invoke(self, input_text: str) -> str:
84
+ return f"Agent response: {input_text}"
85
+
86
+ agent = MyAgent()
87
+ service = ReasoningEngineDeploymentService(agent, "DEV")
88
+ service.one_deployment_with_everything_on_it()
89
+
90
+ # 2. Launch management interface
91
+ choice = input("Choose interface (cli/gui): ")
92
+
93
+ if choice == "cli":
94
+ from reasoning_deployment_service.cli_editor import CLIRunner
95
+ cli = CLIRunner()
96
+ cli.run()
97
+ elif choice == "gui":
98
+ from reasoning_deployment_service.gui_editor import GUIEditor
99
+ app = GUIEditor()
100
+ app.mainloop()
101
+ """)
102
+
103
+ def check_environment():
104
+ """Check if environment is properly configured."""
105
+ print("\nšŸ” Environment Check:")
106
+ print("-" * 20)
107
+
108
+ required_vars = [
109
+ "DEV_PROJECT_ID", "DEV_PROJECT_NUMBER",
110
+ "DEV_PROJECT_LOCATION", "DEV_STAGING_BUCKET"
111
+ ]
112
+
113
+ missing = []
114
+ for var in required_vars:
115
+ if not os.getenv(var):
116
+ missing.append(var)
117
+
118
+ if missing:
119
+ print(f"āš ļø Missing environment variables: {missing}")
120
+ print("šŸ’” Set these in your .env file before using the services")
121
+ return False
122
+ else:
123
+ print("āœ… Environment variables look good!")
124
+ return True
125
+
126
+ def main():
127
+ """Main example function."""
128
+ print("šŸš€ Reasoning Deployment Service - Programmatic Usage Examples")
129
+ print("=" * 65)
130
+
131
+ # Check environment
132
+ env_ok = check_environment()
133
+
134
+ # Show component examples
135
+ cli = example_cli_usage()
136
+ gui_class = example_gui_usage()
137
+ core = example_core_deployment()
138
+ example_integrated_workflow()
139
+
140
+ # Summary
141
+ print("\nšŸ“ Summary:")
142
+ print("-" * 12)
143
+ print(f"āœ… CLI Editor: {'Available' if cli else 'Not available'}")
144
+ print(f"āœ… GUI Editor: {'Available' if gui_class else 'Not available'}")
145
+ print(f"āœ… Core Service: {'Available' if core else 'Not available'}")
146
+ print(f"āœ… Environment: {'Configured' if env_ok else 'Needs setup'}")
147
+
148
+ if cli and gui_class and core:
149
+ print("\nšŸŽ‰ All components are ready for programmatic use!")
150
+ else:
151
+ print("\nāš ļø Some components may need additional setup or dependencies.")
152
+
153
+ if __name__ == "__main__":
154
+ main()
@@ -0,0 +1,25 @@
1
+ # Initialize the reasoning_deployment_service package
2
+
3
+ from .reasoning_deployment_service import ReasoningEngineDeploymentService
4
+
5
+ # Import submodules for optional use
6
+ try:
7
+ from . import cli_editor
8
+ from . import gui_editor
9
+ CLI_AVAILABLE = True
10
+ GUI_AVAILABLE = True
11
+ except ImportError as e:
12
+ print(f"Warning: Some optional components not available: {e}")
13
+ CLI_AVAILABLE = False
14
+ GUI_AVAILABLE = False
15
+
16
+ # Make main classes available for direct import
17
+ __all__ = [
18
+ 'ReasoningEngineDeploymentService',
19
+ ]
20
+
21
+ # Add optional components if available
22
+ if CLI_AVAILABLE:
23
+ __all__.append('cli_editor')
24
+ if GUI_AVAILABLE:
25
+ __all__.append('gui_editor')
@@ -0,0 +1,5 @@
1
+ """CLI Editor module for reasoning deployment service."""
2
+
3
+ from .cli_runner import CLIRunner
4
+
5
+ __all__ = ['CLIRunner']