Metadata-Version: 2.4
Name: finlint
Version: 1.0.0
Summary: Financial math test vector validation
Author: Kanso Finance
License: Apache-2.0
Project-URL: Homepage, https://github.com/kanso-finance/finlint
Project-URL: Repository, https://github.com/kanso-finance/finlint
Project-URL: Issues, https://github.com/kanso-finance/finlint/issues
Requires-Python: >=3.11
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: jsonschema>=4.20
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

# finlint

Financial math test vectors for Python. Validate that your Decimal arithmetic produces correct, verified results.

## Install

```bash
pip install finlint
```

## Usage

```python
from decimal import Decimal
from finlint.vectors import run_suite

def allocate(amount, parts, method):
    base = amount.quantize(Decimal('0.01'))
    # ... your allocation logic
    return {"splits": splits, "sum": total}

# Run all allocation vectors
run_suite("allocation", allocate)
```

## API

- `load_suite(name)` — Load vectors for a named suite
- `run_vector(vector, impl)` — Run one vector against an implementation
- `run_suite(name, impl)` — Run all vectors in a suite
- `parse_decimal_values(obj)` — Recursively parse string values to Decimal

## Available Suites

allocation, rounding, aggregation, percentage, gain-loss, ratio, weighted-average, serialization

## License

Apache-2.0 — [github.com/kanso-finance/finlint](https://github.com/kanso-finance/finlint)
