# Mesa Python SDK

This package is generated from the Depot OpenAPI specification with Speakeasy.

Do not manually edit generated files in this package. Update the OpenAPI spec and regenerate instead.

<!-- Start Summary [summary] -->
## Summary

Depot API: Depot HTTP API v1
<!-- End Summary [summary] -->

<!-- Start Table of Contents [toc] -->
## Table of Contents
<!-- $toc-max-depth=2 -->
* [Mesa Python SDK](#mesa-python-sdk)
  * [SDK Installation](#sdk-installation)
  * [IDE Support](#ide-support)
  * [SDK Example Usage](#sdk-example-usage)
  * [Authentication](#authentication)
  * [Available Resources and Operations](#available-resources-and-operations)
  * [Pagination](#pagination)
  * [Retries](#retries)
  * [Error Handling](#error-handling)
  * [Server Selection](#server-selection)
  * [Custom HTTP Client](#custom-http-client)
  * [Resource Management](#resource-management)
  * [Debugging](#debugging)

<!-- End Table of Contents [toc] -->

<!-- Start SDK Installation [installation] -->
## SDK Installation

> [!NOTE]
> **Python version upgrade policy**
>
> 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.

The SDK can be installed with *uv*, *pip*, or *poetry* package managers.

### uv

*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.

```bash
uv add mesa-sdk
```

### PIP

*PIP* is the default package installer for Python, enabling easy installation and management of packages from PyPI via the command line.

```bash
pip install mesa-sdk
```

### Poetry

*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.

```bash
poetry add mesa-sdk
```

### Shell and script usage with `uv`

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:

```shell
uvx --from mesa-sdk python
```

It's also possible to write a standalone Python script without needing to set up a whole project like so:

```python
#!/usr/bin/env -S uv run --script
# /// script
# requires-python = ">=3.10"
# dependencies = [
#     "mesa-sdk",
# ]
# ///

from mesa_sdk import Mesa

sdk = Mesa(
  # SDK arguments
)

# Rest of script here...
```

Once that is saved to a file, you can run it with `uv run script.py` where
`script.py` can be replaced with the actual file name.
<!-- End SDK Installation [installation] -->

<!-- Start IDE Support [idesupport] -->
## IDE Support

### PyCharm

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.

- [PyCharm Pydantic Plugin](https://docs.pydantic.dev/latest/integrations/pycharm/)
<!-- End IDE Support [idesupport] -->

<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage

### Example

```python
# Synchronous Example
from mesa_sdk import Mesa


with Mesa(
    api_key="<YOUR_BEARER_TOKEN_HERE>",
) as mesa:

    res = mesa.admin.create_api_key(org="<value>")

    # Handle response
    print(res)
```

</br>

The same SDK client can also be used to make asynchronous requests by importing asyncio.

```python
# Asynchronous Example
import asyncio
from mesa_sdk import Mesa

async def main():

    async with Mesa(
        api_key="<YOUR_BEARER_TOKEN_HERE>",
    ) as mesa:

        res = await mesa.admin.create_api_key_async(org="<value>")

        # Handle response
        print(res)

asyncio.run(main())
```
<!-- End SDK Example Usage [usage] -->

<!-- Start Authentication [security] -->
## Authentication

### Per-Client Security Schemes

This SDK supports the following security scheme globally:

| Name      | Type | Scheme      |
| --------- | ---- | ----------- |
| `api_key` | http | HTTP Bearer |

To authenticate with the API the `api_key` parameter must be set when initializing the SDK client instance. For example:
```python
from mesa_sdk import Mesa


with Mesa(
    api_key="<YOUR_BEARER_TOKEN_HERE>",
) as mesa:

    res = mesa.admin.create_api_key(org="<value>")

    # Handle response
    print(res)

```
<!-- End Authentication [security] -->

<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations

<details open>
<summary>Available methods</summary>

### [Admin](docs/sdks/admin/README.md)

* [create_api_key](docs/sdks/admin/README.md#create_api_key) - Create API key
* [list_api_keys](docs/sdks/admin/README.md#list_api_keys) - List API keys
* [revoke_api_key](docs/sdks/admin/README.md#revoke_api_key) - Revoke API key

### [AgentBlame](docs/sdks/agentblame/README.md)

* [get_by_org_by_repo_agentblame](docs/sdks/agentblame/README.md#get_by_org_by_repo_agentblame) - Get AI attribution data
* [get_by_org_by_repo_analytics](docs/sdks/agentblame/README.md#get_by_org_by_repo_analytics) - Get repository analytics
* [post_by_org_by_repo_analytics_refresh](docs/sdks/agentblame/README.md#post_by_org_by_repo_analytics_refresh) - Refresh repository analytics

### [Branches](docs/sdks/branches/README.md)

* [list](docs/sdks/branches/README.md#list) - List branches
* [create](docs/sdks/branches/README.md#create) - Create branch
* [delete](docs/sdks/branches/README.md#delete) - Delete branch

### [Commits](docs/sdks/commits/README.md)

* [list](docs/sdks/commits/README.md#list) - List commits
* [create](docs/sdks/commits/README.md#create) - Create commit
* [get](docs/sdks/commits/README.md#get) - Get commit

### [Content](docs/sdks/content/README.md)

* [get](docs/sdks/content/README.md#get) - Get content

### [Diffs](docs/sdks/diffs/README.md)

* [get](docs/sdks/diffs/README.md#get) - Get diff

### [Org](docs/sdks/org/README.md)

* [get](docs/sdks/org/README.md#get) - Get organization

### [Repos](docs/sdks/repos/README.md)

* [create](docs/sdks/repos/README.md#create) - Create repository
* [list](docs/sdks/repos/README.md#list) - List repositories
* [get](docs/sdks/repos/README.md#get) - Get repository
* [delete](docs/sdks/repos/README.md#delete) - Delete repository
* [update](docs/sdks/repos/README.md#update) - Update repository
* [get_sync_status](docs/sdks/repos/README.md#get_sync_status) - Get sync status
* [sync](docs/sdks/repos/README.md#sync) - Sync repository

### [Webhooks](docs/sdks/webhooks/README.md)

* [list](docs/sdks/webhooks/README.md#list) - List webhooks
* [create](docs/sdks/webhooks/README.md#create) - Create webhook
* [delete](docs/sdks/webhooks/README.md#delete) - Delete webhook

</details>
<!-- End Available Resources and Operations [operations] -->

<!-- Start Pagination [pagination] -->
## Pagination

Some of the endpoints in this SDK support pagination. To use pagination, you make your SDK calls as usual, but the
returned response object will have a `Next` method that can be called to pull down the next group of results. If the
return value of `Next` is `None`, then there are no more pages to be fetched.

Here's an example of one such pagination call:
```python
from mesa_sdk import Mesa


with Mesa(
    api_key="<YOUR_BEARER_TOKEN_HERE>",
) as mesa:

    res = mesa.repos.list(org="<value>")

    while res is not None:
        # Handle items

        res = res.next()

```
<!-- End Pagination [pagination] -->

<!-- Start Retries [retries] -->
## Retries

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.

To change the default retry strategy for a single API call, simply provide a `RetryConfig` object to the call:
```python
from mesa_sdk import Mesa
from mesa_sdk.utils import BackoffStrategy, RetryConfig


with Mesa(
    api_key="<YOUR_BEARER_TOKEN_HERE>",
) as mesa:

    res = mesa.admin.create_api_key(org="<value>",
        RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False))

    # Handle response
    print(res)

```

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:
```python
from mesa_sdk import Mesa
from mesa_sdk.utils import BackoffStrategy, RetryConfig


with Mesa(
    retry_config=RetryConfig("backoff", BackoffStrategy(1, 50, 1.1, 100), False),
    api_key="<YOUR_BEARER_TOKEN_HERE>",
) as mesa:

    res = mesa.admin.create_api_key(org="<value>")

    # Handle response
    print(res)

```
<!-- End Retries [retries] -->

<!-- Start Error Handling [errors] -->
## Error Handling

[`MesaError`](./src/mesa_sdk/errors/mesaerror.py) is the base class for all HTTP error responses. It has the following properties:

| Property           | Type             | Description                                                                             |
| ------------------ | ---------------- | --------------------------------------------------------------------------------------- |
| `err.message`      | `str`            | Error message                                                                           |
| `err.status_code`  | `int`            | HTTP response status code eg `404`                                                      |
| `err.headers`      | `httpx.Headers`  | HTTP response headers                                                                   |
| `err.body`         | `str`            | HTTP body. Can be empty string if no body is returned.                                  |
| `err.raw_response` | `httpx.Response` | Raw HTTP response                                                                       |
| `err.data`         |                  | Optional. Some errors may contain structured data. [See Error Classes](#error-classes). |

### Example
```python
from mesa_sdk import Mesa, errors


with Mesa(
    api_key="<YOUR_BEARER_TOKEN_HERE>",
) as mesa:
    res = None
    try:

        res = mesa.admin.create_api_key(org="<value>")

        # Handle response
        print(res)


    except errors.MesaError as e:
        # The base class for HTTP error responses
        print(e.message)
        print(e.status_code)
        print(e.body)
        print(e.headers)
        print(e.raw_response)

        # Depending on the method different errors may be thrown
        if isinstance(e, errors.PostByOrgAPIKeysBadRequestError):
            print(e.data.error)  # models.PostByOrgAPIKeysBadRequestError
```

### Error Classes
**Primary error:**
* [`MesaError`](./src/mesa_sdk/errors/mesaerror.py): The base class for HTTP error responses.

<details><summary>Less common errors (180)</summary>

<br />

**Network errors:**
* [`httpx.RequestError`](https://www.python-httpx.org/exceptions/#httpx.RequestError): Base class for request errors.
    * [`httpx.ConnectError`](https://www.python-httpx.org/exceptions/#httpx.ConnectError): HTTP client was unable to make a request to a server.
    * [`httpx.TimeoutException`](https://www.python-httpx.org/exceptions/#httpx.TimeoutException): HTTP request timed out.


**Inherit from [`MesaError`](./src/mesa_sdk/errors/mesaerror.py)**:
* [`PostByOrgAPIKeysBadRequestError`](./src/mesa_sdk/errors/postbyorgapikeysbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgAPIKeysBadRequestError`](./src/mesa_sdk/errors/getbyorgapikeysbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgAPIKeysByIDBadRequestError`](./src/mesa_sdk/errors/deletebyorgapikeysbyidbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`PostByOrgReposBadRequestError`](./src/mesa_sdk/errors/postbyorgreposbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgReposBadRequestError`](./src/mesa_sdk/errors/getbyorgreposbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoBadRequestError`](./src/mesa_sdk/errors/getbyorgbyrepobadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoBadRequestError`](./src/mesa_sdk/errors/deletebyorgbyrepobadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`PatchByOrgByRepoBadRequestError`](./src/mesa_sdk/errors/patchbyorgbyrepobadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoSyncBadRequestError`](./src/mesa_sdk/errors/getbyorgbyreposyncbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoSyncBadRequestError`](./src/mesa_sdk/errors/postbyorgbyreposyncbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoContentBadRequestError`](./src/mesa_sdk/errors/getbyorgbyrepocontentbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoBranchesBadRequestError`](./src/mesa_sdk/errors/getbyorgbyrepobranchesbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoBranchesBadRequestError`](./src/mesa_sdk/errors/postbyorgbyrepobranchesbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoBranchesByBranchBadRequestError`](./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsBadRequestError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoCommitsBadRequestError`](./src/mesa_sdk/errors/postbyorgbyrepocommitsbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsByShaBadRequestError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshabadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoDiffBadRequestError`](./src/mesa_sdk/errors/getbyorgbyrepodiffbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAgentblameBadRequestError`](./src/mesa_sdk/errors/getbyorgbyrepoagentblamebadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAnalyticsBadRequestError`](./src/mesa_sdk/errors/getbyorgbyrepoanalyticsbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoAnalyticsRefreshBadRequestError`](./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoWebhooksBadRequestError`](./src/mesa_sdk/errors/getbyorgbyrepowebhooksbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoWebhooksBadRequestError`](./src/mesa_sdk/errors/postbyorgbyrepowebhooksbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoWebhooksByWebhookIDBadRequestError`](./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`GetByOrgBadRequestError`](./src/mesa_sdk/errors/getbyorgbadrequesterror.py): Invalid request. Status code `400`. Applicable to 1 of 25 methods.*
* [`PostByOrgAPIKeysUnauthorizedError`](./src/mesa_sdk/errors/postbyorgapikeysunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgAPIKeysUnauthorizedError`](./src/mesa_sdk/errors/getbyorgapikeysunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgAPIKeysByIDUnauthorizedError`](./src/mesa_sdk/errors/deletebyorgapikeysbyidunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`PostByOrgReposUnauthorizedError`](./src/mesa_sdk/errors/postbyorgreposunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgReposUnauthorizedError`](./src/mesa_sdk/errors/getbyorgreposunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoUnauthorizedError`](./src/mesa_sdk/errors/getbyorgbyrepounauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoUnauthorizedError`](./src/mesa_sdk/errors/deletebyorgbyrepounauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`PatchByOrgByRepoUnauthorizedError`](./src/mesa_sdk/errors/patchbyorgbyrepounauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoSyncUnauthorizedError`](./src/mesa_sdk/errors/getbyorgbyreposyncunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoSyncUnauthorizedError`](./src/mesa_sdk/errors/postbyorgbyreposyncunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoContentUnauthorizedError`](./src/mesa_sdk/errors/getbyorgbyrepocontentunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoBranchesUnauthorizedError`](./src/mesa_sdk/errors/getbyorgbyrepobranchesunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoBranchesUnauthorizedError`](./src/mesa_sdk/errors/postbyorgbyrepobranchesunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoBranchesByBranchUnauthorizedError`](./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsUnauthorizedError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoCommitsUnauthorizedError`](./src/mesa_sdk/errors/postbyorgbyrepocommitsunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsByShaUnauthorizedError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshaunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoDiffUnauthorizedError`](./src/mesa_sdk/errors/getbyorgbyrepodiffunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAgentblameUnauthorizedError`](./src/mesa_sdk/errors/getbyorgbyrepoagentblameunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAnalyticsUnauthorizedError`](./src/mesa_sdk/errors/getbyorgbyrepoanalyticsunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoAnalyticsRefreshUnauthorizedError`](./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoWebhooksUnauthorizedError`](./src/mesa_sdk/errors/getbyorgbyrepowebhooksunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoWebhooksUnauthorizedError`](./src/mesa_sdk/errors/postbyorgbyrepowebhooksunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoWebhooksByWebhookIDUnauthorizedError`](./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`GetByOrgUnauthorizedError`](./src/mesa_sdk/errors/getbyorgunauthorizederror.py): Unauthorized. Status code `401`. Applicable to 1 of 25 methods.*
* [`PostByOrgAPIKeysForbiddenError`](./src/mesa_sdk/errors/postbyorgapikeysforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgAPIKeysForbiddenError`](./src/mesa_sdk/errors/getbyorgapikeysforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgAPIKeysByIDForbiddenError`](./src/mesa_sdk/errors/deletebyorgapikeysbyidforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`PostByOrgReposForbiddenError`](./src/mesa_sdk/errors/postbyorgreposforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgReposForbiddenError`](./src/mesa_sdk/errors/getbyorgreposforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoForbiddenError`](./src/mesa_sdk/errors/getbyorgbyrepoforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoForbiddenError`](./src/mesa_sdk/errors/deletebyorgbyrepoforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`PatchByOrgByRepoForbiddenError`](./src/mesa_sdk/errors/patchbyorgbyrepoforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoSyncForbiddenError`](./src/mesa_sdk/errors/getbyorgbyreposyncforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoSyncForbiddenError`](./src/mesa_sdk/errors/postbyorgbyreposyncforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoContentForbiddenError`](./src/mesa_sdk/errors/getbyorgbyrepocontentforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoBranchesForbiddenError`](./src/mesa_sdk/errors/getbyorgbyrepobranchesforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoBranchesForbiddenError`](./src/mesa_sdk/errors/postbyorgbyrepobranchesforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoBranchesByBranchForbiddenError`](./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsForbiddenError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoCommitsForbiddenError`](./src/mesa_sdk/errors/postbyorgbyrepocommitsforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsByShaForbiddenError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshaforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoDiffForbiddenError`](./src/mesa_sdk/errors/getbyorgbyrepodiffforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAgentblameForbiddenError`](./src/mesa_sdk/errors/getbyorgbyrepoagentblameforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAnalyticsForbiddenError`](./src/mesa_sdk/errors/getbyorgbyrepoanalyticsforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoAnalyticsRefreshForbiddenError`](./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoWebhooksForbiddenError`](./src/mesa_sdk/errors/getbyorgbyrepowebhooksforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoWebhooksForbiddenError`](./src/mesa_sdk/errors/postbyorgbyrepowebhooksforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoWebhooksByWebhookIDForbiddenError`](./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`GetByOrgForbiddenError`](./src/mesa_sdk/errors/getbyorgforbiddenerror.py): Forbidden. Status code `403`. Applicable to 1 of 25 methods.*
* [`PostByOrgAPIKeysNotFoundError`](./src/mesa_sdk/errors/postbyorgapikeysnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgAPIKeysNotFoundError`](./src/mesa_sdk/errors/getbyorgapikeysnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgAPIKeysByIDNotFoundError`](./src/mesa_sdk/errors/deletebyorgapikeysbyidnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`PostByOrgReposNotFoundError`](./src/mesa_sdk/errors/postbyorgreposnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgReposNotFoundError`](./src/mesa_sdk/errors/getbyorgreposnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoNotFoundError`](./src/mesa_sdk/errors/getbyorgbyreponotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoNotFoundError`](./src/mesa_sdk/errors/deletebyorgbyreponotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`PatchByOrgByRepoNotFoundError`](./src/mesa_sdk/errors/patchbyorgbyreponotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoSyncNotFoundError`](./src/mesa_sdk/errors/getbyorgbyreposyncnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoSyncNotFoundError`](./src/mesa_sdk/errors/postbyorgbyreposyncnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoContentNotFoundError`](./src/mesa_sdk/errors/getbyorgbyrepocontentnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoBranchesNotFoundError`](./src/mesa_sdk/errors/getbyorgbyrepobranchesnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoBranchesNotFoundError`](./src/mesa_sdk/errors/postbyorgbyrepobranchesnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoBranchesByBranchNotFoundError`](./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsNotFoundError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoCommitsNotFoundError`](./src/mesa_sdk/errors/postbyorgbyrepocommitsnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsByShaNotFoundError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshanotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoDiffNotFoundError`](./src/mesa_sdk/errors/getbyorgbyrepodiffnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAgentblameNotFoundError`](./src/mesa_sdk/errors/getbyorgbyrepoagentblamenotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAnalyticsNotFoundError`](./src/mesa_sdk/errors/getbyorgbyrepoanalyticsnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoAnalyticsRefreshNotFoundError`](./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoWebhooksNotFoundError`](./src/mesa_sdk/errors/getbyorgbyrepowebhooksnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoWebhooksNotFoundError`](./src/mesa_sdk/errors/postbyorgbyrepowebhooksnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoWebhooksByWebhookIDNotFoundError`](./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`GetByOrgNotFoundError`](./src/mesa_sdk/errors/getbyorgnotfounderror.py): Not found. Status code `404`. Applicable to 1 of 25 methods.*
* [`PostByOrgAPIKeysNotAcceptableError`](./src/mesa_sdk/errors/postbyorgapikeysnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgAPIKeysNotAcceptableError`](./src/mesa_sdk/errors/getbyorgapikeysnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgAPIKeysByIDNotAcceptableError`](./src/mesa_sdk/errors/deletebyorgapikeysbyidnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`PostByOrgReposNotAcceptableError`](./src/mesa_sdk/errors/postbyorgreposnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgReposNotAcceptableError`](./src/mesa_sdk/errors/getbyorgreposnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoNotAcceptableError`](./src/mesa_sdk/errors/getbyorgbyreponotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoNotAcceptableError`](./src/mesa_sdk/errors/deletebyorgbyreponotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`PatchByOrgByRepoNotAcceptableError`](./src/mesa_sdk/errors/patchbyorgbyreponotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoSyncNotAcceptableError`](./src/mesa_sdk/errors/getbyorgbyreposyncnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoSyncNotAcceptableError`](./src/mesa_sdk/errors/postbyorgbyreposyncnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoContentNotAcceptableError`](./src/mesa_sdk/errors/getbyorgbyrepocontentnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoBranchesNotAcceptableError`](./src/mesa_sdk/errors/getbyorgbyrepobranchesnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoBranchesNotAcceptableError`](./src/mesa_sdk/errors/postbyorgbyrepobranchesnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoBranchesByBranchNotAcceptableError`](./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsNotAcceptableError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoCommitsNotAcceptableError`](./src/mesa_sdk/errors/postbyorgbyrepocommitsnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsByShaNotAcceptableError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshanotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoDiffNotAcceptableError`](./src/mesa_sdk/errors/getbyorgbyrepodiffnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAgentblameNotAcceptableError`](./src/mesa_sdk/errors/getbyorgbyrepoagentblamenotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAnalyticsNotAcceptableError`](./src/mesa_sdk/errors/getbyorgbyrepoanalyticsnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoAnalyticsRefreshNotAcceptableError`](./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoWebhooksNotAcceptableError`](./src/mesa_sdk/errors/getbyorgbyrepowebhooksnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoWebhooksNotAcceptableError`](./src/mesa_sdk/errors/postbyorgbyrepowebhooksnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoWebhooksByWebhookIDNotAcceptableError`](./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`GetByOrgNotAcceptableError`](./src/mesa_sdk/errors/getbyorgnotacceptableerror.py): Not acceptable. Status code `406`. Applicable to 1 of 25 methods.*
* [`PostByOrgAPIKeysConflictError`](./src/mesa_sdk/errors/postbyorgapikeysconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgAPIKeysConflictError`](./src/mesa_sdk/errors/getbyorgapikeysconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgAPIKeysByIDConflictError`](./src/mesa_sdk/errors/deletebyorgapikeysbyidconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`PostByOrgReposConflictError`](./src/mesa_sdk/errors/postbyorgreposconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgReposConflictError`](./src/mesa_sdk/errors/getbyorgreposconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoConflictError`](./src/mesa_sdk/errors/getbyorgbyrepoconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoConflictError`](./src/mesa_sdk/errors/deletebyorgbyrepoconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`PatchByOrgByRepoConflictError`](./src/mesa_sdk/errors/patchbyorgbyrepoconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoSyncConflictError`](./src/mesa_sdk/errors/getbyorgbyreposyncconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoSyncConflictError`](./src/mesa_sdk/errors/postbyorgbyreposyncconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoContentConflictError`](./src/mesa_sdk/errors/getbyorgbyrepocontentconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoBranchesConflictError`](./src/mesa_sdk/errors/getbyorgbyrepobranchesconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoBranchesConflictError`](./src/mesa_sdk/errors/postbyorgbyrepobranchesconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoBranchesByBranchConflictError`](./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsConflictError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoCommitsConflictError`](./src/mesa_sdk/errors/postbyorgbyrepocommitsconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsByShaConflictError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshaconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoDiffConflictError`](./src/mesa_sdk/errors/getbyorgbyrepodiffconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAgentblameConflictError`](./src/mesa_sdk/errors/getbyorgbyrepoagentblameconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAnalyticsConflictError`](./src/mesa_sdk/errors/getbyorgbyrepoanalyticsconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoAnalyticsRefreshConflictError`](./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoWebhooksConflictError`](./src/mesa_sdk/errors/getbyorgbyrepowebhooksconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoWebhooksConflictError`](./src/mesa_sdk/errors/postbyorgbyrepowebhooksconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoWebhooksByWebhookIDConflictError`](./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`GetByOrgConflictError`](./src/mesa_sdk/errors/getbyorgconflicterror.py): Conflict. Status code `409`. Applicable to 1 of 25 methods.*
* [`PostByOrgAPIKeysInternalServerError`](./src/mesa_sdk/errors/postbyorgapikeysinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgAPIKeysInternalServerError`](./src/mesa_sdk/errors/getbyorgapikeysinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgAPIKeysByIDInternalServerError`](./src/mesa_sdk/errors/deletebyorgapikeysbyidinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`PostByOrgReposInternalServerError`](./src/mesa_sdk/errors/postbyorgreposinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgReposInternalServerError`](./src/mesa_sdk/errors/getbyorgreposinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoInternalServerError`](./src/mesa_sdk/errors/getbyorgbyrepointernalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoInternalServerError`](./src/mesa_sdk/errors/deletebyorgbyrepointernalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`PatchByOrgByRepoInternalServerError`](./src/mesa_sdk/errors/patchbyorgbyrepointernalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoSyncInternalServerError`](./src/mesa_sdk/errors/getbyorgbyreposyncinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoSyncInternalServerError`](./src/mesa_sdk/errors/postbyorgbyreposyncinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoContentInternalServerError`](./src/mesa_sdk/errors/getbyorgbyrepocontentinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoBranchesInternalServerError`](./src/mesa_sdk/errors/getbyorgbyrepobranchesinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoBranchesInternalServerError`](./src/mesa_sdk/errors/postbyorgbyrepobranchesinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoBranchesByBranchInternalServerError`](./src/mesa_sdk/errors/deletebyorgbyrepobranchesbybranchinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsInternalServerError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoCommitsInternalServerError`](./src/mesa_sdk/errors/postbyorgbyrepocommitsinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoCommitsByShaInternalServerError`](./src/mesa_sdk/errors/getbyorgbyrepocommitsbyshainternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoDiffInternalServerError`](./src/mesa_sdk/errors/getbyorgbyrepodiffinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAgentblameInternalServerError`](./src/mesa_sdk/errors/getbyorgbyrepoagentblameinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoAnalyticsInternalServerError`](./src/mesa_sdk/errors/getbyorgbyrepoanalyticsinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoAnalyticsRefreshInternalServerError`](./src/mesa_sdk/errors/postbyorgbyrepoanalyticsrefreshinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgByRepoWebhooksInternalServerError`](./src/mesa_sdk/errors/getbyorgbyrepowebhooksinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`PostByOrgByRepoWebhooksInternalServerError`](./src/mesa_sdk/errors/postbyorgbyrepowebhooksinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`DeleteByOrgByRepoWebhooksByWebhookIDInternalServerError`](./src/mesa_sdk/errors/deletebyorgbyrepowebhooksbywebhookidinternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`GetByOrgInternalServerError`](./src/mesa_sdk/errors/getbyorginternalservererror.py): Internal error. Status code `500`. Applicable to 1 of 25 methods.*
* [`ResponseValidationError`](./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.

</details>

\* Check [the method documentation](#available-resources-and-operations) to see if the error is applicable.
<!-- End Error Handling [errors] -->

<!-- Start Server Selection [server] -->
## Server Selection

### Override Server URL Per-Client

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:
```python
from mesa_sdk import Mesa


with Mesa(
    server_url="https://depot.mesa.dev/api/v1",
    api_key="<YOUR_BEARER_TOKEN_HERE>",
) as mesa:

    res = mesa.admin.create_api_key(org="<value>")

    # Handle response
    print(res)

```
<!-- End Server Selection [server] -->

<!-- Start Custom HTTP Client [http-client] -->
## Custom HTTP Client

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.
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.
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.

For example, you could specify a header for every request that this sdk makes as follows:
```python
from mesa_sdk import Mesa
import httpx

http_client = httpx.Client(headers={"x-custom-header": "someValue"})
s = Mesa(client=http_client)
```

or you could wrap the client with your own custom logic:
```python
from mesa_sdk import Mesa
from mesa_sdk.httpclient import AsyncHttpClient
import httpx

class CustomClient(AsyncHttpClient):
    client: AsyncHttpClient

    def __init__(self, client: AsyncHttpClient):
        self.client = client

    async def send(
        self,
        request: httpx.Request,
        *,
        stream: bool = False,
        auth: Union[
            httpx._types.AuthTypes, httpx._client.UseClientDefault, None
        ] = httpx.USE_CLIENT_DEFAULT,
        follow_redirects: Union[
            bool, httpx._client.UseClientDefault
        ] = httpx.USE_CLIENT_DEFAULT,
    ) -> httpx.Response:
        request.headers["Client-Level-Header"] = "added by client"

        return await self.client.send(
            request, stream=stream, auth=auth, follow_redirects=follow_redirects
        )

    def build_request(
        self,
        method: str,
        url: httpx._types.URLTypes,
        *,
        content: Optional[httpx._types.RequestContent] = None,
        data: Optional[httpx._types.RequestData] = None,
        files: Optional[httpx._types.RequestFiles] = None,
        json: Optional[Any] = None,
        params: Optional[httpx._types.QueryParamTypes] = None,
        headers: Optional[httpx._types.HeaderTypes] = None,
        cookies: Optional[httpx._types.CookieTypes] = None,
        timeout: Union[
            httpx._types.TimeoutTypes, httpx._client.UseClientDefault
        ] = httpx.USE_CLIENT_DEFAULT,
        extensions: Optional[httpx._types.RequestExtensions] = None,
    ) -> httpx.Request:
        return self.client.build_request(
            method,
            url,
            content=content,
            data=data,
            files=files,
            json=json,
            params=params,
            headers=headers,
            cookies=cookies,
            timeout=timeout,
            extensions=extensions,
        )

s = Mesa(async_client=CustomClient(httpx.AsyncClient()))
```
<!-- End Custom HTTP Client [http-client] -->

<!-- Start Resource Management [resource-management] -->
## Resource Management

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.

[context-manager]: https://docs.python.org/3/reference/datamodel.html#context-managers

```python
from mesa_sdk import Mesa
def main():

    with Mesa(
        api_key="<YOUR_BEARER_TOKEN_HERE>",
    ) as mesa:
        # Rest of application here...


# Or when using async:
async def amain():

    async with Mesa(
        api_key="<YOUR_BEARER_TOKEN_HERE>",
    ) as mesa:
        # Rest of application here...
```
<!-- End Resource Management [resource-management] -->

<!-- Start Debugging [debug] -->
## Debugging

You can setup your SDK to emit debug logs for SDK requests and responses.

You can pass your own logger class directly into your SDK.
```python
from mesa_sdk import Mesa
import logging

logging.basicConfig(level=logging.DEBUG)
s = Mesa(debug_logger=logging.getLogger("mesa_sdk"))
```
<!-- End Debugging [debug] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->
