# ObsidianLoader

> **Class** in `langchain_community`

📖 [View in docs](https://reference.langchain.com/python/langchain-community/document_loaders/obsidian/ObsidianLoader)

Load `Obsidian` files from directory.

## Signature

```python
ObsidianLoader(
    self,
    path: Union[str, Path],
    encoding: str = 'UTF-8',
    collect_metadata: bool = True,
)
```

## Parameters

| Name | Type | Required | Description |
|------|------|----------|-------------|
| `path` | `Union[str, Path]` | Yes | Path to the directory containing the Obsidian files. |
| `encoding` | `str` | No | Charset encoding, defaults to "UTF-8" (default: `'UTF-8'`) |
| `collect_metadata` | `bool` | No | Whether to collect metadata from the front matter. Defaults to True. (default: `True`) |

## Extends

- `BaseLoader`

## Constructors

```python
__init__(
    self,
    path: Union[str, Path],
    encoding: str = 'UTF-8',
    collect_metadata: bool = True,
)
```

| Name | Type |
|------|------|
| `path` | `Union[str, Path]` |
| `encoding` | `str` |
| `collect_metadata` | `bool` |


## Properties

- `FRONT_MATTER_REGEX`
- `TEMPLATE_VARIABLE_REGEX`
- `TAG_REGEX`
- `DATAVIEW_LINE_REGEX`
- `DATAVIEW_INLINE_BRACKET_REGEX`
- `DATAVIEW_INLINE_PAREN_REGEX`
- `file_path`
- `encoding`
- `collect_metadata`

## Methods

- [`lazy_load()`](https://reference.langchain.com/python/langchain-community/document_loaders/obsidian/ObsidianLoader/lazy_load)

---

[View source on GitHub](https://github.com/langchain-ai/langchain-community/blob/a6a6079511ac8a5c1293337f88096b8641562e77/libs/community/langchain_community/document_loaders/obsidian.py#L15)