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

# Module contents

> A GraphQL client with sensible defaults for Validio.

### Client

```python
class validio_sdk.client.Client(config: ValidioConfig | None = None, user_agent: str = 'validio-sdk@10.2.0', headers: dict[str, str] = {})
```

**Parameters**

**config** `ValidioConfig | None`

**Type:** `ValidioConfig | None`

**user\_agent** `str`

**headers** `dict[str, str]`

Bases: `object`

A GraphQL client with sensible defaults for Validio.

**NOTE!** The client used in the examples below is in beta and breaking changes may happen.

It will be created by reading the Validio configuration just like the CLI tool and ensure the correct headers are passed.

If no ValidioConfig is passed when constructing the client, it will fallback to first look for required environment variables:

* VALIDIO\_ENDPOINT

* VALIDIO\_ACCESS\_KEY

* VALIDIO\_SECRET\_ACCESS\_KEY

If not all of them are found, it will look for a configuration file. It will first look in the path set in VALIDIO\_CONFIG\_PATH and if that one is empty it will look in the default OS dependant system directory.

#### execute()

```python
async execute(query: str, **kwargs) → Any
```

**Parameters**

**query** `str` *required*

**Returns:** `Any`

Execute a GraphQL request.

* Parameters:

  * **query** – The query to be executed

  * **kwargs** – Arguments matching the GraphQL client e.g. variable\_values and operation\_name.

* Returns:

  The API response

### Session

```python
class validio_sdk.client.Session(session: AsyncClientSession, _timeout: int | float | None = None)
```

**Parameters**

**session** `AsyncClientSession` *required*

**\_timeout** `int | float | None`

Bases: `object`

A session to perform multiple requests.

**NOTE!** The client used in the examples below is in beta and breaking changes may happen.

A session will support running multiple requests with the same client. It will ensure the connection is open and not closed until the session goes out of scope.

#### execute()

```python
async execute(query: str, **kwargs) → Any
```

**Parameters**

**query** `str` *required*

**Returns:** `Any`

Execute a query in the session.

* Parameters:

  * **query** – The query to be executed

  * **kwargs** – Arguments matching the GraphQL client e.g. variable\_values and operation\_name.

* Returns:

  The API response
