Metadata-Version: 2.4
Name: fast-ods
Version: 0.3.1
Summary: Fast, streaming parser for OpenDocument Spreadsheet (.ods) files
Author: Daniel Teixeira Duarte
License: MIT
Project-URL: Homepage, https://github.com/atomiclake/fast-ods
Project-URL: Repository, https://github.com/atomiclake/fast-ods
Keywords: ods,opendocument,spreadsheet,parser,streaming,etl,zip
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Topic :: File Formats
Classifier: Topic :: Office/Business
Classifier: Topic :: Office/Business :: Financial :: Spreadsheet
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Scientific/Engineering :: Information Analysis
Classifier: Topic :: Text Processing :: Markup :: XML
Classifier: Topic :: Utilities
Classifier: Typing :: Typed
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Dynamic: license-file

# fast-ods

A fast, streaming parser for OpenDocument Spreadsheet (`.ods`) files.

Designed for efficiency, performance and low memory usage, making it an ideal choice for large files and ETL workflows.

> Requires Python version 3.10 and above.

> This project is still in alpha (pre-1.0). API and behavior might change drastically until the full release.

## Features

- ⚡ Streaming parsing (suitable for handling large files with constant memory usage)
- 📈 Supports repeated rows and columns (.ods specific)
- 🧩 Simple, minimal API
- 🌐 Zero external dependencies
- 🔧 Flexible configuration settings

## Changelog

v0.3.0 release:
- New parsing algorithm, with an approximate 3x increase in performance on tests*
- Fixed the skip/take N rows logic, aligning it to user expectations and to better reflect how rows are displayed in spreadsheet software

**Tested with an .ods file with 170k lines, the time to parse and write to a .csv file improved from 3 minutes to 47 seconds*

## Scope

This library focuses on **fast data extraction**, not full ODS spec compliance. It itentionally does not handle features such as:

- Styling
- Formulas
- Metadata

## Installation

Install with the Python default package manager:

```bash
pip install fast-ods
```

## Usage

```python
from fast_ods import ODSParser

parser = ODSParser()

for row in parser.parse("file.ods"):
    print(row)
```

## Options

```python
from fast_ods import ODSParser, ODSParserOptions

options = ODSParserOptions(
    table=0,                # Choose a table by index or name
    convert_values=False,   # Convert the cell values (float, date, etc.)
    skip_n_rows=None,       # Skip first N rows
    take_n_rows=None,       # Limit number of rows
    verify_zip=True         # Emits a warning if the .zip archive is corrupted 
)

parser = ODSParser(options)
```
