rapida-python 0.1.28__tar.gz → 0.1.29__tar.gz

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.
Files changed (97) hide show
  1. {rapida_python-0.1.28 → rapida_python-0.1.29}/PKG-INFO +38 -19
  2. {rapida_python-0.1.28 → rapida_python-0.1.29}/README.md +37 -18
  3. {rapida_python-0.1.28 → rapida_python-0.1.29}/pyproject.toml +1 -1
  4. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/agentkit/__init__.py +4 -2
  5. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida_python.egg-info/PKG-INFO +38 -19
  6. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/__init__.py +0 -0
  7. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/__init__.py +0 -0
  8. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/assistant.py +0 -0
  9. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/call.py +0 -0
  10. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/endpoint.py +0 -0
  11. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/invoke.py +0 -0
  12. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/__init__.py +0 -0
  13. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/agentkit_pb2.py +0 -0
  14. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/agentkit_pb2.pyi +0 -0
  15. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/agentkit_pb2_grpc.py +0 -0
  16. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_analysis_pb2.py +0 -0
  17. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_analysis_pb2.pyi +0 -0
  18. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_analysis_pb2_grpc.py +0 -0
  19. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_api_pb2.py +0 -0
  20. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_api_pb2.pyi +0 -0
  21. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_api_pb2_grpc.py +0 -0
  22. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_deployment_pb2.py +0 -0
  23. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_deployment_pb2.pyi +0 -0
  24. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_deployment_pb2_grpc.py +0 -0
  25. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_knowledge_pb2.py +0 -0
  26. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_knowledge_pb2.pyi +0 -0
  27. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_knowledge_pb2_grpc.py +0 -0
  28. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_provider_pb2.py +0 -0
  29. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_provider_pb2.pyi +0 -0
  30. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_provider_pb2_grpc.py +0 -0
  31. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_tool_pb2.py +0 -0
  32. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_tool_pb2.pyi +0 -0
  33. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_tool_pb2_grpc.py +0 -0
  34. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_webhook_pb2.py +0 -0
  35. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_webhook_pb2.pyi +0 -0
  36. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/assistant_webhook_pb2_grpc.py +0 -0
  37. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/audit_logging_api_pb2.py +0 -0
  38. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/audit_logging_api_pb2.pyi +0 -0
  39. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/audit_logging_api_pb2_grpc.py +0 -0
  40. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/billing_api_pb2.py +0 -0
  41. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/billing_api_pb2.pyi +0 -0
  42. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/billing_api_pb2_grpc.py +0 -0
  43. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/common_pb2.py +0 -0
  44. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/common_pb2.pyi +0 -0
  45. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/common_pb2_grpc.py +0 -0
  46. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/connect_api_pb2.py +0 -0
  47. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/connect_api_pb2.pyi +0 -0
  48. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/connect_api_pb2_grpc.py +0 -0
  49. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/document_api_pb2.py +0 -0
  50. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/document_api_pb2.pyi +0 -0
  51. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/document_api_pb2_grpc.py +0 -0
  52. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/endpoint_api_pb2.py +0 -0
  53. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/endpoint_api_pb2.pyi +0 -0
  54. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/endpoint_api_pb2_grpc.py +0 -0
  55. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/integration_api_pb2.py +0 -0
  56. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/integration_api_pb2.pyi +0 -0
  57. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/integration_api_pb2_grpc.py +0 -0
  58. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/invoker_api_pb2.py +0 -0
  59. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/invoker_api_pb2.pyi +0 -0
  60. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/invoker_api_pb2_grpc.py +0 -0
  61. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/knowledge_api_pb2.py +0 -0
  62. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/knowledge_api_pb2.pyi +0 -0
  63. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/knowledge_api_pb2_grpc.py +0 -0
  64. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/notification_api_pb2.py +0 -0
  65. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/notification_api_pb2.pyi +0 -0
  66. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/notification_api_pb2_grpc.py +0 -0
  67. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/talk_api_pb2.py +0 -0
  68. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/talk_api_pb2.pyi +0 -0
  69. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/talk_api_pb2_grpc.py +0 -0
  70. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/vault_api_pb2.py +0 -0
  71. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/vault_api_pb2.pyi +0 -0
  72. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/vault_api_pb2_grpc.py +0 -0
  73. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/web_api_pb2.py +0 -0
  74. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/web_api_pb2.pyi +0 -0
  75. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/web_api_pb2_grpc.py +0 -0
  76. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/webrtc_pb2.py +0 -0
  77. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/webrtc_pb2.pyi +0 -0
  78. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/clients/protos/webrtc_pb2_grpc.py +0 -0
  79. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/configs/__init__.py +0 -0
  80. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/connections/__init__.py +0 -0
  81. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/utils/__init__.py +0 -0
  82. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/utils/rapida_environment.py +0 -0
  83. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/utils/rapida_header.py +0 -0
  84. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/utils/rapida_region.py +0 -0
  85. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/utils/rapida_source.py +0 -0
  86. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/utils/rapida_value.py +0 -0
  87. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida/version.py +0 -0
  88. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida_python.egg-info/SOURCES.txt +0 -0
  89. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida_python.egg-info/dependency_links.txt +0 -0
  90. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida_python.egg-info/requires.txt +0 -0
  91. {rapida_python-0.1.28 → rapida_python-0.1.29}/rapida_python.egg-info/top_level.txt +0 -0
  92. {rapida_python-0.1.28 → rapida_python-0.1.29}/setup.cfg +0 -0
  93. {rapida_python-0.1.28 → rapida_python-0.1.29}/setup.py +0 -0
  94. {rapida_python-0.1.28 → rapida_python-0.1.29}/tests/test_configs.py +0 -0
  95. {rapida_python-0.1.28 → rapida_python-0.1.29}/tests/test_connections.py +0 -0
  96. {rapida_python-0.1.28 → rapida_python-0.1.29}/tests/test_proto_imports.py +0 -0
  97. {rapida_python-0.1.28 → rapida_python-0.1.29}/tests/test_version.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rapida-python
