Metadata-Version: 2.4
Name: unidocloader
Version: 1.0.0
Summary: A universal document loader supporting TXT, CSV, JSON, XML, PDF, DOCX, PPTX, and XLSX
Author: Your Name
Author-email: your.email@example.com
License: MIT
Project-URL: Source Repository, https://github.com/AHSharan/PYPI-Publishing-Template
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE.txt
Requires-Dist: PyPDF2
Requires-Dist: python-docx
Requires-Dist: python-pptx
Requires-Dist: openpyxl
Dynamic: author
Dynamic: author-email
Dynamic: description
Dynamic: description-content-type
Dynamic: license
Dynamic: license-file
Dynamic: project-url
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# unidocloader

A universal document loader library for Python. Load content from multiple file formats with a single, simple API.

## Installation

```bash
pip install unidocloader
```

## Supported Formats

| Format | Function | Module |
|--------|----------|--------|
| `.txt` | `load_txt()` | `text_loader` |
| `.csv` | `load_csv()` | `text_loader` |
| `.json` | `load_json()` | `text_loader` |
| `.xml` | `load_xml()` | `text_loader` |
| `.pdf` | `load_pdf()` | `doc_loader` |
| `.docx` | `load_docx()` | `doc_loader` |
| `.pptx` | `load_pptx()` | `doc_loader` |
| `.xlsx` | `load_xlsx()` | `doc_loader` |

## Modules

### text_loader
- `load_txt(filepath)` â€“ Returns file content as a string
- `load_csv(filepath)` â€“ Returns rows as a list of dictionaries
- `load_json(filepath)` â€“ Returns parsed JSON data
- `load_xml(filepath)` â€“ Returns a nested dictionary representation

### doc_loader
- `load_pdf(filepath)` â€“ Extracts all text from a PDF
- `load_docx(filepath)` â€“ Returns paragraph text as a list of strings
- `load_pptx(filepath)` â€“ Returns slide text as a list of lists
- `load_xlsx(filepath)` â€“ Returns rows as a list of dictionaries (first row = headers)

## Usage Examples

```python
from unidocloader import load_txt, load_csv, load_json, load_pdf, load_docx

# Load a text file
content = load_txt("notes.txt")
print(content)

# Load a CSV file
rows = load_csv("data.csv")
for row in rows:
    print(row)

# Load a JSON file
data = load_json("config.json")
print(data)

# Load a PDF file
text = load_pdf("report.pdf")
print(text)

# Load a Word document
paragraphs = load_docx("letter.docx")
for p in paragraphs:
    print(p)
```

## License

MIT
