Skip to main content

BlitzParse 🚀

High-performance, Rust-powered document parsing for Python.

BlitzParse is a native Python module engineered in Rust to provide an order-of-magnitude performance increase for text extraction from common document formats. By leveraging Rust's performance, memory safety, and powerful ecosystem, BlitzParse offers a seamless and high-speed alternative to pure Python libraries, making it ideal for data processing pipelines, backend services, and any application that handles documents at scale.

Performance

The primary goal of BlitzParse is to be exceptionally fast. In benchmark tests against the popular python-docx library, BlitzParse demonstrates a significant performance advantage.

Library Average Time (ms) Performance
BlitzParse (Rust) ~0.5 ms 55.9x Faster
python-docx ~29.2 ms Baseline

Benchmarks were conducted on a complex .docx file containing paragraphs, tables, headers, and footers.

Features

  • Blazing Fast: Built in Rust for maximum performance and efficiency.
  • Native Python Module: Installs easily and can be imported just like any other Python package.
  • Multi-Format Support: Robust text extraction for .docx, .pdf, and .txt files.
  • Rich Content Parsing: Extracts text from paragraphs, tables, and other structural elements.
  • Production Ready: Thoroughly tested with both unit and integration tests, and validated with a CI pipeline.

Installation

BlitzParse is built as a native Python module using maturin.

  1. Create a virtual environment:

    uv venv .venv
    source .venv/bin/activate
    
  2. Install maturin:

    uv pip install maturin
    
  3. Build and install blitz_parse: From the root of the project directory, run:

    maturin develop --release
    

    This command compiles the Rust code in release mode (fully optimized) and installs it into your active virtual environment.

Usage

Using BlitzParse in your Python code is straightforward.

import blitz_parse

# Path to your document
file_path = "path/to/your/document.docx"

try:
    # Call the high-performance Rust function
    extracted_text = blitz_parse.extract_text_py(file_path)
    print("--- Extraction Successful ---")
    print(extracted_text[:500] + "...")

except ValueError as e:
    print(f"An error occurred: {e}")

Development and Testing

Contributions are welcome. To set up a development environment:

  1. Install Rust: Follow the official instructions at rust-lang.org.
  2. Clone the repository:
    git clone https://github.com/YOUR_USERNAME/blitz_parse.git
    cd blitz_parse
    
  3. Run the test suite:
    cargo test
    
    The project includes a comprehensive suite of unit tests for internal logic and integration tests for the public API.

Roadmap

BlitzParse is the foundational layer of a larger vision for high-performance document intelligence. Future development will focus on:

  • Embedding Service: An integrated, high-speed service for creating vector embeddings from document text, preparing data for LLMs.
  • Graph-Based RAG: A system where documents are nodes in a knowledge graph, allowing an LLM agent to traverse relationships and synthesize answers from multiple sources.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Metadata

Release files for blitz-parse 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Built distribution (wheel)

Table of built distributions (wheels) for blitz-parse 0.1.0
File Interpreter ABI Platform Actions
blitz_parse-0.1.0-cp38-abi3-manylinux_2_34_x86_64.whl CPython 3.8 abi3 Linux glibc 2.34+ x86-64 Details for blitz_parse-0.1.0-cp38-abi3-manylinux_2_34_x86_64.whl

Release files / blitz_parse-0.1.0-cp38-abi3-manylinux_2_34_x86_64.whl

Download URL blitz_parse-0.1.0-cp38-abi3-manylinux_2_34_x86_64.whl
Size 1.7 MB
Tags CPython 3.8 Linux glibc 2.34+ x86-64 abi3
SHA-256 checksum
How to use checksums
518321087e42b7235b4a70d17473ec17655d231b02656e78122da8b67e720f20
BLAKE2b-256 checksum
How to use checksums
5b6c923e3a806bd8f90632094324efc415f9c28510815b816a9bb14b7e41cc78
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.9.4

Security for blitz-parse 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page