> ## 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 Boolean filter configuration.

### BooleanFilter

```python
class validio_sdk.BooleanFilter(*, field: str, operator: BooleanFilterOperator, name: str, source: Source, display_name: str | None = None, ignore_changes: bool = False, recreate_on_change: bool = False)
```

**Parameters**

**field** `str` *required*

**operator** `BooleanFilterOperator` *required*

**name** `str` *required*

**source** `Source` *required*

**display\_name** `str | None`

**ignore\_changes** `bool`

**recreate\_on\_change** `bool`

Bases: [`Filter`](https://docs.validio.io/v10.1/sdk-reference/validio_sdk.resource "validio_sdk.resource.filters.Filter")

A Boolean filter configuration.

See [Filter Types](https://docs.validio.io/v10.1/docs/filters/filter-types.md#boolean-filter).

### BooleanFilterOperator

```python
class validio_sdk.BooleanFilterOperator(*values)
```

Bases: `str`, `Enum`

Configures the behavior of a Boolean filter.

IS\_TRUE: Allow values equal to TRUE IS\_FALSE: Allow values equal to FALSE

#### IS\_FALSE

```python
IS_FALSE = 'IS_FALSE'
```

#### IS\_TRUE

```python
IS_TRUE = 'IS_TRUE'
```

### ConfigInvalidError

```python
exception validio_sdk.ConfigInvalidError
```

Bases: [`ValidioError`](https://docs.validio.io/v10.1/sdk-reference/validio_sdk#validioerror "validio_sdk.exception.ValidioError")

Exception when the configuration file is invalid.

### ConfigNotFoundError

```python
exception validio_sdk.ConfigNotFoundError(endpoint_env: str, access_key_env: str, secret_access_key_env: str)
```

**Parameters**

**endpoint\_env** `str` *required*

**access\_key\_env** `str` *required*

**secret\_access\_key\_env** `str` *required*

Bases: [`ValidioError`](https://docs.validio.io/v10.1/sdk-reference/validio_sdk#validioerror "validio_sdk.exception.ValidioError")

Exception when no configuration is found.

### EnumFilter

```python
class validio_sdk.EnumFilter(*, field: str, values: list[str], name: str, source: Source, operator: EnumFilterOperator = EnumFilterOperator.ALLOW, display_name: str | None = None, ignore_changes: bool = False, recreate_on_change: bool = False)
```

**Parameters**

**field** `str` *required*

**values** `list[str]` *required*

**name** `str` *required*

**source** `Source` *required*

**operator** `EnumFilterOperator`

**display\_name** `str | None`

**ignore\_changes** `bool`

**recreate\_on\_change** `bool`

Bases: [`Filter`](https://docs.validio.io/v10.1/sdk-reference/validio_sdk.resource "validio_sdk.resource.filters.Filter")

An Enum filter configuration.

See [Filter Types](https://docs.validio.io/v10.1/docs/filters/filter-types.md#enum-filter).

### EnumFilterOperator

```python
class validio_sdk.EnumFilterOperator(*values)
```

Bases: `str`, `Enum`

Configures the behavior of an Enum filter.

ALLOW: Allow values in the enum DENY: Deny values in the enum

#### ALLOW

```python
ALLOW = 'ALLOW'
```

#### DENY

```python
DENY = 'DENY'
```

### NullFilter

```python
class validio_sdk.NullFilter(*, field: str, name: str, source: Source, operator: NullFilterOperator = NullFilterOperator.IS, display_name: str | None = None, ignore_changes: bool = False, recreate_on_change: bool = False)
```

**Parameters**

**field** `str` *required*

**name** `str` *required*

**source** `Source` *required*

**operator** `NullFilterOperator`

**display\_name** `str | None`

**ignore\_changes** `bool`

**recreate\_on\_change** `bool`

Bases: [`Filter`](https://docs.validio.io/v10.1/sdk-reference/validio_sdk.resource "validio_sdk.resource.filters.Filter")

A Null filter configuration.

See [Filter Types](https://docs.validio.io/v10.1/docs/filters/filter-types.md#null-filter).

### NullFilterOperator

```python
class validio_sdk.NullFilterOperator(*values)
```

Bases: `str`, `Enum`

Configures the behavior of a Null filter.

IS: Filter in NULL values IS\_NOT: Filter in Non-NULL values

#### IS

```python
IS = 'IS'
```

#### IS\_NOT

```python
IS_NOT = 'IS_NOT'
```

### SourcePollInfo

```python
class validio_sdk.SourcePollInfo(source_id: str, poll_id: str, poll_timestamp: datetime)
```

**Parameters**

**source\_id** `str` *required*

**poll\_id** `str` *required*

**poll\_timestamp** `datetime` *required*

Bases: `object`

Details about a poll that was started.

* Variables:

  * **source\_id** – The id of the source being polled.

  * **poll\_id** – The id of the started poll.

  * **poll\_timestamp** – The time at which the poll was initiated.

#### poll\_id

```python
poll_id: str
```

#### poll\_timestamp

```python
poll_timestamp: datetime
```

#### source\_id

```python
source_id: str
```

### SourcePollResult

```python
class validio_sdk.SourcePollResult(info: SourcePollInfo, error: Exception | None = None, has_incidents: bool | None = None)
```

**Parameters**

**info** `SourcePollInfo` *required*

**error** `Exception | None`

**has\_incidents** `bool | None`

Bases: `object`

The outcome of polling a source.

* Variables:

  * **info** – Details about the started poll. Can be passed to wait\_until\_poll\_completion to resume waiting for the same poll.

  * **error** – Any error that occurred while waiting for the poll. When set, has\_incidents is left unset.

  * **has\_incidents** – Whether any new incidents were created while polling. Only set once the poll completed successfully.

#### error

```python
error: Exception | None = None
```

#### has\_incidents

```python
has_incidents: bool | None = None
```

#### info

```python
info: SourcePollInfo
```

### SqlFilter

```python
class validio_sdk.SqlFilter(*, query: str, name: str, source: Source, display_name: str | None = None, ignore_changes: bool = False, recreate_on_change: bool = False)
```

**Parameters**

**query** `str` *required*

**name** `str` *required*

**source** `Source` *required*

**display\_name** `str | None`

**ignore\_changes** `bool`

**recreate\_on\_change** `bool`

Bases: [`Filter`](https://docs.validio.io/v10.1/sdk-reference/validio_sdk.resource "validio_sdk.resource.filters.Filter")

A SQL filter configuration.

See [Filter Types](https://docs.validio.io/v10.1/docs/filters/filter-types.md#sql-filter).

### StringFilter

```python
class validio_sdk.StringFilter(*, field: str, operator: StringFilterOperator, name: str, source: Source, value: str | None = None, display_name: str | None = None, ignore_changes: bool = False, recreate_on_change: bool = False)
```

**Parameters**

**field** `str` *required*

**operator** `StringFilterOperator` *required*

**name** `str` *required*

**source** `Source` *required*

**value** `str | None`

**display\_name** `str | None`

**ignore\_changes** `bool`

**recreate\_on\_change** `bool`

Bases: [`Filter`](https://docs.validio.io/v10.1/sdk-reference/validio_sdk.resource "validio_sdk.resource.filters.Filter")

A String filter configuration.

See [Filter Types](https://docs.validio.io/v10.1/docs/filters/filter-types.md#string-filter).

### StringFilterOperator

```python
class validio_sdk.StringFilterOperator(*values)
```

Bases: `str`, `Enum`

Configures the behavior of a String filter.

IS\_EMPTY: The string is empty IS\_NOT\_EMPTY: The string is not empty CONTAINS: The string contains DOES\_NOT\_CONTAIN: The string does not contain STARTS\_WITH: The string is prefixed with ENDS\_WITH: The string is suffixed with IS\_EXACTLY: Exact match of full string REGEX: Regular expressions

#### CONTAINS

```python
CONTAINS = 'CONTAINS'
```

#### DOES\_NOT\_CONTAIN

```python
DOES_NOT_CONTAIN = 'DOES_NOT_CONTAIN'
```

#### ENDS\_WITH

```python
ENDS_WITH = 'ENDS_WITH'
```

#### IS\_EMPTY

```python
IS_EMPTY = 'IS_EMPTY'
```

#### IS\_EXACTLY

```python
IS_EXACTLY = 'IS_EXACTLY'
```

#### IS\_NOT\_EMPTY

```python
IS_NOT_EMPTY = 'IS_NOT_EMPTY'
```

#### REGEX

```python
REGEX = 'REGEX'
```

#### STARTS\_WITH

```python
STARTS_WITH = 'STARTS_WITH'
```

### ThresholdFilter

```python
class validio_sdk.ThresholdFilter(*, field: str, value: float, name: str, source: Source, operator: ThresholdFilterOperator, display_name: str | None = None, ignore_changes: bool = False, recreate_on_change: bool = False)
```

**Parameters**

**field** `str` *required*

**value** `float` *required*

**name** `str` *required*

**source** `Source` *required*

**operator** `ThresholdFilterOperator` *required*

**display\_name** `str | None`

**ignore\_changes** `bool`

**recreate\_on\_change** `bool`

Bases: [`Filter`](https://docs.validio.io/v10.1/sdk-reference/validio_sdk.resource "validio_sdk.resource.filters.Filter")

A Threshold filter configuration.

See [Filter Types](https://docs.validio.io/v10.1/docs/filters/filter-types.md#threshold-filter).

### ThresholdFilterOperator

```python
class validio_sdk.ThresholdFilterOperator(*values)
```

Bases: `str`, `Enum`

Configures the behavior of a String filter.

EQUAL: The value equals (==) NOT\_EQUAL: The value does not equal (!=) LESS\_THAN: The value is less than (\<) LESS\_THAN\_OR\_EQUAL: The value is less than or equal (\<=) GREATER\_THAN: The value is greater than (>) GREATER\_THAN\_OR\_EQUAL: The value is greater than or equal (>=)

#### EQUAL

```python
EQUAL = 'EQUAL'
```

#### GREATER\_THAN

```python
GREATER_THAN = 'GREATER'
```

#### GREATER\_THAN\_OR\_EQUAL

```python
GREATER_THAN_OR_EQUAL = 'GREATER_EQUAL'
```

#### LESS\_THAN

```python
LESS_THAN = 'LESS'
```

#### LESS\_THAN\_OR\_EQUAL

```python
LESS_THAN_OR_EQUAL = 'LESS_EQUAL'
```

#### NOT\_EQUAL

```python
NOT_EQUAL = 'NOT_EQUAL'
```

### UnauthorizedError

```python
exception validio_sdk.UnauthorizedError(access_key_env: str, secret_access_key_env: str)
```

**Parameters**

**access\_key\_env** `str` *required*

**secret\_access\_key\_env** `str` *required*

Bases: [`ValidioError`](https://docs.validio.io/v10.1/sdk-reference/validio_sdk#validioerror "validio_sdk.exception.ValidioError")

Exception thrown when unauthorized request is made.

### ValidioConnectionError

```python
exception validio_sdk.ValidioConnectionError(endpoint_env: str, e: Exception)
```

**Parameters**

**endpoint\_env** `str` *required*

**e** `Exception` *required*

Bases: [`ValidioError`](https://docs.validio.io/v10.1/sdk-reference/validio_sdk#validioerror "validio_sdk.exception.ValidioError")

Exception thrown when connection to Validio backend fails.

### ValidioError

```python
exception validio_sdk.ValidioError(*args: Any)
```

**Parameters**

\***args** `Any`

Bases: `Exception`

Base exception used for every exception thrown by Validio.

### load\_jtd\_schema()

```python
validio_sdk.load_jtd_schema(filepath: Path) → dict
```

**Parameters**

**filepath** `Path` *required*

**Returns:** `dict`

Reads a jtd schema from a file on disk.

* Parameters:

  **filepath** – Path to the file containing the schema contents.

### poll\_source()

```python
async validio_sdk.poll_source(*, source_id_or_name: str, client: APIClient, namespace: str | None = None, poll_interval_seconds: float = 5.0, timeout_seconds: float | None = None) → SourcePollResult
```

**Parameters**

**source\_id\_or\_name** `str` *required*

**client** `APIClient` *required*

**namespace** `str | None`

**poll\_interval\_seconds** `float`

**timeout\_seconds** `float | None`

**Returns:** `SourcePollResult`

Manually poll a source and check if it produced new incidents.

The source is polled with the sourceManualPoll API, we then wait for the poll to complete and finally check the incidents API for any incidents created since the poll started.

Resolving the source and starting the poll raise on failure. Once the poll is started, waiting for it never raises; any error from that phase is returned on the result instead, along with the info that can be passed to wait\_until\_poll\_completion to retry the waiting phase.

* Parameters:

  * **source\_id\_or\_name** – The id or the resource name of the source to poll. If a resource name is given it is resolved to its id.

  * **client** – The APIClient to use for the requests.

  * **namespace** – The namespace to look up the source in. Required when a resource name is given since resource names are only unique within a namespace. Ignored when an id is given.

  * **poll\_interval\_seconds** – How long to wait between progress checks. The progress API is rate limited so this should not be too low.

  * **timeout\_seconds** – Maximum time to wait for the poll to complete. If None we wait indefinitely.

* Returns:

  A SourcePollResult describing the outcome.

* Raises:

  [**ValidioError**](https://docs.validio.io/v10.1/sdk-reference/validio_sdk.md#validioerror-2 "validio_sdk.ValidioError") – If the source can’t be resolved or the poll can’t be started.

### wait\_until\_poll\_completion()

```python
async validio_sdk.wait_until_poll_completion(*, client: APIClient, info: SourcePollInfo, poll_interval_seconds: float = 5.0, timeout_seconds: float | None = None) → SourcePollResult
```

**Parameters**

**client** `APIClient` *required*

**info** `SourcePollInfo` *required*

**poll\_interval\_seconds** `float`

**timeout\_seconds** `float | None`

**Returns:** `SourcePollResult`

Wait for an already started poll to complete and check for incidents.

This is the second phase of poll\_source and can be used to resume waiting for a poll that was already started, e.g. to retry after a timeout.

Errors are returned as part of the result rather than raised.

* Parameters:

  * **client** – The APIClient to use for the requests.

  * **info** – Details about the started poll, as returned in a SourcePollResult.

  * **poll\_interval\_seconds** – How long to wait between progress checks. The progress API is rate limited so this should not be too low.

  * **timeout\_seconds** – Maximum time to wait for the poll to complete. If None we wait indefinitely.

* Returns:

  A SourcePollResult describing the outcome.
