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

# Parser

> iso8583sim.core.parser

`iso8583sim.core.parser`

## `EMVTag`

```python theme={null}
EMVTag(tag: str, length: int, value: str, raw: str)
```

EMV Tag data structure

## `ISO8583Parser`

```python theme={null}
ISO8583Parser(
    version: ISO8583Version = ISO8583Version.V1987,
    pool: MessagePool | None = None,
)
```

Parser for ISO 8583 messages with network support

Initialize the parser.

**Parameters**

<ResponseField name="version" type="ISO8583Version" default="ISO8583Version.V1987">
  ISO8583 version to use
</ResponseField>

<ResponseField name="pool" type="MessagePool | None" default="None">
  Optional MessagePool for object reuse in high-throughput scenarios
</ResponseField>

### `parse()`

```python theme={null}
def parse(message: str, network: CardNetwork | None = None) -> ISO8583Message
```

Parse an ISO 8583 message string into an ISO8583Message object

### `parse_bytes()`

```python theme={null}
def parse_bytes(
    data: bytes,
    wire_format: WireFormat | None = None,
    network: CardNetwork | None = None,
) -> ISO8583Message
```

Parse a message received as bytes in a wire format (binary bitmap, BCD, EBCDIC...).

Defaults to ASCII with a binary bitmap. See iso8583sim.wire.WireFormat for the presets.

### `parse_file()`

```python theme={null}
def parse_file(filename: str) -> list[ISO8583Message]
```

Parse multiple messages from file


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