{ "info": { "author": "Anthony Monthe (ZuluPro)", "author_email": "anthony.monthe@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: BSD License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5" ], "description": "===========\nFlickr Pony \n===========\n\n.. image:: https://api.travis-ci.org/ZuluPro/flickr-pony.svg\n :target: https://travis-ci.org/ZuluPro/flickr-pony\n\n.. image:: https://coveralls.io/repos/ZuluPro/flickr-pony/badge.svg?branch=master&service=github\n :target: https://coveralls.io/github/ZuluPro/flickr-pony?branch=master\n\nThis library provides a `Django Storage`_ for use `Flickr`_ in read and write\noperations.\n\nWith 1To free and a thumbnail system, Flickr is a quite good solution for store\nwide pictures in original format and retrieve them in smaller format\n\nAs Flickr is dedicated to photos/images, it is not a conventional\nobject-storge, we consider all pics from all users in the same bucket but\ndifferent directories. So what should a be directory path on other storages\nwill be a user ID in this one.\n\nInstall\n=======\n\nA classic :::\n\n pip install flickr-pony\n\nor::\n\n git clone https://github.com/ZuluPro/flickr-pony.git\n cd flickr-pony\n python setup.py develop\n\nIt isn't necessary to include data in ``settings.FLICKR_STORAGE_OPTIONS``, and\nsettings are explained below.\n\n\nSettings\n========\n\nThe storage can be configured with the following parameters, at instanciation or\nby set a dictionary named ``FLICKR_STORAGE_OPTIONS`` in your ``settings.py``.\n\n**api_key** : Findable at\nhttps://www.flickr.com/services/apps/create/apply/, it is the only one\nmandatory data for read operations.\n\n**api_secret** : Given with the API KEY\n\n**oauth_token_secret** : Oauth access token, not request token\n\n**oauth_token_secret** : Oauth access token secret, not request secret\n\n**user_id** : Your personal User ID, findable at your Flickr web page.\nIt is the last part of URL example: ``140893176@N07``. This data is useful\nif you want to automatize action related to this user.\n\n\nInfo\n Get all authentication info may be really long and boring, we advise you\n this page http://acme.com/flickr/authmap.html\n\nUsage\n=====\n\nThis storage has a simple usage as define in Django Storage API plus others\nmethod for play more easily with pictures. You can list a user's photos with: ::\n\n >>> from flickr_pony.storage import FlickrStorage\n >>> storage = FlickrStorage(api_key=\"myApiKey\")\n >>> storage.listdir('140893176@N07')\n ([], ['https://farm2.staticflickr.com/1586/25309081103_518e989396_o.jpg',\n 'https://farm2.staticflickr.com/1623/25911906696_84c8cf31ae_o.jpg',\n 'https://farm2.staticflickr.com/1617/25637193860_98a08d224f_o.jpg',\n ...\n 'https://farm2.staticflickr.com/1671/25794942526_5b54c8a908_o.jpg',\n 'https://farm2.staticflickr.com/1653/25820730145_4040532d03_o.jpg'])\n\nIt will return image in original if you are allowed to get it, but it could be too\nheavy for some usage, so you can use decide get it in \"medium\" format: ::\n\n >>> storage.listdir('140893176@N07', original=False)\n ([], ['https://farm2.staticflickr.com/1586/25309081103_d132f2fa3f.jpg',\n ...\n 'https://farm2.staticflickr.com/1623/25911906696_cee21c32be.jpg',\n 'https://farm2.staticflickr.com/1653/25820730145_ef8db88e60.jpg'])\n\nOr in \"small\" size: ::\n\n >>> storage.listdir('140893176@N07', original=False, size='s')\n ([], ['https://farm2.staticflickr.com/1586/25309081103_d132f2fa3f.jpg',\n ...\n 'https://farm2.staticflickr.com/1623/25911906696_cee21c32be.jpg',\n 'https://farm2.staticflickr.com/1653/25820730145_ef8db88e60.jpg'])\n\nFor image gallery, you could also decide to list original and thumbnail: ::\n\n >>> storage.list_image_and_thumb()\n [('https://farm2.staticflickr.com/1586/25309081103_d132f2fa3f.jpg',\n 'https://farm2.staticflickr.com/1586/25309081103_518e989396_o.jpg'),\n ...\n ('https://farm2.staticflickr.com/1623/25911906696_cee21c32be.jpg',\n 'https://farm2.staticflickr.com/1623/25911906696_84c8cf31ae_o.jpg')]\n \nUploading and deleting are available: ::\n\n >>> from django.core.files import File\n >>> with open('myPic', 'rb') as img:\n ... storage.save('picName', img)\n '25839776716'\n >>> storage.delete('25839776716')\n\nDemo\n====\n\nA demo project is available for testing and trying purpose, for use it: ::\n\n git clone https://github.com/ZuluPro/flickr-pony-demo\n cd flickr-pony-demo\n pip install requirements.txt\n cd demo_project\n export FLICKR_API_KEY=\"YourFlickrApiKey\" # Mandatory\n # export FLICKR_USER_ID=\"YourFlickrUserId\"\n ./manage runserver\n\nYou can also deploy it on Heroku:\n\n.. image:: https://www.herokucdn.com/deploy/button.svg\n :target: https://heroku.com/deploy?template=https://github.com/ZuluPro/flickr-pony-demo\n\n\nContributing\n============\n\nAll contribution are very welcomed, propositions, problems, bugs and\nenhancement are tracked with `GitHub issues`_ system and patch are submitted\nvia `pull requests`_.\n\nWe use `Travis`_ coupled with `Coveralls`_ as continious integration tools.\n\n.. _`Django Storage`: https://docs.djangoproject.com/en/1.9/ref/files/storage/\n.. _`Flickr`: https://www.flickr.com\n.. _`GitHub issues`: https://github.com/ZuluPro/flickr-pony/issues\n.. _`pull requests`: https://github.com/ZuluPro/flickr-pony/pulls\n.. _Travis: https://travis-ci.org/ZuluPro/flickr-pony\n.. _Coveralls: https://coveralls.io/github/ZuluPro/flickr-pony", "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/ZuluPro/flickr-pony", "keywords": "django,flickr,storage,cloud", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "flickr-pony", "package_url": "https://pypi.org/project/flickr-pony/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/flickr-pony/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/ZuluPro/flickr-pony" }, "release_url": "https://pypi.org/project/flickr-pony/0.5/", "requires_dist": null, "requires_python": null, "summary": "Library for handle Flickr API with Django.", "version": "0.5" }, "last_serial": 2196906, "releases": { "0.3": [ { "comment_text": "", "digests": { "md5": "e492011628d95af9ab832ed463d59ff1", "sha256": "257d76fbcffd80215aca8e8761b1e5eb8433ec891653985f92501a49b8cae489" }, "downloads": -1, "filename": "flickr-pony-0.3.tar.gz", "has_sig": false, "md5_digest": "e492011628d95af9ab832ed463d59ff1", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11834, "upload_time": "2016-03-31T19:45:09", "url": "https://files.pythonhosted.org/packages/11/aa/c853f5348991af046f81e14c5af3183aef7c3ef83d258b3126771cf0dd65/flickr-pony-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "e5ec2f60b38c9e2954745859c255e39a", "sha256": "708566ef34c11fab92e0e98d161ea61ba7def438c46c46505539a6d734cbb33f" }, "downloads": -1, "filename": "flickr-pony-0.4.tar.gz", "has_sig": false, "md5_digest": "e5ec2f60b38c9e2954745859c255e39a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13604, "upload_time": "2016-04-01T23:49:23", "url": "https://files.pythonhosted.org/packages/b1/39/ab53610a3db83474d3a0c4d88cb3011017ffc6f705c0776f73de15678dbb/flickr-pony-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "4609502c0064177af4f4166e4e39c498", "sha256": "4c53d4cb33330d1d7b4ba7c7ccc9c60a4f0f37810a071425f9cf31b03c828c03" }, "downloads": -1, "filename": "flickr-pony-0.5.tar.gz", "has_sig": false, "md5_digest": "4609502c0064177af4f4166e4e39c498", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13697, "upload_time": "2016-06-30T21:55:45", "url": "https://files.pythonhosted.org/packages/ea/30/2bd24b9c2311873b8674122b7048dbcf93a2352013416a185591db83a8a5/flickr-pony-0.5.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4609502c0064177af4f4166e4e39c498", "sha256": "4c53d4cb33330d1d7b4ba7c7ccc9c60a4f0f37810a071425f9cf31b03c828c03" }, "downloads": -1, "filename": "flickr-pony-0.5.tar.gz", "has_sig": false, "md5_digest": "4609502c0064177af4f4166e4e39c498", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13697, "upload_time": "2016-06-30T21:55:45", "url": "https://files.pythonhosted.org/packages/ea/30/2bd24b9c2311873b8674122b7048dbcf93a2352013416a185591db83a8a5/flickr-pony-0.5.tar.gz" } ] }