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

# From File • AI Agent SDK

> from_file: Load patterns from file.

# from\_file

Method

> This is a method of the [**IgnoreMatcher**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/IgnoreMatcher.md) class in the [**indexing**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/indexing.md) module.

Load patterns from file.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def from_file(filepath: str) -> 'IgnoreMatcher'
```

## Parameters

**filepath** `str` *required*

Path to .praisonignore file

### Returns

**Returns** `'IgnoreMatcher'`

IgnoreMatcher with loaded patterns

## Uses

* `splitlines`
* `f.read`
* `cls`

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/knowledge/indexing.py#L267)
>
> `praisonaiagents/knowledge/indexing.py` at line 267


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.