A CSV processor for Sendy.co with Brazilian data format support
Project description
CSV2Sendy
A powerful CSV processor for Sendy.co with Brazilian data format support.
🌟 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
- Auto-detection of delimiters (
-
📧 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
- Clone the repository:
git clone https://github.com/skaisser/csv2sendy.git
cd csv2sendy
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- 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
- Fork the repository
- Create your feature branch (
git checkout -b feature/amazing-feature) - Install development dependencies (
pip install -e ".[dev,test,doc]") - Make your changes
- Run tests and type checking (
pytestandmypy csv2sendy) - 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.
👤 Author
Shirleyson Kaisser
- GitHub: @skaisser
- Email: skaisser@gmail.com
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-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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4aea794d64b348b44f6a99f914348514448fc7729d6c35216ddc9158d6e646ca
|
|
| MD5 |
f95ac351f16f059cf767d1c9a800f873
|
|
| BLAKE2b-256 |
851effd278945d57d28bcdc803f0a7e3dc1566dce9def3ad397afcd4f97628f9
|
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4a7a8c084ae35f339b63e194cb4a41a91cc9561a92f48b9fd39f8c9295a2e875
|
|
| MD5 |
a419d714bc59da526354098af33dbb46
|
|
| BLAKE2b-256 |
418951a24dd13024be1c9da70cc02fbbe47da52cb6123469f81c980f61d64d0d
|