Skip to main content

Open-source framework that extracts structured data from unstructured data.

Project description

OpenXtract

Turn documents into structured data

Open-source toolkit for extracting clean, structured data from text.

Installation

pip install open-xtract
# or
uv add open-xtract

Usage

The model string should look like: <provider>:<model_string>

Ex. "openai:gpt-5-nano", "xai:grok-4"

from pydantic import BaseModel
from open_xtract import OpenXtract

class InvoiceData(BaseModel):
    invoice_number: str
    date: str
    total_amount: float
    vendor: str

ox = OpenXtract(model="openai:gpt-5-nano")  # or any model

# Extract from text
result = ox.extract("Total: $123.45 on 2025-03-01 from ACME", InvoiceData)
print(result)

Advanced Features

Model Configuration

# Use any OpenAI-compatible model
ox = OpenXtract(model="openrouter:qwen/qwen3-max")
ox = OpenXtract(model="xai:grok-4")

Features

  • Extract structured data from text
  • Model-agnostic (works with any OpenAI-compatible API)
  • Simple, clean API

Contributing

See CONTRIBUTING.md for contribution guidelines.

License

MIT - see LICENSE.


Built with ❤️ by Mellow AI

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

open_xtract-0.1.1.tar.gz (113.2 kB view details)

Uploaded Source

Built Distribution

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

open_xtract-0.1.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file open_xtract-0.1.1.tar.gz.

File metadata

  • Download URL: open_xtract-0.1.1.tar.gz
  • Upload date:
  • Size: 113.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.7.6

File hashes

Hashes for open_xtract-0.1.1.tar.gz
Algorithm Hash digest
SHA256 58f79fe9c757c20eb91aecf332d8598fe3507856f327d4e495f5a1728fdb99d0
MD5 a8a629bcecc92e92e77ce2cae3b32daf
BLAKE2b-256 c2cd92753b5d596e4a52fac6d1f0cfc4993d539e72e1fea0a80671a846e4cf6a

See more details on using hashes here.

File details

Details for the file open_xtract-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for open_xtract-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1456edc215652175ef9fc53e23c16c71da9c4053734282ebbbea1cd9d93b3714
MD5 8c31a886c7c25be589532809696e1f36
BLAKE2b-256 ca4c226828cc82edf6cec755499617657c054dd37a553b86b0eed67437af4328

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