{ "info": { "author": "Florent Messa", "author_email": "florent.messa@gmail.com", "bugtrack_url": null, "classifiers": [ "Environment :: Web Environment", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Utilities" ], "description": "django-data-exporter\n====================\n\ndjango-data-exporter is a simple Django application to export asynchronously\nyour data from your models.\n\nIt's based on Celery_ (>= 2.3) to use `Chords `_ and tablib_ to export your data in multiple formats.\n\nInstallation\n------------\n\n1. Either check out the package from GitHub_ or it pull from a release via PyPI ::\n\n pip install django-data-exporter\n\n2. Configure your Django project to use `djcelery `_\n\n3. Add 'data_exporter' to your ``INSTALLED_APPS`` ::\n\n INSTALLED_APPS = (\n 'data_exporter',\n )\n\nUtilisation\n-----------\n\ndjango-data-exporter uses channels to discover your exports and to transfer them\nto celery. So let's say you have the following model in a ``polls`` application ::\n\n # polls/models.py\n from django.db import models\n\n\n class Poll(models.Model):\n question = models.CharField(max_length=200)\n pub_date = models.DateTimeField('date published')\n\n def __unicode__(self):\n return self.question\n\n\nNow, you want to define your first exporter right? Create a ``exports.py`` file\nin your ``polls`` application and extend ``Export`` to build your own Exporter ::\n\n # polls/exports.py\n from data_exporter.base import Export\n\n from polls.models import Poll\n\n\n class PollExport(Export):\n filename = 'poll'\n columns = ('id', 'question')\n headers = ('id', 'question')\n directory = 'polls'\n\n def get_query(self, offset=None, limit=None):\n qs = Poll.objects.all()\n\n if not offset is None and not limit is None:\n return qs[offset:limit]\n\n elif limit:\n return qs[:limit]\n\n elif offset:\n return qs[offset:]\n\n return qs\n\n def get_count(self):\n return Poll.objects.count()\n\n\nFinal step is to register this exporter in ``DATA_EXPORTER_CHANNELS`` in your\nDjango settings ::\n\n DATA_EXPORTER_CHANNELS = {\n 'polls': 'polls.exports.PollExport'\n }\n\n\nYou can now use the celery tasks provided by django-data-exporter as so ::\n\n from data_exporter.tasks import builder\n builder.delay('polls', 'csv')\n\nFirst parameter is the name of your channel and second parameter is the format\nwanted.\n\nAs said before, we use the beautiful tablib_ library to export your data,\nso as you may understood we support all formats provided by this library.\n\nConfiguration\n-------------\n\n``DATA_EXPORTER_CHANNELS``\n..........................\n\nAll your registered channels.\n\n``DATA_EXPORTER_DIRECTORY``\n...........................\n\nThe directory used to export your data.\n\n.. _Celery: http://celeryproject.org/\n.. _GitHub: https://github.com/thoas/django-data-exporter\n.. _tablib: http://docs.python-tablib.org/en/latest/index.html", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/thoas/django-data-exporter", "keywords": null, "license": "UNKNOWN", "maintainer": null, "maintainer_email": null, "name": "django-data-exporter", "package_url": "https://pypi.org/project/django-data-exporter/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-data-exporter/", "project_urls": { "Download": "UNKNOWN", "Homepage": "http://github.com/thoas/django-data-exporter" }, "release_url": "https://pypi.org/project/django-data-exporter/0.2/", "requires_dist": null, "requires_python": null, "summary": "Export asynchronously your data from your Django models", "version": "0.2" }, "last_serial": 856456, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "8269e34a3c2fe5bb7c127a308fc137c2", "sha256": "266d6c418cf8aa1b5fe28495693304d01937b0a78a3327e06e68b10afb7b8f49" }, "downloads": -1, "filename": "django-data-exporter-0.1.tar.gz", "has_sig": true, "md5_digest": "8269e34a3c2fe5bb7c127a308fc137c2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5257, "upload_time": "2012-09-26T11:25:32", "url": "https://files.pythonhosted.org/packages/5e/8e/83fc41265433c03137f53e5dac034868b3dc2ddee9aa715bbc197537dda7/django-data-exporter-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "ef95fa68a0a757c7d24ece07855c32dd", "sha256": "6e98a8645f80c16d61df56c06b162ff7835161452edf7815c5f745915c9663aa" }, "downloads": -1, "filename": "django-data-exporter-0.1.1.tar.gz", "has_sig": true, "md5_digest": "ef95fa68a0a757c7d24ece07855c32dd", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5285, "upload_time": "2012-09-26T14:11:30", "url": "https://files.pythonhosted.org/packages/84/45/6f931046158e7a8bfa31f091cdf9eccac1e0f40a6b01dd4d2257debe9d1f/django-data-exporter-0.1.1.tar.gz" } ], "0.1.2": [ { "comment_text": "", "digests": { "md5": "a36ad9a96ea6439cbbe0af5ba5cc0297", "sha256": "c21a6da97d15bddf965a991cc31a74306a65fc79bbb6a6088df45a37992f50d9" }, "downloads": -1, "filename": "django-data-exporter-0.1.2.tar.gz", "has_sig": true, "md5_digest": "a36ad9a96ea6439cbbe0af5ba5cc0297", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5676, "upload_time": "2012-09-28T13:59:38", "url": "https://files.pythonhosted.org/packages/cb/5c/0c73d246bc21c6f5bea29e7d1dba22d0395a976c619a2f069a65028a9efe/django-data-exporter-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "1daadfe8b0ef467e56150ef81d7f032d", "sha256": "e0a8bf965d217a9f3f7731c3612141792f962a6d0a5317d18b735d368c8c3c7c" }, "downloads": -1, "filename": "django-data-exporter-0.1.3.tar.gz", "has_sig": true, "md5_digest": "1daadfe8b0ef467e56150ef81d7f032d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5686, "upload_time": "2012-09-28T14:53:49", "url": "https://files.pythonhosted.org/packages/f0/65/031e0711c3630762e9517e881aef12b613e5b60ab8892bc3a3c17ae87205/django-data-exporter-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "e623028f1a85a234784b974ec4955527", "sha256": "4db397a2704b6d020d286b9e030fd0e1ce0c776cf5b9873711ad45bdf3dbe23e" }, "downloads": -1, "filename": "django-data-exporter-0.1.4.tar.gz", "has_sig": true, "md5_digest": "e623028f1a85a234784b974ec4955527", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5682, "upload_time": "2012-09-28T15:57:02", "url": "https://files.pythonhosted.org/packages/d1/a9/34f5ca6d6e9d6badff48facb96dd8170954ccce30dfeb92243f04ddcd4f6/django-data-exporter-0.1.4.tar.gz" } ], "0.1.5": [ { "comment_text": "", "digests": { "md5": "9c1ee0ab4cb73957ca9f130723b1176c", "sha256": "cedbc6bbbba9f239f6bb501c82c6e29fcd12be09414c4b6d689829fa8a375b27" }, "downloads": -1, "filename": "django-data-exporter-0.1.5.tar.gz", "has_sig": true, "md5_digest": "9c1ee0ab4cb73957ca9f130723b1176c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5686, "upload_time": "2013-07-17T14:01:06", "url": "https://files.pythonhosted.org/packages/ae/67/ed0a66f0b9cce67053926552ce43a771120764f5c4417a6a9afb480a0239/django-data-exporter-0.1.5.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "789cec4eb6ddc056a627c1a5a38ddb0b", "sha256": "a101c7d71b1c7b0fad66aed9a8ad2abc5a45b410a38b1e21967f371a5df5171e" }, "downloads": -1, "filename": "django-data-exporter-0.2.tar.gz", "has_sig": true, "md5_digest": "789cec4eb6ddc056a627c1a5a38ddb0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5829, "upload_time": "2013-09-04T08:34:44", "url": "https://files.pythonhosted.org/packages/d1/45/a9f128283cf7599c7bd777f0050617cb4ef444c7eb03413770516b709ae5/django-data-exporter-0.2.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "789cec4eb6ddc056a627c1a5a38ddb0b", "sha256": "a101c7d71b1c7b0fad66aed9a8ad2abc5a45b410a38b1e21967f371a5df5171e" }, "downloads": -1, "filename": "django-data-exporter-0.2.tar.gz", "has_sig": true, "md5_digest": "789cec4eb6ddc056a627c1a5a38ddb0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5829, "upload_time": "2013-09-04T08:34:44", "url": "https://files.pythonhosted.org/packages/d1/45/a9f128283cf7599c7bd777f0050617cb4ef444c7eb03413770516b709ae5/django-data-exporter-0.2.tar.gz" } ] }