This is a pre-production deployment of Warehouse, however changes made here WILL affect the production instance of PyPI.
Latest Version Dependencies status unknown Test status unknown Test coverage unknown
Project Description
# CSV Exporter

This Django package is a model exporter that can be run in a delayed task and emails a link to the resulting zip file containing a csv and all files.

## How to use

### To install the package

```
pip install django-csv-exporter
```

### To use the package

```
def export(queryset, attributes, callback=None, timedelta=datetime.timedelta(days=2)):
```

```
from datetime import timedelta
from functools import partial
from csv_exporter import export, send_email_to_user

users = UserProfile.objects.filter(team='myteam', active=True)
callback = partial(send_email_to_user, ['email1@gmail.com', 'email2@gmail.com'])
zip_url = export(users, ('full_name', 'profile_picture', 'team.name', 'date_joined.isoformat'), callback, timedelta(days=2))
```

The function `send_email_to_user` is a helper function to send the zip_url to the users. The callback to export needs to accept the parameters (zip_url, timedelta). Timedelta is a length of time the url is valid for. Expiration works only for django-storages using s3-boto, otherwise the regular url is returned.

### With Django RQ

```
import django_rq
django_rq.enqueue(export, users, ('full_name', 'profile_picture', 'team.name', 'date_joined.isoformat'), callback, timedelta(days=2))
```


Release History

Release History

1.0

This version

History Node

TODO: Figure out how to actually get changelog content.

Changelog content for this version goes here.

Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue. Nam tincidunt congue enim, ut porta lorem lacinia consectetur. Donec ut libero sed arcu vehicula ultricies a non tortor. Lorem ipsum dolor sit amet, consectetur adipiscing elit.

Show More

Download Files

Download Files

TODO: Brief introduction on what you do with files - including link to relevant help section.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_csv_exporter-1.0-py2.py3-none-any.whl (5.3 kB) Copy SHA256 Checksum SHA256 py2.py3 Wheel Jul 20, 2016
django-csv-exporter-1.0.tar.gz (3.3 kB) Copy SHA256 Checksum SHA256 Source Jul 20, 2016

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS HPE HPE Development Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting