Metadata-Version: 2.4
Name: polayo
Version: 1.0.0
Summary: A lightweight library for reading and writing structured data.
Author: Rozen-x
License: MIT
Project-URL: Homepage, https://github.com/Rozen-x/polayo
Project-URL: Repository, https://github.com/Rozen-x/polayo
Project-URL: Issues, https://github.com/Rozen-x/polayo/issues
Keywords: csv,excel,json,io,data
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Operating System :: OS Independent
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Utilities
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openpyxl>=3.1
Dynamic: license-file

# Polayo

A lightweight Python library for reading and writing structured data.

Polayo converts structured files into `list[dict]` objects and writes them back with a simple and consistent API.

Supported formats:

- CSV
- Excel (.xlsx)
- JSON

---

## Features

- Lightweight
- Simple API
- Consistent return type
- Supports local files, URLs and file objects
- No data analysis
- No data transformation
- No hidden magic

---

## Philosophy

Polayo has one responsibility:

> Convert structured data to Python records and back again.

Polayo will never include:

- Data analysis
- Data processing
- Data cleaning
- Sorting
- Aggregation
- Visualization

Those tasks belong to other libraries.

---

## Installation

```bash
pip install polayo
```

---

## Quick Example

```python
from polayo import read_csv

records = read_csv("people.csv")

print(records)
```

Output:

```python
[
    {
        "name": "Ali",
        "age": "20",
        "city": "Tehran"
    },
    ...
]
```

---

## Reading

```python
from polayo import read_csv
from polayo import read_excel
from polayo import read_json
```

### CSV

```python
records = read_csv("people.csv")
```

### Excel

```python
records = read_excel("people.xlsx")
```

### JSON

```python
records = read_json("people.json")
```

---

## Writing

```python
from polayo import write_csv
from polayo import write_excel
from polayo import write_json
```

### CSV

```python
write_csv(records, "output.csv")
```

### Excel

```python
write_excel(records, "output.xlsx")
```

### JSON

```python
write_json(records, "output.json")
```

---

## Supported JSON Orientations

- records
- split
- index
- columns
- table

---

## License

MIT
