> ## Documentation Index
> Fetch the complete documentation index at: https://docs.open-metadata.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Client

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L0")

# module `client`

Python API REST wrapper and helpers

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L29")

## class `RetryException`

API Client retry exception

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L35")

## class `APIError`

Represent API related error. error.status\_code will have http status code.

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L41")

### method `__init__`

```python theme={null}
__init__(error, http_error=None)
```

***

#### property code

Return error code

***

#### property request

Handle requests error

***

#### property response

Handle response error :return:

***

#### property status\_code

Return response status code

**Returns:**
int

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L89")

## class `ClientConfig`

**Args:**

`raw_data`: should we return api response raw or wrap it with Entity objects.

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L111")

## class `REST`

REST client wrapper to manage requests with retries, auth and error handling.

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L117")

### method `__init__`

```python theme={null}
__init__(config: ClientConfig)
```

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L324")

### method `close`

```python theme={null}
close()
```

Close requests session

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L308")

### method `delete`

```python theme={null}
delete(path, data=None)
```

DELETE method

**Parameters:**
path (str):  data ():

**Returns:**
Response

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L251")

### method `get`

```python theme={null}
get(path, data=None)
```

GET method

**Parameters:**
path (str):  data ():

**Returns:**
Response

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L290")

### method `patch`

```python theme={null}
patch(path, data=None)
```

PATCH method

**Parameters:**
path (str):  data ():

**Returns:**
Response

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L264")

### method `post`

```python theme={null}
post(path, data=None)
```

POST method

**Parameters:**
path (str):  data ():

**Returns:**
Response

***

[<img src="https://img.shields.io/badge/-source-cccccc?style=flat-square" />](https://github.com/open-metadata/OpenMetadata/tree/main/ingestion/src/metadata/ingestion/ometa/client.py#L277")

### method `put`

```python theme={null}
put(path, data=None)
```

PUT method

**Parameters:**
path (str):  data ():

**Returns:**
Response

***
