No project description provided
Project description
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.txtfiles. - 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.
-
Create a virtual environment:
uv venv .venv source .venv/bin/activate
-
Install
maturin:uv pip install maturin
-
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:
- Install Rust: Follow the official instructions at rust-lang.org.
- Clone the repository:
git clone https://github.com/YOUR_USERNAME/blitz_parse.git cd blitz_parse
- 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file blitz_parse-0.1.0-cp38-abi3-manylinux_2_34_x86_64.whl.
File metadata
- Download URL: blitz_parse-0.1.0-cp38-abi3-manylinux_2_34_x86_64.whl
- Upload date:
- Size: 1.7 MB
- Tags: CPython 3.8+, manylinux: glibc 2.34+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: maturin/1.9.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
518321087e42b7235b4a70d17473ec17655d231b02656e78122da8b67e720f20
|
|
| MD5 |
d43d9a88fa5391a964750c599ed13bae
|
|
| BLAKE2b-256 |
5b6c923e3a806bd8f90632094324efc415f9c28510815b816a9bb14b7e41cc78
|