Metadata-Version: 2.1
Name: sql_upsert
Version: 0.1.0
Summary: A package for handling SQL upsert operations with pandas DataFrames
Home-page: https://github.com/yourusername/sql_upsert
Author: Your Name
Author-email: your.email@example.com
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
Requires-Dist: sqlalchemy>=1.4.0
Requires-Dist: pandas>=1.0.0

# SQL Upsert

A Python package for handling SQL upsert operations with pandas DataFrames.

## Installation

```bash
pip install sql_upsert
```

## Usage

```python
from sql_upsert import to_sql_upsert
import pandas as pd
from sqlalchemy import create_engine

# Create engine
engine = create_engine('sqlite:///example.db')

# Create sample DataFrame
df = pd.DataFrame({'id': [1, 2], 'value': ['a', 'b']})

# Write with upsert functionality
to_sql_upsert(df, 'my_table', engine, unique_columns=['id'])
```

## Features

- Automatic handling of upsert operations
- Support for custom unique constraints
- Compatible with any SQLAlchemy supported database
- Preserves column types when creating tables

## Requirements

- Python >= 3.6
- SQLAlchemy >= 1.4.0
- pandas >= 1.0.0 
