---
sidebar:
  hidden: true
title: roboto.experimental.ingestion_rules.matching
---
## Module Contents

### IngestionPathRule

```python
class roboto.experimental.ingestion_rules.matching.IngestionPathRule
```

`from roboto.experimental.ingestion_rules import IngestionPathRule`

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/experimental/ingestion_rules/matching.py#L21-L54)

The path half of an ingestion rule: include and exclude Git wildmatch patterns.

File annotation and the rule's trigger both decide through [`matches()`](/reference/python-sdk/roboto/experimental/ingestion_rules/matching#roboto.experimental.ingestion_rules.matching.IngestionPathRule.matches), so a file is marked ingestable exactly when the rule's trigger would accept its upload.

**Attributes**

- **IngestionPathRule.exclude_patterns** (`tuple[str, ...]`) = `()`
- **IngestionPathRule.include_patterns** (`tuple[str, ...]`)

#### IngestionPathRule.matches()

```python
def matches(relative_path: str) -> bool
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/experimental/ingestion_rules/matching.py#L37-L44)

Whether `relative_path` matches an include pattern and no exclude pattern, and is not a dotfile.

No rule makes a dotfile ingestable, because triggers never run on dotfiles.

**Parameters**

- **relative_path** (`str`)

**Returns**

- `bool`

#### IngestionPathRule.of()

```python
@classmethod
def of(
    include_patterns: collections.abc.Iterable[str],
    exclude_patterns: collections.abc.Iterable[str] = (),
) -> IngestionPathRule
```

[Source](https://github.com/roboto-ai/roboto-python-sdk/blob/main/src/roboto/experimental/ingestion_rules/matching.py#L32-L35)

**Parameters**

- **include_patterns** (`collections.abc.Iterable[str]`)
- **exclude_patterns** (`collections.abc.Iterable[str]`)

**Returns**

- `IngestionPathRule`
