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

# components.Attachment

> Attachment functionality for Components integration.

[View module source on GitHub](https://github.com/maximhq/maxim-py/blob/main/maxim/logger/components/attachment.py)

## [FileAttachment](/sdk/python/references/logger/components/attachment)

```python theme={null}
@dataclass
class FileAttachment()
```

#### to\_dict

```python theme={null}
def to_dict() -> dict[str, Any]
```

Convert the file attachment to a dictionary.

**Returns**:

A dictionary containing the file attachment.

## [FileDataAttachment](/sdk/python/references/logger/components/attachment)

```python theme={null}
@dataclass
class FileDataAttachment()
```

#### \_\_post\_init\_\_

```python theme={null}
def __post_init__() -> None
```

Initialize the file data attachment.

#### to\_dict

```python theme={null}
def to_dict() -> dict[str, Any]
```

Convert the file data attachment to a dictionary.

**Returns**:

A dictionary containing the file data attachment.

## [UrlAttachment](/sdk/python/references/logger/components/attachment)

```python theme={null}
@dataclass
class UrlAttachment()
```

#### \_\_post\_init\_\_

```python theme={null}
def __post_init__() -> None
```

Initialize the url attachment.

#### to\_dict

```python theme={null}
def to_dict() -> dict[str, Any]
```

Convert the url attachment to a dictionary.

**Returns**:

A dictionary containing the url attachment.