3
- Version: 0.1.28
3
+ Version: 0.1.29
4
4
  Summary: RapidaAI SDK to integrate rapida.ai APIs
5
5
  Author-email: RapidaAI <code@rapida.ai>
6
6
  License-Expression: MIT
@@ -31,7 +31,7 @@ Requires-Dist: mypy; extra == "dev"
31
31
 
32
32
  # Rapida Python SDK
33
33
 
34
- [![Build and Publish Python SDK](https://github.com/rapidaai/rapida-python/actions/workflows/python-build.yml/badge.svg?branch=main)](https://github.com/rapidaai/rapida-python/actions/workflows/build.yml)
34
+ [![Build and Publish Python SDK](https://github.com/rapidaai/rapida-python/actions/workflows/python-build.yml/badge.svg?branch=main)](https://github.com/rapidaai/rapida-python/actions/workflows/python-build.yml)
35
35
 
36
36
  The Rapida Python SDK provides a powerful interface for interacting with Rapida AI services. This SDK simplifies the process of making API calls, handling authentication, and managing responses from Rapida endpoints.
37
37
 
@@ -48,18 +48,13 @@ pip install rapida-python
48
48
  Here's how to get started with the Rapida Python SDK:
49
49
 
50
50
  ```python
51
- from rapida import (
52
- ConnectionConfig,
53
- )
54
- from pprint import pprint
55
-
51
+ from rapida import ConnectionConfig
56
52
 
57
53
  connection_config = ConnectionConfig.default_connection_config(
58
54
  ConnectionConfig.with_sdk(
59
- "{your-api-key-here}" # Replace with your actual API key
55
+ "{your-api-key-here}"
60
56
  )
61
57
  )
62
-
63
58
  ```
64
59
 
65
60
  ## Authentication
@@ -71,8 +66,11 @@ You can configure the Rapida SDK to authenticate using your **API Key** or **Per
71
66
  ```python
72
67
  import os
73
68
  from rapida.connections import ConnectionConfig
74
- connection_config = ConnectionConfig.with_sdk(
75
- os.environ["RAPIDA_API_KEY"] # API Key from environment variables
69
+
70
+ connection_config = ConnectionConfig.default_connection_config(
71
+ ConnectionConfig.with_sdk(
72
+ os.environ["RAPIDA_API_KEY"] # API Key from environment variables
73
+ )
76
74
  )
77
75
  ```
78
76
 
@@ -82,25 +80,46 @@ connection_config = ConnectionConfig.with_sdk(
82
80
  import os
83
81
  from rapida.connections import ConnectionConfig
84
82
 
85
- connection_config = ConnectionConfig.with_personal_token(
86
- os.environ["RAPIDA_AUTHORIZATION_TOKEN"], # Authorization Token
87
- os.environ["RAPIDA_AUTH_ID"], # Authentication ID
88
- os.environ["RAPIDA_PROJECT_ID"], # Project ID
83
+ connection_config = ConnectionConfig.default_connection_config(
84
+ ConnectionConfig.with_personal_token(
85
+ os.environ["RAPIDA_AUTHORIZATION_TOKEN"], # Authorization Token
86
+ os.environ["RAPIDA_AUTH_ID"], # Authentication ID
87
+ os.environ["RAPIDA_PROJECT_ID"], # Project ID
88
+ )
89
89
  )
90
90
  ```
91
91
 
92
92
  ## Configuration Options
93
93
 
94
- The `DefaultConnectionConfig` accepts multiple options for configuring the SDK. Key options include:
94
+ `ConnectionConfig` accepts multiple options for configuring the SDK:
95
95
 
96
96
  - `with_sdk(api_key: str)`: Sets the API key for authentication.
97
97
  - `with_personal_token(auth_token: str, auth_id: str, project_id: str)`: Configures the connection for personal tokens.
98
- - `with_endpoint_url(url: str)`: Overrides the default API endpoint URL.
99
- - `with_timeout(timeout: float)`: Sets the timeout for API requests (in seconds).
98
+ - `with_webplugin_client(api_key: str, user_id: Optional[str] = None)`: Configures web plugin client authentication.
99
+ - `with_debugger(authorization: str, user_id: str, project_id: str)`: Configures debugger authentication.
100
+ - `with_custom_endpoint(endpoint: Optional[dict] = None, debug: Optional[bool] = None)`: Overrides the default assistant, web, and endpoint API hosts.
101
+ - `with_local()`: Uses local service endpoints and insecure gRPC channels for local development.
102
+ - `default_connection_config(auth)`: Creates a `ConnectionConfig` with the supplied auth metadata.
103
+
104
+ Example using custom endpoints:
105
+
106
+ ```python
107
+ from rapida import ConnectionConfig
108
+
109
+ connection_config = ConnectionConfig.default_connection_config(
110
+ ConnectionConfig.with_sdk("{your-api-key-here}")
111
+ ).with_custom_endpoint(
112
+ {
113
+ "assistant": "assistant.example.com:50051",
114
+ "web": "api.example.com:50051",
115
+ "endpoint": "endpoint.example.com:50051",
116
+ }
117
+ )
118
+ ```
100
119
 
101
120
  ## Compatibility
102
121
 
103
- This SDK requires **Python 3.8 or later**. Ensure your system meets this requirement:
122
+ This SDK requires **Python 3.9 or later**. Ensure your system meets this requirement:
104
123
 
105
124
  ```bash
106
125
  python --version
@@ -1,6 +1,6 @@
1
1
  # Rapida Python SDK
2
2
 
3
- [![Build and Publish Python SDK](https://github.com/rapidaai/rapida-python/actions/workflows/python-build.yml/badge.svg?branch=main)](https://github.com/rapidaai/rapida-python/actions/workflows/build.yml)
3
+ [![Build and Publish Python SDK](https://github.com/rapidaai/rapida-python/actions/workflows/python-build.yml/badge.svg?branch=main)](https://github.com/rapidaai/rapida-python/actions/workflows/python-build.yml)
4
4
 
5
5
  The Rapida Python SDK provides a powerful interface for interacting with Rapida AI services. This SDK simplifies the process of making API calls, handling authentication, and managing responses from Rapida endpoints.
6
6
 
@@ -17,18 +17,13 @@ pip install rapida-python
17
17
  Here's how to get started with the Rapida Python SDK:
18
18
 
19
19
  ```python
20
- from rapida import (
21
- ConnectionConfig,
22
- )
23
- from pprint import pprint
24
-
20
+ from rapida import ConnectionConfig
25
21
 
26
22
  connection_config = ConnectionConfig.default_connection_config(
27
23
  ConnectionConfig.with_sdk(
28
- "{your-api-key-here}" # Replace with your actual API key
24
+ "{your-api-key-here}"
29
25
  )
30
26
  )
31
-
32
27
  ```
33
28
 
34
29
  ## Authentication
@@ -40,8 +35,11 @@ You can configure the Rapida SDK to authenticate using your **API Key** or **Per
40
35
  ```python
41
36
  import os
42
37
  from rapida.connections import ConnectionConfig
43
- connection_config = ConnectionConfig.with_sdk(
44
- os.environ["RAPIDA_API_KEY"] # API Key from environment variables
38
+
39
+ connection_config = ConnectionConfig.default_connection_config(
40
+ ConnectionConfig.with_sdk(
41
+ os.environ["RAPIDA_API_KEY"] # API Key from environment variables
42
+ )
45
43
  )
46
44
  ```
47
45
 
@@ -51,25 +49,46 @@ connection_config = ConnectionConfig.with_sdk(
51
49
  import os
52
50
  from rapida.connections import ConnectionConfig
53
51
 
54
- connection_config = ConnectionConfig.with_personal_token(
55
- os.environ["RAPIDA_AUTHORIZATION_TOKEN"], # Authorization Token
56
- os.environ["RAPIDA_AUTH_ID"], # Authentication ID
57
- os.environ["RAPIDA_PROJECT_ID"], # Project ID
52
+ connection_config = ConnectionConfig.default_connection_config(
53
+ ConnectionConfig.with_personal_token(
54
+ os.environ["RAPIDA_AUTHORIZATION_TOKEN"], # Authorization Token
55
+ os.environ["RAPIDA_AUTH_ID"], # Authentication ID
56
+ os.environ["RAPIDA_PROJECT_ID"], # Project ID
57
+ )
58
58
  )
59
59
  ```
60
60
 
61
61
  ## Configuration Options
62
62
 
63
- The `DefaultConnectionConfig` accepts multiple options for configuring the SDK. Key options include:
63
+ `ConnectionConfig` accepts multiple options for configuring the SDK:
64
64
 
65
65
  - `with_sdk(api_key: str)`: Sets the API key for authentication.
66
66
  - `with_personal_token(auth_token: str, auth_id: str, project_id: str)`: Configures the connection for personal tokens.
67
- - `with_endpoint_url(url: str)`: Overrides the default API endpoint URL.
68
- - `with_timeout(timeout: float)`: Sets the timeout for API requests (in seconds).
67
+ - `with_webplugin_client(api_key: str, user_id: Optional[str] = None)`: Configures web plugin client authentication.
68
+ - `with_debugger(authorization: str, user_id: str, project_id: str)`: Configures debugger authentication.
69
+ - `with_custom_endpoint(endpoint: Optional[dict] = None, debug: Optional[bool] = None)`: Overrides the default assistant, web, and endpoint API hosts.
70
+ - `with_local()`: Uses local service endpoints and insecure gRPC channels for local development.
71
+ - `default_connection_config(auth)`: Creates a `ConnectionConfig` with the supplied auth metadata.
72
+
73
+ Example using custom endpoints:
74
+
75
+ ```python
76
+ from rapida import ConnectionConfig
77
+
78
+ connection_config = ConnectionConfig.default_connection_config(
79
+ ConnectionConfig.with_sdk("{your-api-key-here}")
80
+ ).with_custom_endpoint(
81
+ {
82
+ "assistant": "assistant.example.com:50051",
83
+ "web": "api.example.com:50051",
84
+ "endpoint": "endpoint.example.com:50051",
85
+ }
86
+ )
87
+ ```
69
88
 
70
89
  ## Compatibility
71
90
 
72
- This SDK requires **Python 3.8 or later**. Ensure your system meets this requirement:
91
+ This SDK requires **Python 3.9 or later**. Ensure your system meets this requirement:
73
92
 
74
93
  ```bash
75
94
  python --version
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "rapida-python"
7
- version = "0.1.28"
7
+ version = "0.1.29"
8
8
  description = "RapidaAI SDK to integrate rapida.ai APIs"
9
9
  readme = "README.md"
10
10
  authors = [{name = "RapidaAI", email = "code@rapida.ai"}]
@@ -171,12 +171,13 @@ class AuthorizationInterceptor(ServerInterceptor):
171
171
  return continuation(handler_call_details)
172
172
 
173
173
  def _abort_handler(self):
174
- def abort(ignored_request, context):
174
+ def abort(ignored_request_iterator, context):
175
175
  context.abort(
176
176
  grpc.StatusCode.UNAUTHENTICATED, "Invalid authorization token"
177
177
  )
178
+ return iter(())
178
179
 
179
- return grpc.unary_unary_rpc_method_handler(abort)
180
+ return grpc.stream_stream_rpc_method_handler(abort)
180
181
 
181
182
 
182
183
  # ============================================================================
@@ -658,6 +659,7 @@ class AgentKitServer:
658
659
  if self._server:
659
660
  logger.info(f"Stopping server (grace={grace}s)...")
660
661
  self._server.stop(grace)
662
+ self._server = None
661
663
  logger.info("Server stopped")
662
664
 
663
665
  def wait_for_termination(self, timeout: Optional[float] = None) -> bool:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: rapida-python
3
- Version: 0.1.28
3
+ Version: 0.1.29
4
4
  Summary: RapidaAI SDK to integrate rapida.ai APIs
5
5
  Author-email: RapidaAI <code@rapida.ai>
6
6
  License-Expression: MIT
@@ -31,7 +31,7 @@ Requires-Dist: mypy; extra == "dev"
31
31
 
32
32
  # Rapida Python SDK
33
33
 
34
- [![Build and Publish Python SDK](https://github.com/rapidaai/rapida-python/actions/workflows/python-build.yml/badge.svg?branch=main)](https://github.com/rapidaai/rapida-python/actions/workflows/build.yml)
34
+ [![Build and Publish Python SDK](https://github.com/rapidaai/rapida-python/actions/workflows/python-build.yml/badge.svg?branch=main)](https://github.com/rapidaai/rapida-python/actions/workflows/python-build.yml)
35
35
 
36
36
  The Rapida Python SDK provides a powerful interface for interacting with Rapida AI services. This SDK simplifies the process of making API calls, handling authentication, and managing responses from Rapida endpoints.
37
37
 
@@ -48,18 +48,13 @@ pip install rapida-python
48
48
  Here's how to get started with the Rapida Python SDK:
49
49
 
50
50
  ```python
51
- from rapida import (
52
- ConnectionConfig,
53
- )
54
- from pprint import pprint
55
-
51
+ from rapida import ConnectionConfig
56
52
 
57
53
  connection_config = ConnectionConfig.default_connection_config(
58
54
  ConnectionConfig.with_sdk(
59
- "{your-api-key-here}" # Replace with your actual API key
55
+ "{your-api-key-here}"
60
56
  )
61
57
  )
62
-
63
58
  ```
64
59
 
65
60
  ## Authentication
@@ -71,8 +66,11 @@ You can configure the Rapida SDK to authenticate using your **API Key** or **Per
71
66
  ```python
72
67
  import os
73
68
  from rapida.connections import ConnectionConfig
74
- connection_config = ConnectionConfig.with_sdk(
75
- os.environ["RAPIDA_API_KEY"] # API Key from environment variables
69
+
70
+ connection_config = ConnectionConfig.default_connection_config(
71
+ ConnectionConfig.with_sdk(
72
+ os.environ["RAPIDA_API_KEY"] # API Key from environment variables
73
+ )
76
74
  )
77
75
  ```
78
76
 
@@ -82,25 +80,46 @@ connection_config = ConnectionConfig.with_sdk(
82
80
  import os
83
81
  from rapida.connections import ConnectionConfig
84
82
 
85
- connection_config = ConnectionConfig.with_personal_token(
86
- os.environ["RAPIDA_AUTHORIZATION_TOKEN"], # Authorization Token
87
- os.environ["RAPIDA_AUTH_ID"], # Authentication ID
88
- os.environ["RAPIDA_PROJECT_ID"], # Project ID
83
+ connection_config = ConnectionConfig.default_connection_config(
84
+ ConnectionConfig.with_personal_token(
85
+ os.environ["RAPIDA_AUTHORIZATION_TOKEN"], # Authorization Token
86
+ os.environ["RAPIDA_AUTH_ID"], # Authentication ID
87
+ os.environ["RAPIDA_PROJECT_ID"], # Project ID
88
+ )
89
89
  )
90
90
  ```
91
91
 
92
92
  ## Configuration Options
93
93
 
94
- The `DefaultConnectionConfig` accepts multiple options for configuring the SDK. Key options include:
94
+ `ConnectionConfig` accepts multiple options for configuring the SDK:
95
95
 
96
96
  - `with_sdk(api_key: str)`: Sets the API key for authentication.
97
97
  - `with_personal_token(auth_token: str, auth_id: str, project_id: str)`: Configures the connection for personal tokens.
98
- - `with_endpoint_url(url: str)`: Overrides the default API endpoint URL.
99
- - `with_timeout(timeout: float)`: Sets the timeout for API requests (in seconds).
98
+ - `with_webplugin_client(api_key: str, user_id: Optional[str] = None)`: Configures web plugin client authentication.
99
+ - `with_debugger(authorization: str, user_id: str, project_id: str)`: Configures debugger authentication.
100
+ - `with_custom_endpoint(endpoint: Optional[dict] = None, debug: Optional[bool] = None)`: Overrides the default assistant, web, and endpoint API hosts.
101
+ - `with_local()`: Uses local service endpoints and insecure gRPC channels for local development.
102
+ - `default_connection_config(auth)`: Creates a `ConnectionConfig` with the supplied auth metadata.
103
+
104
+ Example using custom endpoints:
105
+
106
+ ```python
107
+ from rapida import ConnectionConfig
108
+
109
+ connection_config = ConnectionConfig.default_connection_config(
110
+ ConnectionConfig.with_sdk("{your-api-key-here}")
111
+ ).with_custom_endpoint(
112
+ {
113
+ "assistant": "assistant.example.com:50051",
114
+ "web": "api.example.com:50051",
115
+ "endpoint": "endpoint.example.com:50051",
116
+ }
117
+ )
118
+ ```
100
119
 
101
120
  ## Compatibility
102
121
 
103
- This SDK requires **Python 3.8 or later**. Ensure your system meets this requirement:
122
+ This SDK requires **Python 3.9 or later**. Ensure your system meets this requirement:
104
123
 
105
124
  ```bash
106
125
  python --version
File without changes
File without changes