A powerful CSV processor for Sendy.co with Brazilian format support
Project description
CSV2Sendy
A powerful tool for processing CSV files for Sendy.co email imports with special support for Brazilian data formats.
🌟 Features
-
🔄 Intelligent CSV Processing
- Auto-detection of delimiters and encodings
- Smart column mapping and normalization
- Robust error handling and reporting
-
📧 Email Processing
- RFC-compliant email validation
- Duplicate removal
- Case normalization
- Domain validation (optional)
-
📱 Phone Number Handling
- Brazilian format support (+55 format)
- WhatsApp number validation
- International format conversion
- Auto-correction of common format issues
-
👤 Name Processing
- Proper capitalization rules
- First/last name splitting
- Special character handling
- Brazilian name format support
-
🌐 Web Interface
- Modern, responsive design
- Drag-and-drop file upload
- Real-time validation
- Progress tracking
- Column mapping UI
-
🔒 Security
- Secure file handling
- Automatic file cleanup
- Input sanitization
- Rate limiting
📦 Installation
Using pip (Recommended)
pip install csv2sendy
From source
git clone https://github.com/skaisser/csv2sendy.git
cd csv2sendy
pip install -e ".[dev]"
🚀 Quick Start
Command Line Interface
# Start the web interface
csv2sendy --port 8080
# Process a file directly
csv2sendy process input.csv -o output.csv
# Show help
csv2sendy --help
Python API
from csv2sendy.core import CSVProcessor
# Basic usage
processor = CSVProcessor()
df = processor.process_file('input.csv')
df.to_csv('output.csv', index=False)
# Advanced usage with options
processor = CSVProcessor(
encodings=['utf-8-sig', 'latin1'],
validate_domains=True,
remove_duplicates=True
)
# Process from string content
content = '''Name,Email,Phone
John Doe,john@example.com,5511999999999'''
df = processor.process_file(content)
# Process from DataFrame
import pandas as pd
df = pd.read_csv('input.csv')
processed_df = processor.process_dataframe(df)
Web Interface
-
Start the server:
csv2sendy
-
Open http://localhost:8080 in your browser
-
Upload your CSV file
-
Configure column mapping (or let auto-detection work)
-
Download the processed file
📋 Input Format
CSV2Sendy accepts CSV files with the following columns (case-insensitive):
- Name/Nome: Full name of the contact
- Email/E-mail: Email address
- Phone/Telefone/WhatsApp: Phone number
Example input:
Name,Email,Phone
John Doe,john@example.com,5511999999999
Maria Silva,maria@example.com,11987654321
📤 Output Format
The tool produces a CSV file formatted for Sendy with the following columns:
first_name: First name of the contactlast_name: Last name of the contact (if available)email: Validated and normalized email addressphone_number: Formatted phone number (+55 format)
Example output:
first_name,last_name,email,phone_number
John,Doe,john@example.com,+55 (11) 99999-9999
Maria,Silva,maria@example.com,+55 (11) 98765-4321
🛠️ Development Setup
-
Clone and install dependencies:
git clone https://github.com/skaisser/csv2sendy.git cd csv2sendy python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate pip install -e ".[dev]"
-
Install pre-commit hooks:
pre-commit install -
Run tests:
pytest pytest --cov=csv2sendy # With coverage
-
Format code:
black csv2sendy tests isort csv2sendy tests
🤝 Contributing
We love your input! Check out our Contributing Guide for guidelines on how to proceed.
- Fork the repo
- Create your feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Run the tests (
pytest) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
📜 License
This project is licensed under the MIT License - see the LICENSE file for details.
🔒 Security
Found a security issue? Please email skaisser@gmail.com instead of using the issue tracker.
💬 Community & Support
🙏 Acknowledgments
- Sendy.co for their amazing email marketing platform
- All our contributors
- The open-source community for the amazing tools we build upon
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file csv2sendy-0.1.0.tar.gz.
File metadata
- Download URL: csv2sendy-0.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
34c15a1c623880354532453e27ce505f79c9750f722477fdf4ecd8373afb1aa2
|
|
| MD5 |
9442de98a0a8ced093a487cc7cd64f32
|
|
| BLAKE2b-256 |
7cdb9160c066331661ae2fa8aff77534708a0b6afd9087845ec863634a0032c2
|
File details
Details for the file csv2sendy-0.1.0-py3-none-any.whl.
File metadata
- Download URL: csv2sendy-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ec8a0cb256444cb3184b857b63c4be20e4ba5d70323f0a3c62ece210352d14c6
|
|
| MD5 |
bbeb98ad7774f9486049b852f0989aad
|
|
| BLAKE2b-256 |
5c278220bbe7fd1d85955dbef90d3de7e252176a002153733c46b7babc33ec4a
|