Metadata-Version: 2.4
Name: cellmate
Version: 0.2.0
Summary: Excel formatting assistant.
Home-page: https://github.com/GusFurtado/cellmate
Author: Gustavo Furtado
Author-email: gustavofurtado2@gmail.com
License: MIT
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.8
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: openpyxl<4.0,>=3.0
Dynamic: author
Dynamic: author-email
Dynamic: classifier
Dynamic: description
Dynamic: description-content-type
Dynamic: home-page
Dynamic: license
Dynamic: license-file
Dynamic: requires-dist
Dynamic: requires-python
Dynamic: summary

# Cellmate

`cellmate` is a Python package for creating and managing styled Excel spreadsheets using OpenPyXL. It provides high-level abstractions such as `Style`, `Column`, `Sheet`, and `Workbook` to simplify Excel operations while allowing for extensive customization and formatting.

## Features
- **Reusable Styles**: Define and apply consistent styles across cells, columns, and sheets.
- **Column Management**: Create structured and styled columns with titles and content.
- **Sheet Creation**: Build sheets with multiple columns, complete with styles and formatting.
- **Workbook Handling**: Manage multiple sheets within a single workbook and save them to Excel files.
- **Built-in Styles**: Use predefined styles for common formats such as currency, percentage, and dates.

---

## Getting Started

### Installation
Ensure you have Python 3.8 or later installed on your system. After that, you can install `cellmate` via pip:

```bash
pip install cellmate
```

### Example Usage
Here's an example of how to create a styled Excel workbook using `Cellmate`:

```python
import cellmate as xl
from cellmate import styles

# Define columns with data and styles
columns = [
    xl.Column(
        title="Product",
        content=["Apples", "Bananas", "Cherries"],
        title_style=styles.TITLE1,
        content_style=styles.DEFAULT
    ),
    xl.Column(
        title="Sales",
        content=["100", "200", "150"],
        title_style=xl.TITLE1,
        content_style=xl.Style(name="currency", number_format="$ #,##0.00")
    ),
    xl.Column(
        title="Growth",
        content=["0.05", "0.10", "0.07"],
        title_style=styles.TITLE1,
        content_style=styles.PERCENTAGE
    )
]

# Create a sheet and a workbook
sheet = xl.Sheet(data=columns, sheet_name="Summary")
workbook = xl.Workbook(sheets=[sheet])

# Save the workbook
workbook.save("example.xlsx")
```

---

## Contributing
Contributions are welcome! Feel free to open an issue or submit a pull request on GitHub.

## License
This project is licensed under the MIT License.
