Metadata-Version: 2.4
Name: fixcore-engine
Version: 0.5.0
Summary: Pure Python FIX protocol engine
Author-email: Aidan Chisholm <aidan.chisholm@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Aidan Alexander Chisholm
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://github.com/aidan-chisholm/fixcore
Project-URL: Repository, https://github.com/aidan-chisholm/fixcore
Keywords: fix,financial,protocol,trading,quickfix
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: Office/Business :: Financial
Classifier: Intended Audience :: Developers
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Requires-Dist: pytest-asyncio>=0.23; extra == "dev"
Requires-Dist: ruff>=0.4; extra == "dev"
Requires-Dist: mypy>=1.10; extra == "dev"
Provides-Extra: gui
Requires-Dist: aiohttp>=3.9; extra == "gui"
Dynamic: license-file

<img src="https://raw.githubusercontent.com/aidan-chisholm/fixcore/main/fixcore_logo.png" alt="FIXcore" width="340" />

Pure Python FIX protocol engine — mirrors the QuickFIX architecture (QuickFIX/n, QuickFIX/J).

## Features

- Full FIX 4.2 session layer (Logon, Logout, Heartbeat, TestRequest, ResendRequest, SequenceReset, Reject) with gap-fill, out-of-order buffering, and reset handling
- Message encode/decode (checksum, BodyLength, field-order validation) and repeating groups
- Opt-in per-session validation against a QuickFIX `DataDictionary` — required fields and out-of-range enum values, with spec-compliant `Reject`s
- Async transport: `SocketAcceptor` + `SocketInitiator` with auto-reconnect
- Durable `FileStore` (fsync + atomic sequence-number writes) and `MemoryStore`
- `MessageCracker` dispatch mixin
- Lightweight browser GUI via aiohttp (`tools/fix_gui.py`) — session management, message builder, live message log

## Quick start

```bash
pip install fixcore-engine
pip install "fixcore-engine[gui]"  # includes aiohttp for the GUI
```

## Validation (opt-in)

Validation is off by default (raw FIX passthrough). Enable it per session via
QuickFIX-compatible settings:

```ini
[SESSION]
UseDataDictionary=Y             ; load the spec: group-aware decode + (by default) validation
DataDictionary=specs/FIX42.xml
ValidateIncomingMessage=N       ; keep group-aware decode but DON'T reject non-conforming inbound (default Y)
ValidateFieldsOutOfRange=Y      ; also reject out-of-range enum values (e.g. Side=Z)
```

`UseDataDictionary=Y` loads the spec so repeating groups decode into proper
instances. By default it also validates inbound app messages (required fields,
known MsgType) and `Reject`s violations. Set `ValidateIncomingMessage=N` to keep
the group-aware decode while delivering non-conforming messages as-is — useful
for permissive/testing peers that need to inspect off-spec traffic rather than
reject it.

## Development

```bash
pip install -e ".[dev,gui]"
pytest
python tools/fix_gui.py
```
