Pere Miquel Brull 34fbe5d64c
Docs - Prepare 1.7 docs and 1.8 snapshot (#20882)
* DOCS - Prepare 1.7 Release and 1.8 SNAPSHOT

* DOCS - Prepare 1.7 Release and 1.8 SNAPSHOT
2025-04-18 12:12:17 +05:30

4.6 KiB

title slug
Client /sdk/python/api-reference/client

{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

module client

Python API REST wrapper and helpers


{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

class RetryException

API Client retry exception


{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

class APIError

Represent API related error. error.status_code will have http status code.

{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

method __init__

__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


{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

class ClientConfig

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


{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

class REST

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

{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

method __init__

__init__(config: ClientConfig)

{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

method close

close()

Close requests session


{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

method delete

delete(path, data=None)

DELETE method

Parameters: path (str): data ():

Returns: Response


{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

method get

get(path, data=None)

GET method

Parameters: path (str): data ():

Returns: Response


{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

method patch

patch(path, data=None)

PATCH method

Parameters: path (str): data ():

Returns: Response


{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

method post

post(path, data=None)

POST method

Parameters: path (str): data ():

Returns: Response


{% image align="right" style="float:right;" src="https://img.shields.io/badge/-source-cccccc?style=flat-square" /%}

method put

put(path, data=None)

PUT method

Parameters: path (str): data ():

Returns: Response