A Python SDK for processing and analyzing spreadsheets using LLMs.
pip install CSVAlchemy-sdkCSVAlchemy provides Excel processing capabilities. The library helps you efficiently process, analyze, and extract insights from spreadsheet data.
- Spreadsheet Processing - Handle Excel and CSV files with advanced features
- Data Extraction - Extract structured data from complex spreadsheets
- Formula Extraction - Extract all the formula's from you spreadsheets
- Pivot Table Support - Process and analyze pivot tables
- Chart Analysis - Extract and encode chart data
- Conditional Formatting - Capture conditional formatting rules
- API Client - Easy-to-use client for the CSVAlchemy API
| Feature | Support |
|---|---|
| Excel (.xlsx) Processing | ✓ |
| Formula Extraction | ✓ |
| Merged Cell Detection | ✓ |
| Header Detection | ✓ (configurable) |
| Structural Anchor Extraction | ✓ |
| Python SDK | ✓ |
| Customizable Configuration | ✓ |
| Error Handling Modes | ✓ (configurable) |
| Parallel Processing | ✓ (configurable) |
| Memory Optimization | ✓ (chunking configurable) |
| Comprehensive Logging | ✓ |
| Open Source | ✓ (MIT License) |
from CSVAlchemy.core import encode_workbook
from CSVAlchemy.utils import load_workbook_from_file
from CSVAlchemy.config import get_config
config = get_config()
print("Default config:", config)
try:
# Replace with path to your test Excel file
workbook = load_workbook_from_file("Company_Financial_Data_For_PE.xlsx")
encoded_data = encode_workbook(workbook, config)
print(f"Processed {len(encoded_data['sheets'])} sheets")
except Exception as e:
print(f"Error processing workbook: {e}")We welcome contributions from the community! This guide will help you set up your local development environment and understand our contribution process.
-
Fork and Clone the Repository
git clone https://github.com/Unsiloed-ai/csvalchemy-sdk.git cd csvalchemy-sdk -
Set Up a Virtual Environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install Development Dependencies
pip install -e ".[dev]"
-
Create a Feature Branch
git checkout -b feature/your-feature-name
-
Make Your Changes
- Write code following our style guidelines
- Add tests for new functionality
- Update documentation as needed
-
Run Tests and Linting
# Run tests pytest # Run linting flake8 # Run formatter black .
-
Commit Your Changes
git add . git commit -m "Add a descriptive commit message"
-
Push to Your Fork
git push origin feature/your-feature-name
-
Create a Pull Request
Go to the original repository and create a pull request from your fork.
- Follow PEP 8 standards
- Use Black for code formatting
- Write docstrings for all functions, classes, and methods
- Include type hints according to PEP 484
- Ensure all tests pass and code is properly formatted
- Update documentation if necessary
- Link any related issues in your PR description
- Wait for review from maintainers
- Address any requested changes
- Once approved, your PR will be merged
To run the API server locally during development:
python run.pyThe API will be available at http://localhost:8000 with interactive documentation at http://localhost:8000/docs.
To build the package locally:
python -m buildIf you have questions or need help, please:
- Open an issue on GitHub
- Contact the maintainers at [email protected]
Thank you for contributing to CSVAlchemy!
This project is licensed under the MIT License - see the LICENSE file for details.
Developed by Unsiloed AI