{ "info": { "author": "Mat\u00edas Lang", "author_email": "yo@matiaslang.me", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Intended Audience :: Developers", "Natural Language :: English", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "===============================\nCouchDB Download Token Service\n===============================\n\n\n.. image:: https://img.shields.io/pypi/v/couchdb_download_token.svg\n :target: https://pypi.python.org/pypi/couchdb_download_token\n\n.. image:: https://img.shields.io/travis/sh4r3m4n/couchdb_download_token.svg\n :target: https://travis-ci.org/sh4r3m4n/couchdb_download_token\n\n.. image:: https://readthedocs.org/projects/couchdb-download-token/badge/?version=latest\n :target: https://couchdb-download-token.readthedocs.io/en/latest/?badge=latest\n :alt: Documentation Status\n\n.. image:: https://img.shields.io/codecov/c/github/sh4r3m4n/couchdb_download_token.svg\n :target: https://codecov.io/gh/sh4r3m4n/couchdb_download_token\n :alt: Code coverage\n.. image:: https://img.shields.io/scrutinizer/g/sh4r3m4n/couchdb_download_token.svg\n :target: https://scrutinizer-ci.com/g/sh4r3m4n/couchdb_download_token/\n :alt: Code coverage\n\n\nSimple web service that allows downloading CouchDB document attachments with a per-document download token.\n\nThis project was created with the objetive of provide GET URLs for CouchDB document\nattachments without having specify the couch username and password in the URL itself\nor in the request headers.\n\nThe method I found to do this worrying about permissions is assigning each document a\nsecret `download_token` field to each document that will have to match when doing\nrequests to this service.\n\nThe service needs to have admin user credentials so it can query all document's\nattachments and decide which clients give then. To do this you have to set a\n`COUCHDB_URL` environment variable of format \n`http://admin_user:password@server_domain:5984`. By default it uses localhost\nwith no user credentials.\n\n\n* Free software: GNU General Public License v3\n* Documentation: https://couchdb-download-token.readthedocs.io.\n\n\nExample usage\n-------------\n\n::\n\n $ pip3 install couchdb_download_token\n $ pip3 install gunicorn\n $ gunicorn couchdb_download_token:api \n [2016-07-12 23:33:28 -0300] [7880] [INFO] Starting gunicorn 19.6.0\n [2016-07-12 23:33:28 -0300] [7880] [INFO] Listening at: http://127.0.0.1:8000 (7880)\n [2016-07-12 23:33:28 -0300] [7880] [INFO] Using worker: sync\n [2016-07-12 23:33:28 -0300] [7884] [INFO] Booting worker with pid: 7884\n $ curl http://localhost:5984/my_database/my_document\n {\n \"_id\": \"my_document\",\n \"_rev\": \"4-763e041701ae3e55fd4af08dff93efc4\",\n \"info\": \"test document\",\n \"download_token\": \"123456\",\n \"_attachments\": {\n \"file.txt\": {\n \"content_type\": \"text/plain\",\n \"revpos\": 2,\n \"digest\": \"md5-U0f+Rrm7WPnsUGK3oD8t8g==\",\n \"length\": 100,\n \"stub\": true\n }\n }\n }\n $ curl http://localhost:8000/my_database/my_document/file.txt?token=incorrect\n ...\n < HTTP/1.1 403 Forbidden\n < Server: gunicorn/19.6.0\n ...\n $ curl http://localhost:8000/my_database/my_document/file.txt?token=123456\n ...\n < HTTP/1.1 200 OK\n < Server: gunicorn/19.6.0\n < Date: Wed, 13 Jul 2016 03:02:07 GMT\n < Connection: close\n < Transfer-Encoding: chunked\n < content-type: text/plain\n File contents\n\nCredits\n---------\n\nThis package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.\n\n.. _Cookiecutter: https://github.com/audreyr/cookiecutter\n.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage\n\n\n\n=======\nHistory\n=======\n\n0.1.0 (2016-07-11)\n------------------\n\n* First release on PyPI.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sh4r3m4n/couchdb_download_token", "keywords": "couchdb_download_token", "license": "GNU General Public License v3", "maintainer": null, "maintainer_email": null, "name": "couchdb_download_token", "package_url": "https://pypi.org/project/couchdb_download_token/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/couchdb_download_token/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/sh4r3m4n/couchdb_download_token" }, "release_url": "https://pypi.org/project/couchdb_download_token/0.1.1/", "requires_dist": null, "requires_python": null, "summary": "Simple web service that allows downloading CouchDB document attachments with a per-document download token.", "version": "0.1.1" }, "last_serial": 2256953, "releases": { "0.1.0": [], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c0284245e35415f3740414060ed68fd9", "sha256": "45003e48f7a40aa81007c933c5be68401e677933711d2bec40a8b31f22b51e06" }, "downloads": -1, "filename": "couchdb_download_token-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c0284245e35415f3740414060ed68fd9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25670, "upload_time": "2016-08-02T04:54:02", "url": "https://files.pythonhosted.org/packages/72/23/b98a9d31af0f93e5b63cdbf38eeb4f7dae5d1c73eeb570528432d2ab09f8/couchdb_download_token-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c0284245e35415f3740414060ed68fd9", "sha256": "45003e48f7a40aa81007c933c5be68401e677933711d2bec40a8b31f22b51e06" }, "downloads": -1, "filename": "couchdb_download_token-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c0284245e35415f3740414060ed68fd9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 25670, "upload_time": "2016-08-02T04:54:02", "url": "https://files.pythonhosted.org/packages/72/23/b98a9d31af0f93e5b63cdbf38eeb4f7dae5d1c73eeb570528432d2ab09f8/couchdb_download_token-0.1.1.tar.gz" } ] }