Skip to main content

A lightweight Python client SDK for the CSValchemy API

Project description

CSVAlchemy

A Python SDK for processing and analyzing spreadsheets using LLMs.

Installation

pip install CSVAlchemy-sdk

Overview

CSVAlchemy provides Excel processing capabilities. The library helps you efficiently process, analyze, and extract insights from spreadsheet data.

Features

  • 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

CSVAlchemy Feature Comparison

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)

Usage

from CSValchemy_sdk.core import encode_workbook
from CSValchemy_sdk.utils import load_workbook_from_file
from CSValchemy_sdk.config import get_config

# Process spreadsheets
workbook = load_workbook_from_file("Company_Financial_Data_For_PE.xlsx")
config = get_config()
encoded_data = encode_workbook(workbook, config)

# Now use the encoded data in your application
print("encoded_sheets ",encoded_data)
print(f"Processed {len(encoded_data['sheets'])} sheets")

API Documentation

Full API documentation is available at:

  • Interactive API docs: /docs
  • ReDoc API docs: /redoc

Contributing to CSVAlchemy

We welcome contributions from the community! This guide will help you set up your local development environment and understand our contribution process.

Local Development Setup

  1. Fork and Clone the Repository

    git clone https://github.com/Unsiloed-ai/spreadsheet-llm.git
    cd spreadsheet-llm
    
  2. Set Up a Virtual Environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install Development Dependencies

    pip install -e ".[dev]"
    
  4. Run Tests to Verify Setup

    pytest
    

Development Workflow

  1. Create a Feature Branch

    git checkout -b feature/your-feature-name
    
  2. Make Your Changes

    • Write code following our style guidelines
    • Add tests for new functionality
    • Update documentation as needed
  3. Run Tests and Linting

    # Run tests
    pytest
    
    # Run linting
    flake8
    
    # Run formatter
    black .
    
  4. Commit Your Changes

    git add .
    git commit -m "Add a descriptive commit message"
    
  5. Push to Your Fork

    git push origin feature/your-feature-name
    
  6. Create a Pull Request

    Go to the original repository and create a pull request from your fork.

Code Style Guidelines

  • Follow PEP 8 standards
  • Use Black for code formatting
  • Write docstrings for all functions, classes, and methods
  • Include type hints according to PEP 484

Pull Request Process

  1. Ensure all tests pass and code is properly formatted
  2. Update documentation if necessary
  3. Link any related issues in your PR description
  4. Wait for review from maintainers
  5. Address any requested changes
  6. Once approved, your PR will be merged

Running the API Locally

To run the API server locally during development:

python run.py

The API will be available at http://localhost:8000 with interactive documentation at http://localhost:8000/docs.

Building the Package Locally

To build the package locally:

python -m build

Contact

If you have questions or need help, please:

Thank you for contributing to CSVAlchemy!

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Developed by Unsiloed AI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

csvalchemy_sdk-0.1.2.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

csvalchemy_sdk-0.1.2-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file csvalchemy_sdk-0.1.2.tar.gz.

File metadata

  • Download URL: csvalchemy_sdk-0.1.2.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for csvalchemy_sdk-0.1.2.tar.gz
Algorithm Hash digest
SHA256 fd3eb0537c392367a9ad4b40b7557dd035732b6a09f04898f0c18ea887747180
MD5 afb244081725368a7ad801662bba4cc1
BLAKE2b-256 ed16fc01aebdbe2ae19084bcb3f4f15628da6b17a2f8cf7047fb62e5391f1821

See more details on using hashes here.

File details

Details for the file csvalchemy_sdk-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: csvalchemy_sdk-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 15.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for csvalchemy_sdk-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f96f6ce3664673878c3c4b3aed6f66f683d4b4a03ad0ea0668a932e3db6b4aa0
MD5 1abde640e11d69fd8cd83f98fc2e62b7
BLAKE2b-256 fa373618b1388f1191c4881596283e002f1a9809312441169b1c4a93519a5c19

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page