mesa-sdk 0.1.0__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.
- mesa_sdk-0.1.0/PKG-INFO +710 -0
- mesa_sdk-0.1.0/README-PYPI.md +696 -0
- mesa_sdk-0.1.0/README.md +696 -0
- mesa_sdk-0.1.0/pyproject.toml +55 -0
- mesa_sdk-0.1.0/setup.cfg +4 -0
- mesa_sdk-0.1.0/src/mesa_sdk/__init__.py +17 -0
- mesa_sdk-0.1.0/src/mesa_sdk/_hooks/__init__.py +4 -0
- mesa_sdk-0.1.0/src/mesa_sdk/_hooks/sdkhooks.py +74 -0
- mesa_sdk-0.1.0/src/mesa_sdk/_hooks/types.py +112 -0
- mesa_sdk-0.1.0/src/mesa_sdk/_version.py +15 -0
- mesa_sdk-0.1.0/src/mesa_sdk/admin.py +830 -0
- mesa_sdk-0.1.0/src/mesa_sdk/agentblame.py +882 -0
- mesa_sdk-0.1.0/src/mesa_sdk/basesdk.py +380 -0
- mesa_sdk-0.1.0/src/mesa_sdk/branches.py +966 -0
- mesa_sdk-0.1.0/src/mesa_sdk/commits.py +996 -0
- mesa_sdk-0.1.0/src/mesa_sdk/content.py +376 -0
- mesa_sdk-0.1.0/src/mesa_sdk/diffs.py +306 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/__init__.py +1163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/deletebyorgapikeysbyidop.py +165 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchop.py +165 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/deletebyorgbyrepoop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidop.py +167 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgapikeysop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgbyrepoagentblameop.py +165 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgbyrepoanalyticsop.py +167 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgbyrepobranchesop.py +165 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgbyrepocommitsbyshaop.py +169 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgbyrepocommitsop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgbyrepocontentop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgbyrepodiffop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgbyrepoop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgbyreposyncop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgbyrepowebhooksop.py +165 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/getbyorgreposop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/mesadefaulterror.py +40 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/mesaerror.py +30 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/no_response_error.py +17 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/patchbyorgbyrepoop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/postbyorgapikeysop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshop.py +165 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/postbyorgbyrepobranchesop.py +167 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/postbyorgbyrepocommitsop.py +165 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/postbyorgbyreposyncop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/postbyorgbyrepowebhooksop.py +167 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/postbyorgreposop.py +163 -0
- mesa_sdk-0.1.0/src/mesa_sdk/errors/responsevalidationerror.py +27 -0
- mesa_sdk-0.1.0/src/mesa_sdk/httpclient.py +125 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/__init__.py +1883 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/deletebyorgapikeysbyidop.py +250 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/deletebyorgbyrepobranchesbybranchop.py +255 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/deletebyorgbyrepoop.py +250 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/deletebyorgbyrepowebhooksbywebhookidop.py +257 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgapikeysop.py +280 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgbyrepoagentblameop.py +310 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgbyrepoanalyticsop.py +469 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgbyrepobranchesop.py +320 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgbyrepocommitsbyshaop.py +320 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgbyrepocommitsop.py +390 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgbyrepocontentop.py +546 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgbyrepodiffop.py +397 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgbyrepoop.py +354 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgbyreposyncop.py +319 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgbyrepowebhooksop.py +288 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgop.py +261 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/getbyorgreposop.py +423 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/patchbyorgbyrepoop.py +497 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/postbyorgapikeysop.py +327 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/postbyorgbyrepoanalyticsrefreshop.py +434 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/postbyorgbyrepobranchesop.py +285 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/postbyorgbyrepocommitsop.py +412 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/postbyorgbyreposyncop.py +250 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/postbyorgbyrepowebhooksop.py +344 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/postbyorgreposop.py +486 -0
- mesa_sdk-0.1.0/src/mesa_sdk/models/security.py +24 -0
- mesa_sdk-0.1.0/src/mesa_sdk/org.py +266 -0
- mesa_sdk-0.1.0/src/mesa_sdk/py.typed +1 -0
- mesa_sdk-0.1.0/src/mesa_sdk/repos.py +1996 -0
- mesa_sdk-0.1.0/src/mesa_sdk/sdk.py +200 -0
- mesa_sdk-0.1.0/src/mesa_sdk/sdkconfiguration.py +48 -0
- mesa_sdk-0.1.0/src/mesa_sdk/types/__init__.py +21 -0
- mesa_sdk-0.1.0/src/mesa_sdk/types/basemodel.py +77 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/__init__.py +203 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/annotations.py +79 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/datetimes.py +23 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/enums.py +134 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/eventstreaming.py +280 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/forms.py +234 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/headers.py +136 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/logger.py +22 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/metadata.py +118 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/queryparams.py +217 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/requestbodies.py +66 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/retries.py +281 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/security.py +176 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/serializers.py +229 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/unmarshal_json_response.py +38 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/url.py +155 -0
- mesa_sdk-0.1.0/src/mesa_sdk/utils/values.py +137 -0
- mesa_sdk-0.1.0/src/mesa_sdk/webhooks.py +920 -0
- mesa_sdk-0.1.0/src/mesa_sdk.egg-info/PKG-INFO +710 -0
- mesa_sdk-0.1.0/src/mesa_sdk.egg-info/SOURCES.txt +103 -0
- mesa_sdk-0.1.0/src/mesa_sdk.egg-info/dependency_links.txt +1 -0
- mesa_sdk-0.1.0/src/mesa_sdk.egg-info/requires.txt +4 -0
- mesa_sdk-0.1.0/src/mesa_sdk.egg-info/top_level.txt +1 -0
mesa_sdk-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,710 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: mesa-sdk
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python Client SDK Generated by Speakeasy.
|
|
5
|
+
Author: Speakeasy
|
|
6
|
+
License: Apache-2.0
|
|
7
|
+
Project-URL: repository, https://github.com/mesa-dot-dev/depot.git
|
|
8
|
+
Requires-Python: >=3.10
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
Requires-Dist: httpcore>=1.0.9
|
|
11
|
+
Requires-Dist: httpx>=0.28.1
|
|
12
|
+
Requires-Dist: jsonpath-python>=1.0.6
|
|
13
|
+
Requires-Dist: pydantic>=2.11.2
|
|
14
|
+
|
|
15
|
+
# Mesa Python SDK
|
|
16
|
+
|
|
17
|
+
This package is generated from the Depot OpenAPI specification with Speakeasy.
|
|
18
|
+
|
|
19
|
+
Do not manually edit generated files in this package. Update the OpenAPI spec and regenerate instead.
|
|
20
|
+
|
|
21
|
+
<!-- Start Summary [summary] -->
|
|
22
|
+
## Summary
|
|
23
|
+
|
|
24
|
+
Depot API: Depot HTTP API v1
|
|
25
|
+
<!-- End Summary [summary] -->
|
|
26
|
+
|
|
27
|
+
<!-- Start Table of Contents [toc] -->
|
|
28
|
+
## Table of Contents
|
|
29
|
+
<!-- $toc-max-depth=2 -->
|
|
30
|
+
* [Mesa Python SDK](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#mesa-python-sdk)
|
|
31
|
+
* [SDK Installation](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#sdk-installation)
|
|
32
|
+
* [IDE Support](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#ide-support)
|
|
33
|
+
* [SDK Example Usage](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#sdk-example-usage)
|
|
34
|
+
* [Authentication](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#authentication)
|
|
35
|
+
* [Available Resources and Operations](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#available-resources-and-operations)
|
|
36
|
+
* [Pagination](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#pagination)
|
|
37
|
+
* [Retries](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#retries)
|
|
38
|
+
* [Error Handling](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#error-handling)
|
|
39
|
+
* [Server Selection](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#server-selection)
|
|
40
|
+
* [Custom HTTP Client](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#custom-http-client)
|
|
41
|
+
* [Resource Management](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#resource-management)
|
|
42
|
+
* [Debugging](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#debugging)
|
|
43
|
+
|
|
44
|
+
<!-- End Table of Contents [toc] -->
|
|
45
|
+
|
|
46
|
+
<!-- Start SDK Installation [installation] -->
|
|
47
|
+
## SDK Installation
|
|
48
|
+
|
|
49
|
+
> [!NOTE]
|
|
50
|
+
> **Python version upgrade policy**
|
|
51
|
+
>
|
|
52
|
+
> Once a Python version reaches its [official end of life date](https://devguide.python.org/versions/), a 3-month grace period is provided for users to upgrade. Following this grace period, the minimum python version supported in the SDK will be updated.
|
|
53
|
+
|
|
54
|
+
The SDK can be installed with *uv*, *pip*, or *poetry* package managers.
|
|
55
|
+
|
|
56
|
+
### uv
|
|
57
|
+
|
|
58
|
+
*uv* is a fast Python package installer and resolver, designed as a drop-in replacement for pip and pip-tools. It's recommended for its speed and modern Python tooling capabilities.
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
uv add mesa-sdk
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
### PIP
|
|
65
|
+
|
|
66
|
+
*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.
|
|
67
|
+
|
|
68
|
+
```bash
|
|
69
|
+
pip install mesa-sdk
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
### Poetry
|
|
73
|
+
|
|
74
|
+
*Poetry* is a modern tool that simplifies dependency management and package publishing by using a single `pyproject.toml` file to handle project metadata and dependencies.
|
|
75
|
+
|
|
76
|
+
```bash
|
|
77
|
+
poetry add mesa-sdk
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
### Shell and script usage with `uv`
|
|
81
|
+
|
|
82
|
+
You can use this SDK in a Python shell with [uv](https://docs.astral.sh/uv/) and the `uvx` command that comes with it like so:
|
|
83
|
+
|
|
84
|
+
```shell
|
|
85
|
+
uvx --from mesa-sdk python
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
It's also possible to write a standalone Python script without needing to set up a whole project like so:
|
|
89
|
+
|
|
90
|
+
```python
|
|
91
|
+
#!/usr/bin/env -S uv run --script
|
|
92
|
+
# /// script
|
|
93
|
+
# requires-python = ">=3.10"
|
|
94
|
+
# dependencies = [
|
|
95
|
+
# "mesa-sdk",
|
|
96
|
+
# ]
|
|
97
|
+
# ///
|
|
98
|
+
|
|
99
|
+
from mesa_sdk import Mesa
|
|
100
|
+
|
|
101
|
+
sdk = Mesa(
|
|
102
|
+
# SDK arguments
|
|
103
|
+
)
|
|
104
|
+
|
|
105
|
+
# Rest of script here...
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
Once that is saved to a file, you can run it with `uv run script.py` where
|
|
109
|
+
`script.py` can be replaced with the actual file name.
|
|
110
|
+
<!-- End SDK Installation [installation] -->
|
|
111
|
+
|
|
112
|
+
<!-- Start IDE Support [idesupport] -->
|
|
113
|
+
## IDE Support
|
|
114
|
+
|
|
115
|
+
### PyCharm
|
|
116
|
+
|
|
117
|
+
Generally, the SDK will work well with most IDEs out of the box. However, when using PyCharm, you can enjoy much better integration with Pydantic by installing an additional plugin.
|
|
118
|
+
|
|
119
|
+
- [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
|
|
120
|
+
<!-- End IDE Support [idesupport] -->
|
|
121
|
+
|
|
122
|
+
<!-- Start SDK Example Usage [usage] -->
|
|
123
|
+
## SDK Example Usage
|
|
124
|
+
|
|
125
|
+
### Example
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
# Synchronous Example
|
|
129
|
+
from mesa_sdk import Mesa
|
|
130
|
+
|
|
131
|
+
|
|
132
|
+
with Mesa(
|
|
133
|
+
api_key="<YOUR_BEARER_TOKEN_HERE>",
|
|
134
|
+
) as mesa:
|
|
135
|
+
|
|
136
|
+
res = mesa.admin.create_api_key(org="<value>")
|
|
137
|
+
|
|
138
|
+
# Handle response
|
|
139
|
+
print(res)
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
</br>
|
|
143
|
+
|
|
144
|
+
The same SDK client can also be used to make asynchronous requests by importing asyncio.
|
|
145
|
+
|
|
146
|
+
```python
|
|
147
|
+
# Asynchronous Example
|
|
148
|
+
import asyncio
|
|
149
|
+
from mesa_sdk import Mesa
|
|
150
|
+
|
|
151
|
+
async def main():
|
|
152
|
+
|
|
153
|
+
async with Mesa(
|
|
154
|
+
api_key="<YOUR_BEARER_TOKEN_HERE>",
|
|
155
|
+
) as mesa:
|
|
156
|
+
|
|
157
|
+
res = await mesa.admin.create_api_key_async(org="<value>")
|
|
158
|
+
|
|
159
|
+
# Handle response
|
|
160
|
+
print(res)
|
|
161
|
+
|
|
162
|
+
asyncio.run(main())
|
|
163
|
+
```
|
|
164
|
+
<!-- End SDK Example Usage [usage] -->
|
|
165
|
+
|
|
166
|
+
<!-- Start Authentication [security] -->
|
|
167
|
+
## Authentication
|
|
168
|
+
|
|
169
|
+
### Per-Client Security Schemes
|
|
170
|
+
|
|
171
|
+
This SDK supports the following security scheme globally:
|
|
172
|
+
|
|
173
|
+
| Name | Type | Scheme |
|
|
174
|
+
| --------- | ---- | ----------- |
|
|
175
|
+
| `api_key` | http | HTTP Bearer |
|
|
176
|
+
|
|
177
|
+
To authenticate with the API the `api_key` parameter must be set when initializing the SDK client instance. For example:
|
|
178
|
+
```python
|
|
179
|
+
from mesa_sdk import Mesa
|
|
180
|
+
|
|
181
|
+
|
|
182
|
+
with Mesa(
|
|
183
|
+
api_key="<YOUR_BEARER_TOKEN_HERE>",
|
|
184
|
+
) as mesa:
|
|
185
|
+
|
|
186
|
+
res = mesa.admin.create_api_key(org="<value>")
|
|
187
|
+
|
|
188
|
+
# Handle response
|
|
189
|
+
print(res)
|
|
190
|
+
|
|
191
|
+
```
|
|
192
|
+
<!-- End Authentication [security] -->
|
|
193
|
+
|
|
194
|
+
<!-- Start Available Resources and Operations [operations] -->
|
|
195
|
+
## Available Resources and Operations
|
|
196
|
+
|
|
197
|
+
<details open>
|
|
198
|
+
<summary>Available methods</summary>
|
|
199
|
+
|
|
200
|
+
### [Admin](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/admin/README.md)
|
|
201
|
+
|
|
202
|
+
* [create_api_key](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/admin/README.md#create_api_key) - Create API key
|
|
203
|
+
* [list_api_keys](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/admin/README.md#list_api_keys) - List API keys
|
|
204
|
+
* [revoke_api_key](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/admin/README.md#revoke_api_key) - Revoke API key
|
|
205
|
+
|
|
206
|
+
### [AgentBlame](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/agentblame/README.md)
|
|
207
|
+
|
|
208
|
+
* [get_by_org_by_repo_agentblame](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/agentblame/README.md#get_by_org_by_repo_agentblame) - Get AI attribution data
|
|
209
|
+
* [get_by_org_by_repo_analytics](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/agentblame/README.md#get_by_org_by_repo_analytics) - Get repository analytics
|
|
210
|
+
* [post_by_org_by_repo_analytics_refresh](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/agentblame/README.md#post_by_org_by_repo_analytics_refresh) - Refresh repository analytics
|
|
211
|
+
|
|
212
|
+
### [Branches](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/branches/README.md)
|
|
213
|
+
|
|
214
|
+
* [list](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/branches/README.md#list) - List branches
|
|
215
|
+
* [create](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/branches/README.md#create) - Create branch
|
|
216
|
+
* [delete](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/branches/README.md#delete) - Delete branch
|
|
217
|
+
|
|
218
|
+
### [Commits](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/commits/README.md)
|
|
219
|
+
|
|
220
|
+
* [list](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/commits/README.md#list) - List commits
|
|
221
|
+
* [create](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/commits/README.md#create) - Create commit
|
|
222
|
+
* [get](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/commits/README.md#get) - Get commit
|
|
223
|
+
|
|
224
|
+
### [Content](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/content/README.md)
|
|
225
|
+
|
|
226
|
+
* [get](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/content/README.md#get) - Get content
|
|
227
|
+
|
|
228
|
+
### [Diffs](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/diffs/README.md)
|
|
229
|
+
|
|
230
|
+
* [get](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/diffs/README.md#get) - Get diff
|
|
231
|
+
|
|
232
|
+
### [Org](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/org/README.md)
|
|
233
|
+
|
|
234
|
+
* [get](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/org/README.md#get) - Get organization
|
|
235
|
+
|
|
236
|
+
### [Repos](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/repos/README.md)
|
|
237
|
+
|
|
238
|
+
* [create](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/repos/README.md#create) - Create repository
|
|
239
|
+
* [list](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/repos/README.md#list) - List repositories
|
|
240
|
+
* [get](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/repos/README.md#get) - Get repository
|
|
241
|
+
* [delete](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/repos/README.md#delete) - Delete repository
|
|
242
|
+
* [update](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/repos/README.md#update) - Update repository
|
|
243
|
+
* [get_sync_status](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/repos/README.md#get_sync_status) - Get sync status
|
|
244
|
+
* [sync](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/repos/README.md#sync) - Sync repository
|
|
245
|
+
|
|
246
|
+
### [Webhooks](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/webhooks/README.md)
|
|
247
|
+
|
|
248
|
+
* [list](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/webhooks/README.md#list) - List webhooks
|
|
249
|
+
* [create](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/webhooks/README.md#create) - Create webhook
|
|
250
|
+
* [delete](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/docs/sdks/webhooks/README.md#delete) - Delete webhook
|
|
251
|
+
|
|
252
|
+
</details>
|
|
253
|
+
<!-- End Available Resources and Operations [operations] -->
|
|
254
|
+
|
|
255
|
+
<!-- Start Pagination [pagination] -->
|
|
256
|
+
## Pagination
|
|
257
|
+
|
|
258
|
+
Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
|
|
259
|
+
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
|
|
260
|
+
return value of `Next` is `None`, then there are no more pages to be fetched.
|
|
261
|
+
|
|
262
|
+
Here's an example of one such pagination call:
|
|
263
|
+
```python
|
|
264
|
+
from mesa_sdk import Mesa
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
with Mesa(
|
|
268
|
+
api_key="<YOUR_BEARER_TOKEN_HERE>",
|
|
269
|
+
) as mesa:
|
|
270
|
+
|
|
271
|
+
res = mesa.repos.list(org="<value>")
|
|
272
|
+
|
|
273
|
+
while res is not None:
|
|
274
|
+
# Handle items
|
|
275
|
+
|
|
276
|
+
res = res.next()
|
|
277
|
+
|
|
278
|
+
```
|
|
279
|
+
<!-- End Pagination [pagination] -->
|
|
280
|
+
|
|
281
|
+
<!-- Start Retries [retries] -->
|
|
282
|
+
## Retries
|
|
283
|
+
|
|
284
|
+
Some of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.
|
|
285
|
+
|
|
286
|
+
To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
|
|
287
|
+
```python
|
|
288
|
+
from mesa_sdk import Mesa
|
|
289
|
+
from mesa_sdk.utils import BackoffStrategy, RetryConfig
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
with Mesa(
|
|
293
|
+
api_key="<YOUR_BEARER_TOKEN_HERE>",
|
|
294
|
+
) as mesa:
|
|
295
|
+
|
|
296
|
+
res = mesa.admin.create_api_key(org="<value>",
|
|
297
|
+
RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))
|
|
298
|
+
|
|
299
|
+
# Handle response
|
|
300
|
+
print(res)
|
|
301
|
+
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
If you'd like to override the default retry strategy for all operations that support retries, you can use the `retry_config` optional parameter when initializing the SDK:
|
|
305
|
+
```python
|
|
306
|
+
from mesa_sdk import Mesa
|
|
307
|
+
from mesa_sdk.utils import BackoffStrategy, RetryConfig
|
|
308
|
+
|
|
309
|
+
|
|
310
|
+
with Mesa(
|
|
311
|
+
retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
|
|
312
|
+
api_key="<YOUR_BEARER_TOKEN_HERE>",
|
|
313
|
+
) as mesa:
|
|
314
|
+
|
|
315
|
+
res = mesa.admin.create_api_key(org="<value>")
|
|
316
|
+
|
|
317
|
+
# Handle response
|
|
318
|
+
print(res)
|
|
319
|
+
|
|
320
|
+
```
|
|
321
|
+
<!-- End Retries [retries] -->
|
|
322
|
+
|
|
323
|
+
<!-- Start Error Handling [errors] -->
|
|
324
|
+
## Error Handling
|
|
325
|
+
|
|
326
|
+
[`MesaError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/mesaerror.py) is the base class for all HTTP error responses. It has the following properties:
|
|
327
|
+
|
|
328
|
+
| Property | Type | Description |
|
|
329
|
+
| ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
|
|
330
|
+
| `err.message` | `str` | Error message |
|
|
331
|
+
| `err.status_code` | `int` | HTTP response status code eg `404` |
|
|
332
|
+
| `err.headers` | `httpx.Headers` | HTTP response headers |
|
|
333
|
+
| `err.body` | `str` | HTTP body. Can be empty string if no body is returned. |
|
|
334
|
+
| `err.raw_response` | `httpx.Response` | Raw HTTP response |
|
|
335
|
+
| `err.data` | | Optional. Some errors may contain structured data. [See Error Classes](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#error-classes). |
|
|
336
|
+
|
|
337
|
+
### Example
|
|
338
|
+
```python
|
|
339
|
+
from mesa_sdk import Mesa, errors
|
|
340
|
+
|
|
341
|
+
|
|
342
|
+
with Mesa(
|
|
343
|
+
api_key="<YOUR_BEARER_TOKEN_HERE>",
|
|
344
|
+
) as mesa:
|
|
345
|
+
res = None
|
|
346
|
+
try:
|
|
347
|
+
|
|
348
|
+
res = mesa.admin.create_api_key(org="<value>")
|
|
349
|
+
|
|
350
|
+
# Handle response
|
|
351
|
+
print(res)
|
|
352
|
+
|
|
353
|
+
|
|
354
|
+
except errors.MesaError as e:
|
|
355
|
+
# The base class for HTTP error responses
|
|
356
|
+
print(e.message)
|
|
357
|
+
print(e.status_code)
|
|
358
|
+
print(e.body)
|
|
359
|
+
print(e.headers)
|
|
360
|
+
print(e.raw_response)
|
|
361
|
+
|
|
362
|
+
# Depending on the method different errors may be thrown
|
|
363
|
+
if isinstance(e, errors.PostByOrgAPIKeysBadRequestError):
|
|
364
|
+
print(e.data.error) # models.PostByOrgAPIKeysBadRequestError
|
|
365
|
+
```
|
|
366
|
+
|
|
367
|
+
### Error Classes
|
|
368
|
+
**Primary error:**
|
|
369
|
+
* [`MesaError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/mesaerror.py): The base class for HTTP error responses.
|
|
370
|
+
|
|
371
|
+
<details><summary>Less common errors (180)</summary>
|
|
372
|
+
|
|
373
|
+
<br />
|
|
374
|
+
|
|
375
|
+
**Network errors:**
|
|
376
|
+
* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
|
|
377
|
+
* [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
|
|
378
|
+
* [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
**Inherit from [`MesaError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/mesaerror.py)**:
|
|
382
|
+
* [`PostByOrgAPIKeysBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgapikeysbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
383
|
+
* [`GetByOrgAPIKeysBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgapikeysbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
384
|
+
* [`DeleteByOrgAPIKeysByIDBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgapikeysbyidbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
385
|
+
* [`PostByOrgReposBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgreposbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
386
|
+
* [`GetByOrgReposBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgreposbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
387
|
+
* [`GetByOrgByRepoBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepobadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
388
|
+
* [`DeleteByOrgByRepoBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepobadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
389
|
+
* [`PatchByOrgByRepoBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/patchbyorgbyrepobadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
390
|
+
* [`GetByOrgByRepoSyncBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyreposyncbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
391
|
+
* [`PostByOrgByRepoSyncBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyreposyncbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
392
|
+
* [`GetByOrgByRepoContentBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocontentbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
393
|
+
* [`GetByOrgByRepoBranchesBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepobranchesbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
394
|
+
* [`PostByOrgByRepoBranchesBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepobranchesbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
395
|
+
* [`DeleteByOrgByRepoBranchesByBranchBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
396
|
+
* [`GetByOrgByRepoCommitsBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
397
|
+
* [`PostByOrgByRepoCommitsBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepocommitsbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
398
|
+
* [`GetByOrgByRepoCommitsByShaBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshabadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
399
|
+
* [`GetByOrgByRepoDiffBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepodiffbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
400
|
+
* [`GetByOrgByRepoAgentblameBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoagentblamebadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
401
|
+
* [`GetByOrgByRepoAnalyticsBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoanalyticsbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
402
|
+
* [`PostByOrgByRepoAnalyticsRefreshBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
403
|
+
* [`GetByOrgByRepoWebhooksBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepowebhooksbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
404
|
+
* [`PostByOrgByRepoWebhooksBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepowebhooksbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
405
|
+
* [`DeleteByOrgByRepoWebhooksByWebhookIDBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
406
|
+
* [`GetByOrgBadRequestError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
|
|
407
|
+
* [`PostByOrgAPIKeysUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgapikeysunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
408
|
+
* [`GetByOrgAPIKeysUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgapikeysunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
409
|
+
* [`DeleteByOrgAPIKeysByIDUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgapikeysbyidunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
410
|
+
* [`PostByOrgReposUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgreposunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
411
|
+
* [`GetByOrgReposUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgreposunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
412
|
+
* [`GetByOrgByRepoUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepounauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
413
|
+
* [`DeleteByOrgByRepoUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepounauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
414
|
+
* [`PatchByOrgByRepoUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/patchbyorgbyrepounauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
415
|
+
* [`GetByOrgByRepoSyncUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyreposyncunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
416
|
+
* [`PostByOrgByRepoSyncUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyreposyncunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
417
|
+
* [`GetByOrgByRepoContentUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocontentunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
418
|
+
* [`GetByOrgByRepoBranchesUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepobranchesunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
419
|
+
* [`PostByOrgByRepoBranchesUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepobranchesunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
420
|
+
* [`DeleteByOrgByRepoBranchesByBranchUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
421
|
+
* [`GetByOrgByRepoCommitsUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
422
|
+
* [`PostByOrgByRepoCommitsUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepocommitsunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
423
|
+
* [`GetByOrgByRepoCommitsByShaUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshaunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
424
|
+
* [`GetByOrgByRepoDiffUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepodiffunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
425
|
+
* [`GetByOrgByRepoAgentblameUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoagentblameunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
426
|
+
* [`GetByOrgByRepoAnalyticsUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoanalyticsunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
427
|
+
* [`PostByOrgByRepoAnalyticsRefreshUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
428
|
+
* [`GetByOrgByRepoWebhooksUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepowebhooksunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
429
|
+
* [`PostByOrgByRepoWebhooksUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepowebhooksunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
430
|
+
* [`DeleteByOrgByRepoWebhooksByWebhookIDUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
431
|
+
* [`GetByOrgUnauthorizedError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
|
|
432
|
+
* [`PostByOrgAPIKeysForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgapikeysforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
433
|
+
* [`GetByOrgAPIKeysForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgapikeysforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
434
|
+
* [`DeleteByOrgAPIKeysByIDForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgapikeysbyidforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
435
|
+
* [`PostByOrgReposForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgreposforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
436
|
+
* [`GetByOrgReposForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgreposforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
437
|
+
* [`GetByOrgByRepoForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
438
|
+
* [`DeleteByOrgByRepoForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepoforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
439
|
+
* [`PatchByOrgByRepoForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/patchbyorgbyrepoforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
440
|
+
* [`GetByOrgByRepoSyncForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyreposyncforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
441
|
+
* [`PostByOrgByRepoSyncForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyreposyncforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
442
|
+
* [`GetByOrgByRepoContentForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocontentforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
443
|
+
* [`GetByOrgByRepoBranchesForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepobranchesforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
444
|
+
* [`PostByOrgByRepoBranchesForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepobranchesforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
445
|
+
* [`DeleteByOrgByRepoBranchesByBranchForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
446
|
+
* [`GetByOrgByRepoCommitsForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
447
|
+
* [`PostByOrgByRepoCommitsForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepocommitsforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
448
|
+
* [`GetByOrgByRepoCommitsByShaForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshaforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
449
|
+
* [`GetByOrgByRepoDiffForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepodiffforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
450
|
+
* [`GetByOrgByRepoAgentblameForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoagentblameforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
451
|
+
* [`GetByOrgByRepoAnalyticsForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoanalyticsforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
452
|
+
* [`PostByOrgByRepoAnalyticsRefreshForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
453
|
+
* [`GetByOrgByRepoWebhooksForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepowebhooksforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
454
|
+
* [`PostByOrgByRepoWebhooksForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepowebhooksforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
455
|
+
* [`DeleteByOrgByRepoWebhooksByWebhookIDForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
456
|
+
* [`GetByOrgForbiddenError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
|
|
457
|
+
* [`PostByOrgAPIKeysNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgapikeysnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
458
|
+
* [`GetByOrgAPIKeysNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgapikeysnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
459
|
+
* [`DeleteByOrgAPIKeysByIDNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgapikeysbyidnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
460
|
+
* [`PostByOrgReposNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgreposnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
461
|
+
* [`GetByOrgReposNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgreposnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
462
|
+
* [`GetByOrgByRepoNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyreponotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
463
|
+
* [`DeleteByOrgByRepoNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyreponotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
464
|
+
* [`PatchByOrgByRepoNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/patchbyorgbyreponotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
465
|
+
* [`GetByOrgByRepoSyncNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyreposyncnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
466
|
+
* [`PostByOrgByRepoSyncNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyreposyncnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
467
|
+
* [`GetByOrgByRepoContentNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocontentnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
468
|
+
* [`GetByOrgByRepoBranchesNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepobranchesnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
469
|
+
* [`PostByOrgByRepoBranchesNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepobranchesnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
470
|
+
* [`DeleteByOrgByRepoBranchesByBranchNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
471
|
+
* [`GetByOrgByRepoCommitsNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
472
|
+
* [`PostByOrgByRepoCommitsNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepocommitsnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
473
|
+
* [`GetByOrgByRepoCommitsByShaNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshanotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
474
|
+
* [`GetByOrgByRepoDiffNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepodiffnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
475
|
+
* [`GetByOrgByRepoAgentblameNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoagentblamenotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
476
|
+
* [`GetByOrgByRepoAnalyticsNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoanalyticsnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
477
|
+
* [`PostByOrgByRepoAnalyticsRefreshNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
478
|
+
* [`GetByOrgByRepoWebhooksNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepowebhooksnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
479
|
+
* [`PostByOrgByRepoWebhooksNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepowebhooksnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
480
|
+
* [`DeleteByOrgByRepoWebhooksByWebhookIDNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
481
|
+
* [`GetByOrgNotFoundError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
|
|
482
|
+
* [`PostByOrgAPIKeysNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgapikeysnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
483
|
+
* [`GetByOrgAPIKeysNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgapikeysnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
484
|
+
* [`DeleteByOrgAPIKeysByIDNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgapikeysbyidnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
485
|
+
* [`PostByOrgReposNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgreposnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
486
|
+
* [`GetByOrgReposNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgreposnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
487
|
+
* [`GetByOrgByRepoNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyreponotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
488
|
+
* [`DeleteByOrgByRepoNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyreponotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
489
|
+
* [`PatchByOrgByRepoNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/patchbyorgbyreponotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
490
|
+
* [`GetByOrgByRepoSyncNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyreposyncnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
491
|
+
* [`PostByOrgByRepoSyncNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyreposyncnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
492
|
+
* [`GetByOrgByRepoContentNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocontentnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
493
|
+
* [`GetByOrgByRepoBranchesNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepobranchesnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
494
|
+
* [`PostByOrgByRepoBranchesNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepobranchesnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
495
|
+
* [`DeleteByOrgByRepoBranchesByBranchNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
496
|
+
* [`GetByOrgByRepoCommitsNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
497
|
+
* [`PostByOrgByRepoCommitsNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepocommitsnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
498
|
+
* [`GetByOrgByRepoCommitsByShaNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshanotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
499
|
+
* [`GetByOrgByRepoDiffNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepodiffnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
500
|
+
* [`GetByOrgByRepoAgentblameNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoagentblamenotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
501
|
+
* [`GetByOrgByRepoAnalyticsNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoanalyticsnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
502
|
+
* [`PostByOrgByRepoAnalyticsRefreshNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
503
|
+
* [`GetByOrgByRepoWebhooksNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepowebhooksnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
504
|
+
* [`PostByOrgByRepoWebhooksNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepowebhooksnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
505
|
+
* [`DeleteByOrgByRepoWebhooksByWebhookIDNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
506
|
+
* [`GetByOrgNotAcceptableError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
|
|
507
|
+
* [`PostByOrgAPIKeysConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgapikeysconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
508
|
+
* [`GetByOrgAPIKeysConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgapikeysconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
509
|
+
* [`DeleteByOrgAPIKeysByIDConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgapikeysbyidconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
510
|
+
* [`PostByOrgReposConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgreposconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
511
|
+
* [`GetByOrgReposConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgreposconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
512
|
+
* [`GetByOrgByRepoConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
513
|
+
* [`DeleteByOrgByRepoConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepoconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
514
|
+
* [`PatchByOrgByRepoConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/patchbyorgbyrepoconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
515
|
+
* [`GetByOrgByRepoSyncConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyreposyncconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
516
|
+
* [`PostByOrgByRepoSyncConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyreposyncconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
517
|
+
* [`GetByOrgByRepoContentConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocontentconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
518
|
+
* [`GetByOrgByRepoBranchesConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepobranchesconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
519
|
+
* [`PostByOrgByRepoBranchesConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepobranchesconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
520
|
+
* [`DeleteByOrgByRepoBranchesByBranchConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
521
|
+
* [`GetByOrgByRepoCommitsConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
522
|
+
* [`PostByOrgByRepoCommitsConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepocommitsconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
523
|
+
* [`GetByOrgByRepoCommitsByShaConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshaconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
524
|
+
* [`GetByOrgByRepoDiffConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepodiffconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
525
|
+
* [`GetByOrgByRepoAgentblameConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoagentblameconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
526
|
+
* [`GetByOrgByRepoAnalyticsConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoanalyticsconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
527
|
+
* [`PostByOrgByRepoAnalyticsRefreshConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
528
|
+
* [`GetByOrgByRepoWebhooksConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepowebhooksconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
529
|
+
* [`PostByOrgByRepoWebhooksConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepowebhooksconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
530
|
+
* [`DeleteByOrgByRepoWebhooksByWebhookIDConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
531
|
+
* [`GetByOrgConflictError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
|
|
532
|
+
* [`PostByOrgAPIKeysInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgapikeysinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
533
|
+
* [`GetByOrgAPIKeysInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgapikeysinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
534
|
+
* [`DeleteByOrgAPIKeysByIDInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgapikeysbyidinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
535
|
+
* [`PostByOrgReposInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgreposinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
536
|
+
* [`GetByOrgReposInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgreposinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
537
|
+
* [`GetByOrgByRepoInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepointernalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
538
|
+
* [`DeleteByOrgByRepoInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepointernalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
539
|
+
* [`PatchByOrgByRepoInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/patchbyorgbyrepointernalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
540
|
+
* [`GetByOrgByRepoSyncInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyreposyncinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
541
|
+
* [`PostByOrgByRepoSyncInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyreposyncinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
542
|
+
* [`GetByOrgByRepoContentInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocontentinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
543
|
+
* [`GetByOrgByRepoBranchesInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepobranchesinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
544
|
+
* [`PostByOrgByRepoBranchesInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepobranchesinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
545
|
+
* [`DeleteByOrgByRepoBranchesByBranchInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
546
|
+
* [`GetByOrgByRepoCommitsInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
547
|
+
* [`PostByOrgByRepoCommitsInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepocommitsinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
548
|
+
* [`GetByOrgByRepoCommitsByShaInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshainternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
549
|
+
* [`GetByOrgByRepoDiffInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepodiffinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
550
|
+
* [`GetByOrgByRepoAgentblameInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoagentblameinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
551
|
+
* [`GetByOrgByRepoAnalyticsInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepoanalyticsinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
552
|
+
* [`PostByOrgByRepoAnalyticsRefreshInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
553
|
+
* [`GetByOrgByRepoWebhooksInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorgbyrepowebhooksinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
554
|
+
* [`PostByOrgByRepoWebhooksInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/postbyorgbyrepowebhooksinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
555
|
+
* [`DeleteByOrgByRepoWebhooksByWebhookIDInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
556
|
+
* [`GetByOrgInternalServerError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/getbyorginternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
|
|
557
|
+
* [`ResponseValidationError`](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/./src/mesa_sdk/errors/responsevalidationerror.py): Type mismatch between the response data and the expected Pydantic model. Provides access to the Pydantic validation error via the `cause` attribute.
|
|
558
|
+
|
|
559
|
+
</details>
|
|
560
|
+
|
|
561
|
+
\* Check [the method documentation](https://github.com/mesa-dot-dev/depot/blob/master/packages/sdk-python/#available-resources-and-operations) to see if the error is applicable.
|
|
562
|
+
<!-- End Error Handling [errors] -->
|
|
563
|
+
|
|
564
|
+
<!-- Start Server Selection [server] -->
|
|
565
|
+
## Server Selection
|
|
566
|
+
|
|
567
|
+
### Override Server URL Per-Client
|
|
568
|
+
|
|
569
|
+
The default server can be overridden globally by passing a URL to the `server_url: str` optional parameter when initializing the SDK client instance. For example:
|
|
570
|
+
```python
|
|
571
|
+
from mesa_sdk import Mesa
|
|
572
|
+
|
|
573
|
+
|
|
574
|
+
with Mesa(
|
|
575
|
+
server_url="https://depot.mesa.dev/api/v1",
|
|
576
|
+
api_key="<YOUR_BEARER_TOKEN_HERE>",
|
|
577
|
+
) as mesa:
|
|
578
|
+
|
|
579
|
+
res = mesa.admin.create_api_key(org="<value>")
|
|
580
|
+
|
|
581
|
+
# Handle response
|
|
582
|
+
print(res)
|
|
583
|
+
|
|
584
|
+
```
|
|
585
|
+
<!-- End Server Selection [server] -->
|
|
586
|
+
|
|
587
|
+
<!-- Start Custom HTTP Client [http-client] -->
|
|
588
|
+
## Custom HTTP Client
|
|
589
|
+
|
|
590
|
+
The Python SDK makes API calls using the [httpx](https://www.python-httpx.org/) HTTP library. In order to provide a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration, you can initialize the SDK client with your own HTTP client instance.
|
|
591
|
+
Depending on whether you are using the sync or async version of the SDK, you can pass an instance of `HttpClient` or `AsyncHttpClient` respectively, which are Protocol's ensuring that the client has the necessary methods to make API calls.
|
|
592
|
+
This allows you to wrap the client with your own custom logic, such as adding custom headers, logging, or error handling, or you can just pass an instance of `httpx.Client` or `httpx.AsyncClient` directly.
|
|
593
|
+
|
|
594
|
+
For example, you could specify a header for every request that this sdk makes as follows:
|
|
595
|
+
```python
|
|
596
|
+
from mesa_sdk import Mesa
|
|
597
|
+
import httpx
|
|
598
|
+
|
|
599
|
+
http_client = httpx.Client(headers={"x-custom-header": "someValue"})
|
|
600
|
+
s = Mesa(client=http_client)
|
|
601
|
+
```
|
|
602
|
+
|
|
603
|
+
or you could wrap the client with your own custom logic:
|
|
604
|
+
```python
|
|
605
|
+
from mesa_sdk import Mesa
|
|
606
|
+
from mesa_sdk.httpclient import AsyncHttpClient
|
|
607
|
+
import httpx
|
|
608
|
+
|
|
609
|
+
class CustomClient(AsyncHttpClient):
|
|
610
|
+
client: AsyncHttpClient
|
|
611
|
+
|
|
612
|
+
def __init__(self, client: AsyncHttpClient):
|
|
613
|
+
self.client = client
|
|
614
|
+
|
|
615
|
+
async def send(
|
|
616
|
+
self,
|
|
617
|
+
request: httpx.Request,
|
|
618
|
+
*,
|
|
619
|
+
stream: bool = False,
|
|
620
|
+
auth: Union[
|
|
621
|
+
httpx._types.AuthTypes, httpx._client.UseClientDefault, None
|
|
622
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
|
623
|
+
follow_redirects: Union[
|
|
624
|
+
bool, httpx._client.UseClientDefault
|
|
625
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
|
626
|
+
) -> httpx.Response:
|
|
627
|
+
request.headers["Client-Level-Header"] = "added by client"
|
|
628
|
+
|
|
629
|
+
return await self.client.send(
|
|
630
|
+
request, stream=stream, auth=auth, follow_redirects=follow_redirects
|
|
631
|
+
)
|
|
632
|
+
|
|
633
|
+
def build_request(
|
|
634
|
+
self,
|
|
635
|
+
method: str,
|
|
636
|
+
url: httpx._types.URLTypes,
|
|
637
|
+
*,
|
|
638
|
+
content: Optional[httpx._types.RequestContent] = None,
|
|
639
|
+
data: Optional[httpx._types.RequestData] = None,
|
|
640
|
+
files: Optional[httpx._types.RequestFiles] = None,
|
|
641
|
+
json: Optional[Any] = None,
|
|
642
|
+
params: Optional[httpx._types.QueryParamTypes] = None,
|
|
643
|
+
headers: Optional[httpx._types.HeaderTypes] = None,
|
|
644
|
+
cookies: Optional[httpx._types.CookieTypes] = None,
|
|
645
|
+
timeout: Union[
|
|
646
|
+
httpx._types.TimeoutTypes, httpx._client.UseClientDefault
|
|
647
|
+
] = httpx.USE_CLIENT_DEFAULT,
|
|
648
|
+
extensions: Optional[httpx._types.RequestExtensions] = None,
|
|
649
|
+
) -> httpx.Request:
|
|
650
|
+
return self.client.build_request(
|
|
651
|
+
method,
|
|
652
|
+
url,
|
|
653
|
+
content=content,
|
|
654
|
+
data=data,
|
|
655
|
+
files=files,
|
|
656
|
+
json=json,
|
|
657
|
+
params=params,
|
|
658
|
+
headers=headers,
|
|
659
|
+
cookies=cookies,
|
|
660
|
+
timeout=timeout,
|
|
661
|
+
extensions=extensions,
|
|
662
|
+
)
|
|
663
|
+
|
|
664
|
+
s = Mesa(async_client=CustomClient(httpx.AsyncClient()))
|
|
665
|
+
```
|
|
666
|
+
<!-- End Custom HTTP Client [http-client] -->
|
|
667
|
+
|
|
668
|
+
<!-- Start Resource Management [resource-management] -->
|
|
669
|
+
## Resource Management
|
|
670
|
+
|
|
671
|
+
The `Mesa` class implements the context manager protocol and registers a finalizer function to close the underlying sync and async HTTPX clients it uses under the hood. This will close HTTP connections, release memory and free up other resources held by the SDK. In short-lived Python programs and notebooks that make a few SDK method calls, resource management may not be a concern. However, in longer-lived programs, it is beneficial to create a single SDK instance via a [context manager][context-manager] and reuse it across the application.
|
|
672
|
+
|
|
673
|
+
[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers
|
|
674
|
+
|
|
675
|
+
```python
|
|
676
|
+
from mesa_sdk import Mesa
|
|
677
|
+
def main():
|
|
678
|
+
|
|
679
|
+
with Mesa(
|
|
680
|
+
api_key="<YOUR_BEARER_TOKEN_HERE>",
|
|
681
|
+
) as mesa:
|
|
682
|
+
# Rest of application here...
|
|
683
|
+
|
|
684
|
+
|
|
685
|
+
# Or when using async:
|
|
686
|
+
async def amain():
|
|
687
|
+
|
|
688
|
+
async with Mesa(
|
|
689
|
+
api_key="<YOUR_BEARER_TOKEN_HERE>",
|
|
690
|
+
) as mesa:
|
|
691
|
+
# Rest of application here...
|
|
692
|
+
```
|
|
693
|
+
<!-- End Resource Management [resource-management] -->
|
|
694
|
+
|
|
695
|
+
<!-- Start Debugging [debug] -->
|
|
696
|
+
## Debugging
|
|
697
|
+
|
|
698
|
+
You can setup your SDK to emit debug logs for SDK requests and responses.
|
|
699
|
+
|
|
700
|
+
You can pass your own logger class directly into your SDK.
|
|
701
|
+
```python
|
|
702
|
+
from mesa_sdk import Mesa
|
|
703
|
+
import logging
|
|
704
|
+
|
|
705
|
+
logging.basicConfig(level=logging.DEBUG)
|
|
706
|
+
s = Mesa(debug_logger=logging.getLogger("mesa_sdk"))
|
|
707
|
+
```
|
|
708
|
+
<!-- End Debugging [debug] -->
|
|
709
|
+
|
|
710
|
+
<!-- Placeholder for Future Speakeasy SDK Sections -->
|