Metadata-Version: 2.4
Name: fionn
Version: 0.1.0
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: License :: OSI Approved :: Apache Software License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Programming Language :: Rust
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: Text Processing :: General
Classifier: Typing :: Typed
Requires-Dist: fionn[numpy,dev] ; extra == 'all'
Requires-Dist: pytest>=8.0 ; extra == 'dev'
Requires-Dist: pytest-benchmark>=4.0 ; extra == 'dev'
Requires-Dist: hypothesis>=6.100 ; extra == 'dev'
Requires-Dist: orjson>=3.10 ; extra == 'dev'
Requires-Dist: mypy>=1.10 ; extra == 'dev'
Requires-Dist: ruff>=0.6 ; extra == 'dev'
Requires-Dist: numpy>=1.20 ; extra == 'numpy'
Provides-Extra: all
Provides-Extra: dev
Provides-Extra: numpy
Summary: Fast JSON library with SIMD acceleration - drop-in orjson replacement + extended features
Keywords: json,simd,orjson,jsonl,isonl,crdt,gron,diff
Author-email: Darach Ennis <darach@gmail.com>
License: MIT OR Apache-2.0
Requires-Python: >=3.9
Description-Content-Type: text/markdown; charset=UTF-8; variant=GFM
Project-URL: Documentation, https://github.com/darach/fionn#readme
Project-URL: Homepage, https://github.com/darach/fionn
Project-URL: Issues, https://github.com/darach/fionn/issues
Project-URL: Repository, https://github.com/darach/fionn

# fionn-py

Python bindings for fionn - Fast JSON library with SIMD acceleration.

## Features

- **Drop-in orjson replacement**: `import fionn` works like `import orjson`
- **ISONL streaming**: 11.9x faster than fastest JSON parser (sonic-rs)
- **JSONL streaming**: Schema-filtered parsing with batch processing
- **Multi-format**: YAML, TOML, CSV, ISON, TOON parsing
- **Extended ops**: Gron, Diff/Patch, CRDT, Tape API

## Installation

```bash
# Using uv (recommended)
uv pip install fionn

# Using pip
pip install fionn
```

## Quick Start

### orjson-compatible API

```python
import fionn

# Parse JSON
data = fionn.loads(b'{"name": "Alice", "age": 30}')

# Serialize JSON
output = fionn.dumps(data, option=fionn.OPT_INDENT_2)
```

### ISONL Streaming (11.9x faster)

```python
import fionn.ext as fx

# Read ISONL (schema-embedded, zero inference overhead)
for batch in fx.IsonlReader("data.isonl"):
    for record in batch:
        process(record)

# Convert JSONL to ISONL for 11.9x speedup on repeated reads
fx.jsonl_to_isonl("input.jsonl", "output.isonl", table="events", infer_schema=True)
```

## Performance

| Operation | Baseline | fionn | Speedup |
|-----------|----------|-------|---------|
| JSON loads | orjson | match | 1x |
| JSONL streaming | sonic-rs | match | 1x |
| **ISONL streaming** | sonic-rs | **11.9x faster** | **11.9x** |

## Development

```bash
# Install dev dependencies
uv sync --dev

# Build
maturin develop

# Test
pytest

# Lint
ruff check .

# Type check
mypy .
```

## License

MIT OR Apache-2.0

