amigo_sdk 0.1.1__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 amigo_sdk might be problematic. Click here for more details.

@@ -0,0 +1,192 @@
1
+ Metadata-Version: 2.4
2
+ Name: amigo_sdk
3
+ Version: 0.1.1
4
+ Summary: Amigo AI Python SDK
5
+ Author: Amigo AI
6
+ License-File: LICENSE
7
+ Classifier: Programming Language :: Python :: 3
8
+ Requires-Python: >=3.9
9
+ Requires-Dist: email-validator<3.0,>=2.0
10
+ Requires-Dist: httpx<1.0,>=0.25
11
+ Requires-Dist: pydantic-settings<3.0,>=2.0
12
+ Requires-Dist: pydantic<3.0,>=2.7
13
+ Provides-Extra: dev
14
+ Requires-Dist: datamodel-code-generator[http]<1.0,>=0.21; extra == 'dev'
15
+ Requires-Dist: pytest-asyncio<1.0,>=0.21; extra == 'dev'
16
+ Requires-Dist: pytest-cov<6.0,>=4.0; extra == 'dev'
17
+ Requires-Dist: pytest-httpx<1.0,>=0.30; extra == 'dev'
18
+ Requires-Dist: pytest<9.0,>=7.0; extra == 'dev'
19
+ Requires-Dist: python-dotenv<2.0,>=1.0; extra == 'dev'
20
+ Requires-Dist: ruff<1.0,>=0.1; extra == 'dev'
21
+ Description-Content-Type: text/markdown
22
+
23
+ # Amigo Python SDK
24
+
25
+ [![Tests](https://github.com/amigo-ai/amigo-python-sdk/actions/workflows/test.yml/badge.svg)](https://github.com/amigo-ai/amigo-python-sdk/actions/workflows/test.yml)
26
+ [![codecov](https://codecov.io/gh/amigo-ai/amigo-python-sdk/graph/badge.svg?token=1A7KVPV9ZR)](https://codecov.io/gh/amigo-ai/amigo-python-sdk)
27
+ [![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)
28
+
29
+ The official Python SDK for the Amigo API, providing a simple and intuitive interface to interact with Amigo's AI services.
30
+
31
+ ## Installation
32
+
33
+ Install the SDK using pip:
34
+
35
+ ```bash
36
+ pip install amigo_sdk
37
+ ```
38
+
39
+ Or add it to your requirements.txt:
40
+
41
+ ```txt
42
+ amigo_sdk
43
+ ```
44
+
45
+ ### API compatibility
46
+
47
+ This SDK auto-generates its types from the latest [Amigo OpenAPI schema](https://api.amigo.ai/v1/openapi.json). As a result, only the latest published SDK version is guaranteed to match the current API. If you pin to an older version, it may not include the newest endpoints or fields.
48
+
49
+ ## Quick Start
50
+
51
+ ```python
52
+ import asyncio
53
+ from amigo_sdk import AmigoClient
54
+ from amigo_sdk.generated.model import GetConversationsParametersQuery
55
+
56
+ # Initialize the client
57
+ client = AmigoClient(
58
+ api_key="your-api-key",
59
+ api_key_id="your-api-key-id",
60
+ user_id="user-id",
61
+ org_id="your-organization-id",
62
+ )
63
+
64
+ # List recent conversations
65
+ async def example():
66
+ try:
67
+ async with client:
68
+ conversations = await client.conversation.get_conversations(
69
+ GetConversationsParametersQuery(limit=10, sort_by=["-created_at"])
70
+ )
71
+ print("Conversations:", conversations)
72
+ except Exception as error:
73
+ print(error)
74
+
75
+ # Run the example
76
+ asyncio.run(example())
77
+ ```
78
+
79
+ ## Examples
80
+
81
+ For more SDK usage examples see checkout the [examples/](examples/README.md) folder.
82
+
83
+ ## Configuration
84
+
85
+ The SDK requires the following configuration parameters:
86
+
87
+ | Parameter | Type | Required | Description |
88
+ | ------------ | ---- | -------- | -------------------------------------------------------------- |
89
+ | `api_key` | str | ✅ | API key from Amigo dashboard |
90
+ | `api_key_id` | str | ✅ | API key ID from Amigo dashboard |
91
+ | `user_id` | str | ✅ | User ID on whose behalf the request is made |
92
+ | `org_id` | str | ✅ | Your organization ID |
93
+ | `base_url` | str | ❌ | Base URL of the Amigo API (defaults to `https://api.amigo.ai`) |
94
+
95
+ ### Environment Variables
96
+
97
+ You can also configure the SDK using environment variables:
98
+
99
+ ```bash
100
+ export AMIGO_API_KEY="your-api-key"
101
+ export AMIGO_API_KEY_ID="your-api-key-id"
102
+ export AMIGO_USER_ID="user-id"
103
+ export AMIGO_ORG_ID="your-organization-id"
104
+ export AMIGO_BASE_URL="https://api.amigo.ai" # optional
105
+ ```
106
+
107
+ Then initialize the client without parameters:
108
+
109
+ ```python
110
+ from amigo_sdk import AmigoClient
111
+
112
+ # Automatically loads from environment variables
113
+ client = AmigoClient()
114
+ ```
115
+
116
+ ### Using .env Files
117
+
118
+ Create a `.env` file in your project root:
119
+
120
+ ```env
121
+ AMIGO_API_KEY=your-api-key
122
+ AMIGO_API_KEY_ID=your-api-key-id
123
+ AMIGO_USER_ID=user-id
124
+ AMIGO_ORG_ID=your-organization-id
125
+ ```
126
+
127
+ The SDK will automatically load these variables.
128
+
129
+ ### Getting Your API Credentials
130
+
131
+ 1. **API Key & API Key ID**: Generate these from your Amigo admin dashboard or programmatically using the API
132
+ 2. **Organization ID**: Found in your Amigo dashboard URL or organization settings
133
+ 3. **User ID**: The ID of the user you want to impersonate for API calls
134
+
135
+ For detailed instructions on generating API keys, see the [Authentication Guide](https://docs.amigo.ai/developer-guide).
136
+
137
+ ## Available Resources
138
+
139
+ The SDK provides access to the following resources:
140
+
141
+ - **Organizations**: Get Organization info
142
+ - **Services**: Get available services
143
+ - **Conversation**: Manage conversations
144
+ - **User**: Manage users
145
+
146
+ ## Error Handling
147
+
148
+ The SDK provides typed error handling:
149
+
150
+ ```python
151
+ from amigo_sdk import AmigoClient
152
+ from amigo_sdk.errors import (
153
+ AuthenticationError,
154
+ NotFoundError,
155
+ BadRequestError,
156
+ ValidationError
157
+ )
158
+
159
+ async def example_with_error_handling():
160
+ client = AmigoClient()
161
+
162
+ try:
163
+ async with client:
164
+ result = await client.organizations.get_organization("org-id")
165
+ except AuthenticationError as error:
166
+ print("Authentication failed:", error)
167
+ except NotFoundError as error:
168
+ print("Resource not found:", error)
169
+ except BadRequestError as error:
170
+ print("Bad request:", error)
171
+ except ValidationError as error:
172
+ print("Validation error:", error)
173
+ except Exception as error:
174
+ print("Unexpected error:", error)
175
+ ```
176
+
177
+ ## Development
178
+
179
+ For detailed development setup, testing, and contribution guidelines, see [CONTRIBUTING.md](CONTRIBUTING.md).
180
+
181
+ ## Documentation
182
+
183
+ - **Developer Guide**: [https://docs.amigo.ai/developer-guide](https://docs.amigo.ai/developer-guide)
184
+ - **API Reference**: [https://docs.amigo.ai/api-reference](https://docs.amigo.ai/api-reference)
185
+
186
+ ## License
187
+
188
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
189
+
190
+ ## Support
191
+
192
+ For questions, issues, or feature requests, please visit our [GitHub repository](https://github.com/amigo-ai/amigo-python-sdk) or contact support through the Amigo dashboard.
@@ -0,0 +1,16 @@
1
+ amigo_sdk/__init__.py,sha256=rnObPjuBcEStqSO0S6gsdS_ot8ITOQjVj_-P1LUUYpg,22
2
+ amigo_sdk/auth.py,sha256=Kvwk4P2HJaVUIn2Lwj7l6_xTm0IOVxMlthiXthm-V2Y,1029
3
+ amigo_sdk/config.py,sha256=0eZIo-hcJ8ODftKAr-mwB-FGJxGO5PT5T4dRpyWPqAg,1491
4
+ amigo_sdk/errors.py,sha256=RkRyF5eAASd8fIOS6YvL9rLDvLAYWqHfpHSCR7jqvl4,4840
5
+ amigo_sdk/http_client.py,sha256=XDtcQnAXf4E46Kjl6tKVVFgrMgozjCbOcDf21aK_c4s,8843
6
+ amigo_sdk/sdk_client.py,sha256=yLK8f0ARxLOlJX_cM-Y1GW-zCgJWsL2LIrWMxQGaMhY,3685
7
+ amigo_sdk/generated/model.py,sha256=y8ztYgbnLVZSGAaw4uqTjOc0vLdJoTLMS8nthHBUMU8,427393
8
+ amigo_sdk/resources/conversation.py,sha256=gRkZwqLGOscqoCFcagwU-NfTeMuvLsuEqN_uLyNu1NI,8514
9
+ amigo_sdk/resources/organization.py,sha256=HNwUgeggeEklvcwFS7Of6nGDawN-_Uvd9NsXtcYg65o,726
10
+ amigo_sdk/resources/service.py,sha256=DrKaLnKAglcCeZJQEw50hAOLWtW_InnOu551TxgwF60,947
11
+ amigo_sdk/resources/user.py,sha256=Y66Eb5kH3sYWpdx1E9PP8slban8jpUHmig3YEXHaD_Y,2066
12
+ amigo_sdk-0.1.1.dist-info/METADATA,sha256=jRSx4qhCeZeK76h92roVV_tHKDVf89vQdmqCE6ve15U,6215
13
+ amigo_sdk-0.1.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
14
+ amigo_sdk-0.1.1.dist-info/entry_points.txt,sha256=ivKZ8S9W6SH796zUDHeM-qHodrwmkmUItophi-jJWK0,82
15
+ amigo_sdk-0.1.1.dist-info/licenses/LICENSE,sha256=tx3FiTVbGxwBUOxQbNh05AAQlC2jd5hGvNpIkSfVbCo,1062
16
+ amigo_sdk-0.1.1.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.27.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,3 @@
1
+ [console_scripts]
2
+ check = scripts.check:main
3
+ gen-models = scripts.gen_models:main
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2025 Amigo
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.