Skip to main content

Python client for the SnapXam Math OCR API

Project description

SnapXam Math OCR API — Python Client

A lightweight Python client for the SnapXam Math OCR API — 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.

Setup

Installation

pip install snapxam-math-ocr

Recognize math images

Basic usage

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'}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

snapxam_math_ocr-0.2.1.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

snapxam_math_ocr-0.2.1-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file snapxam_math_ocr-0.2.1.tar.gz.

File metadata

  • Download URL: snapxam_math_ocr-0.2.1.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.7.7

File hashes

Hashes for snapxam_math_ocr-0.2.1.tar.gz
Algorithm Hash digest
SHA256 67d3265946703949943e8768e26cd93d1f32781215365bdbfc321a4e27aad204
MD5 5f604e504e2fa07db56912c7ae4d9f4a
BLAKE2b-256 71af45f363d70c9a5f7c751a4da7a381c0373bbc8457dc02953f11b8e2226af4

See more details on using hashes here.

File details

Details for the file snapxam_math_ocr-0.2.1-py3-none-any.whl.

File metadata

File hashes

Hashes for snapxam_math_ocr-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1eee6ded0f942d6720d722e8c15a437e9738febe461ac3cc7d1b2532dddf8e9a
MD5 a29f73c9622e2e63fb3c6478cc2243de
BLAKE2b-256 b8a1298205ab9469c245b4fc270b21937983500d2d28275645c1c9b28b6dc918

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page