{ "info": { "author": "Vince Forgione", "author_email": "vforgione@uhicago.edu", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: GNU General Public License v3 (GPLv3)", "Programming Language :: Python :: 3.6" ], "description": "Plenario Exporter S3\n====================\n\n.. image:: https://travis-ci.org/UrbanCCD-UChicago/plenario-exporter-s3.svg?branch=master\n :target: https://travis-ci.org/UrbanCCD-UChicago/plenario-exporter-s3\n\n.. image:: https://coveralls.io/repos/github/UrbanCCD-UChicago/plenario-exporter-s3/badge.svg?branch=master\n :target: https://coveralls.io/github/UrbanCCD-UChicago/plenario-exporter-s3?branch=master\n\nUsage\n-----\n\nThis is both a simple application and a rather complicated application. The\nactions it performs are straight forward - create a job to export a data set,\nzip up the generated CSVs, upload them to Amazon S3, and email the requestor.\n\nThe application uses ``django-channels``: it's a new asynchronous back end for\nDjango, thus relieving us of the hassle of running separate instances for\n``celery`` and ``flower``. It has its own baggage though - in production it has\nits own server environment and relies on Redis for message passing.\n\nOverall, it's pretty snappy and I'm confident that ``channels`` is the future\nof Django, and not ``celery``.\n\nTo wire this up, it's a relatively simple install::\n\n # your site/settings.py\n INSTALLED_APPS = [\n 'whatever django and local stuff',\n 'channels', # necessary to make exporter go\n 'plenario_exporter_s3', # this app\n ]\n\n CHANNEL_LAYERS = {\n 'default': {\n 'BACKEND': 'asgi_redis.RedisChannelLayer',\n 'CONFIG': {\n 'hosts': [os.environ.get('REDIS_URL', 'redis://localhost:6379')],\n },\n 'ROUTING': 'plenario_exporter_s3.routing.channel_routing',\n },\n }\n\nYou're also going to need an ``asgi.py`` file alongside your wsgi file::\n\n import os\n import channels.asgi\n\n os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'your app.settings')\n channel_layer = channels.asgi.get_channel_layer()\n\nAnd in your views, wire up the provided export service function as the\n``async_handler`` argument to the ``plenario-core`` export view::\n\n from plenario_core.views.export import GenericMetaExportView\n from plenario_exporter_s3.services import create_models_and_start_job\n\n from .models import EtlEventMeta\n\n export_meta = GenericMetaExportView.as_view(\n models=[EtlEventMeta],\n async_handler=create_models_and_start_job)\n\n\nDevelopment\n-----------\n\nFire up a virtualenv and install the dev requirements::\n\n $ python3.6 -m venv .env\n $ source .env/bin/activate\n $ pip install -r dev-requirements.txt\n\nTo run the tests, in a separate terminal pull in the PostGIS docker image and create the database::\n\n $ docker pull mdillon/postgis\n $ docker run -d -p 5432:5432 mdillon/postgis\n $ docker ps\n ...\n $ docker exec -it {container hash} /bin/bash\n ...\n # su postgres -c psql\n ...\n > create database plenario;\n\nYou're also going to need a local Redis server running::\n\n $ docker pull redis\n $ docker run -d -p 6379:6379 redis\n\nThen all you have to do is run the tests normally::\n\n $ coverage run manage.py test\n $ coverage report\n $ flake8\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/UrbanCCD-UChicago/plenario-exporter-s3", "keywords": "plenario", "license": "GPLv3", "maintainer": "", "maintainer_email": "", "name": "plenario-exporter-s3", "package_url": "https://pypi.org/project/plenario-exporter-s3/", "platform": "", "project_url": "https://pypi.org/project/plenario-exporter-s3/", "project_urls": { "Homepage": "https://github.com/UrbanCCD-UChicago/plenario-exporter-s3" }, "release_url": "https://pypi.org/project/plenario-exporter-s3/0.0.4/", "requires_dist": [ "Django (<1.12,>=1.11)", "channels", "asgi-redis", "arrow", "boto3" ], "requires_python": ">=3.6", "summary": "export pleanrio data sets to s3", "version": "0.0.4" }, "last_serial": 3210420, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "84eec957412e323e2a2487270180985a", "sha256": "d7775ef60dcbcb7d1bbcb9f229ad8e07b25e3c5237596abd097e62d27a74bc25" }, "downloads": -1, "filename": "plenario_exporter_s3-0.0.1-py3-none-any.whl", "has_sig": true, "md5_digest": "84eec957412e323e2a2487270180985a", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 15259, "upload_time": "2017-09-25T21:06:45", "url": "https://files.pythonhosted.org/packages/a7/9c/9f23f01f5f5d3bbf379e5c3860fde5cae0d19c0944b43a9a364b06c5b929/plenario_exporter_s3-0.0.1-py3-none-any.whl" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "8cacfea7775729b21e10dfad4cfb732f", "sha256": "81a03dce507b863a20827ae94ff33caf430ff2c7f6252be1b27c0d8c685634e1" }, "downloads": -1, "filename": "plenario_exporter_s3-0.0.2-py3-none-any.whl", "has_sig": true, "md5_digest": "8cacfea7775729b21e10dfad4cfb732f", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 15513, "upload_time": "2017-09-27T16:34:43", "url": "https://files.pythonhosted.org/packages/9c/e2/32e552df7a83b97439b0a7beeb65a562011fe528e6ef15640884312a6d2b/plenario_exporter_s3-0.0.2-py3-none-any.whl" } ], "0.0.3": [ { "comment_text": "", "digests": { "md5": "4dc16c695f88aea4d80bc53b249a2ea2", "sha256": "0acad7b1cf2112058e2ff985dd3ce5d89f9347da5010f8822fb9b0bee5640c99" }, "downloads": -1, "filename": "plenario_exporter_s3-0.0.3-py3-none-any.whl", "has_sig": true, "md5_digest": "4dc16c695f88aea4d80bc53b249a2ea2", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 21191, "upload_time": "2017-09-27T16:44:17", "url": "https://files.pythonhosted.org/packages/6c/07/a2d9051516b6f1657c7509053eed892847a1e7bf63db163e04c87edf6fcc/plenario_exporter_s3-0.0.3-py3-none-any.whl" } ], "0.0.4": [ { "comment_text": "", "digests": { "md5": "8b47a97ffd5f31121fde489a7565aaad", "sha256": "262a881353894e2836b4449356bc1eb92baefe80450f30e2f6c62d1664a63a32" }, "downloads": -1, "filename": "plenario_exporter_s3-0.0.4-py3-none-any.whl", "has_sig": true, "md5_digest": "8b47a97ffd5f31121fde489a7565aaad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 21194, "upload_time": "2017-09-28T15:09:03", "url": "https://files.pythonhosted.org/packages/3e/f6/b882a419797dedbec04c38d2e666f10ace491fb697834e50622b3f329639/plenario_exporter_s3-0.0.4-py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "8b47a97ffd5f31121fde489a7565aaad", "sha256": "262a881353894e2836b4449356bc1eb92baefe80450f30e2f6c62d1664a63a32" }, "downloads": -1, "filename": "plenario_exporter_s3-0.0.4-py3-none-any.whl", "has_sig": true, "md5_digest": "8b47a97ffd5f31121fde489a7565aaad", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">=3.6", "size": 21194, "upload_time": "2017-09-28T15:09:03", "url": "https://files.pythonhosted.org/packages/3e/f6/b882a419797dedbec04c38d2e666f10ace491fb697834e50622b3f329639/plenario_exporter_s3-0.0.4-py3-none-any.whl" } ] }