Skip to main content

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

Project description

CSV2Sendy

PyPI version Python Version Tests Coverage Status Documentation Status License: MIT Code Style: Mypy

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

Documentation | GitHub Repository

🌟 Features

  • 🔄 Intelligent CSV Processing

    • Auto-detection of delimiters (, or ;)
    • Multiple encoding support (utf-8-sig, latin1, iso-8859-1, cp1252)
    • Smart column mapping and normalization
    • Robust error handling
  • 📧 Email Validation

    • RFC-compliant email validation
    • Case normalization
    • Duplicate removal
    • Invalid email filtering
  • 📱 Phone Number Processing

    • Brazilian format support
    • Format standardization
    • Invalid number filtering
    • DDD (area code) validation
  • 👤 Name Processing

    • First/last name splitting
    • Proper capitalization
    • Special character handling
    • Empty name filtering
  • 🌐 Web Interface

    • File upload and processing
    • Column mapping
    • Tag management
    • CSV download
  • 🔒 Security

    • Secure file handling
    • Automatic file cleanup
    • Input sanitization
    • File size limits

📦 Installation

Using pip

pip install csv2sendy

From source

git clone https://github.com/skaisser/csv2sendy.git
cd csv2sendy
pip install -e ".[dev]"

🚀 Quick Start

Web Interface

# Start the web server
python -m csv2sendy.web.app

Visit http://localhost:8080 in your browser.

Python API

from csv2sendy.core import CSVProcessor

# Process a CSV file
processor = CSVProcessor()
df = processor.process_file('input.csv')
df.to_csv('output.csv', index=False)

# Process CSV content directly
content = '''name,email,phone
John Doe,john@example.com,(11) 98765-4321'''
df = processor.process_file(content)

💻 Development

Setup

  1. Clone the repository:
git clone https://github.com/skaisser/csv2sendy.git
cd csv2sendy
  1. Create a virtual environment:
python -m venv venv
source venv/bin/activate  # On Windows: venv\Scripts\activate
  1. Install development dependencies:
pip install -e ".[dev,test,doc]"

Testing

Run tests with coverage:

pytest --cov=csv2sendy tests/

Run type checking:

mypy csv2sendy

Documentation

Build documentation:

cd docs
make html

🔧 Dependencies

  • Python 3.9
  • pandas >= 1.3.0
  • email-validator >= 1.1.0
  • flask >= 2.0.0
  • werkzeug >= 2.0.0

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Install development dependencies (pip install -e ".[dev,test,doc]")
  4. Make your changes
  5. Run tests and type checking (pytest and mypy csv2sendy)
  6. Commit your changes (git commit -m 'Add amazing feature')
  7. Push to the branch (git push origin feature/amazing-feature)
  8. Open a Pull Request

📄 License

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

👤 Author

Shirleyson Kaisser

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-1.0.2.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

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

csv2sendy-1.0.2-py3-none-any.whl (10.6 kB view details)

Uploaded Python 3

File details

Details for the file csv2sendy-1.0.2.tar.gz.

File metadata

  • Download URL: csv2sendy-1.0.2.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for csv2sendy-1.0.2.tar.gz
Algorithm Hash digest
SHA256 4aea794d64b348b44f6a99f914348514448fc7729d6c35216ddc9158d6e646ca
MD5 f95ac351f16f059cf767d1c9a800f873
BLAKE2b-256 851effd278945d57d28bcdc803f0a7e3dc1566dce9def3ad397afcd4f97628f9

See more details on using hashes here.

File details

Details for the file csv2sendy-1.0.2-py3-none-any.whl.

File metadata

  • Download URL: csv2sendy-1.0.2-py3-none-any.whl
  • Upload date:
  • Size: 10.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.6

File hashes

Hashes for csv2sendy-1.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 4a7a8c084ae35f339b63e194cb4a41a91cc9561a92f48b9fd39f8c9295a2e875
MD5 a419d714bc59da526354098af33dbb46
BLAKE2b-256 418951a24dd13024be1c9da70cc02fbbe47da52cb6123469f81c980f61d64d0d

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