Metadata-Version: 2.1
Name: snapxam_math_ocr
Version: 0.2.1
Summary: Python client for the SnapXam Math OCR API
Author-email: SnapXam <hello@snapxam.com>
License: MIT
Project-URL: Homepage, https://www.snapxam.com/apis/math-apis
Project-URL: Documentation, https://www.snapxam.com/apis/math-apis/docs
Keywords: ocr,math,api,latex,ai,snapxam
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE

# SnapXam Math OCR API — Python Client

A lightweight Python client for the [SnapXam Math OCR API](https://www.snapxam.com/apis/math-apis) — convert handwritten or printed math equations into text or LaTeX effortlessly.

---

## Features

- Converts images of math expressions into LaTeX or infix notation  
- Simple interface using `PIL.Image` or file paths  
- Minimal dependencies (`requests`, `Pillow`)
- Requires an API key for authentication. An api key can be obtained [here](https://www.snapxam.com/apis/math-apis/docs).

---
Setup
---

### Installation

```bash
pip install snapxam-math-ocr
```

---
Recognize math images
---

### Basic usage

```bash
from snapxam_math_ocr import SnapXamMathOCR

ocr = SnapXamMathOCR(api_key="your-api-key")
img = Image.open("image_with_some_math.png")
result = ocr.recognize(img)
print(result)  # sample response: {'latex': '\\frac{a}{b}', 'infix': 'a/b'}

```
