Skip to main content

A powerful CSV processor for Sendy.co with Brazilian format support

Project description

CSV2Sendy

PyPI version Python Versions Tests Coverage Status Documentation Status License: MIT Code style: black Downloads

A powerful tool for processing CSV files for Sendy.co email imports with special support for Brazilian data formats.

Documentation | PyPI Package | GitHub Repository

🌟 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

  1. Start the server:

    csv2sendy
    
  2. Open http://localhost:8080 in your browser

  3. Upload your CSV file

  4. Configure column mapping (or let auto-detection work)

  5. 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 contact
  • last_name: Last name of the contact (if available)
  • email: Validated and normalized email address
  • phone_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

  1. 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]"
    
  2. Install pre-commit hooks:

    pre-commit install
    
  3. Run tests:

    pytest
    pytest --cov=csv2sendy  # With coverage
    
  4. Format code:

    black csv2sendy tests
    isort csv2sendy tests
    

🤝 Contributing

We love your input! Check out our Contributing Guide for guidelines on how to proceed.

  1. Fork the repo
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Make your changes
  4. Run the tests (pytest)
  5. Commit your changes (git commit -m 'Add amazing feature')
  6. Push to the branch (git push origin feature/amazing-feature)
  7. 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

Made with ❤️ by skaisser

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

csv2sendy-0.1.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

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

csv2sendy-0.1.0-py3-none-any.whl (5.0 kB view details)

Uploaded Python 3

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

Hashes for csv2sendy-0.1.0.tar.gz
Algorithm Hash digest
SHA256 34c15a1c623880354532453e27ce505f79c9750f722477fdf4ecd8373afb1aa2
MD5 9442de98a0a8ced093a487cc7cd64f32
BLAKE2b-256 7cdb9160c066331661ae2fa8aff77534708a0b6afd9087845ec863634a0032c2

See more details on using hashes here.

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

Hashes for csv2sendy-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec8a0cb256444cb3184b857b63c4be20e4ba5d70323f0a3c62ece210352d14c6
MD5 bbeb98ad7774f9486049b852f0989aad
BLAKE2b-256 5c278220bbe7fd1d85955dbef90d3de7e252176a002153733c46b7babc33ec4a

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