Skip to main content

Library for handle Flickr API with Django.

Project description

Flickr Pony

.. image::

.. image::

This library provides a `Django Storage`_ for use `Flickr`_ in read and write

With 1To free and a thumbnail system, Flickr is a quite good solution for store
wide pictures in original format and retrieve them in smaller format

As Flickr is dedicated to photos/images, it is not a conventional
object-storge, we consider all pics from all users in the same bucket but
different directories. So what should a be directory path on other storages
will be a user ID in this one.


**api_key** : Findable at, it is the only one
mandatory data for read operations.

**api_secret** : Given with the API KEY

**oauth_token_secret** : Oauth access token, not request token

**oauth_token_secret** : Oauth access token secret, not request secret

**user_id** : Your personal User ID, findable at your Flickr web page.
It is the last part of URL example: ``140893176@N07``. This data is useful
if you want to automatize action related to this user.

.. warn::
Get all authentication info may be really long and boring, we advise you
this page


This storage has a simple usage as define in Django Storage API plus others
method for play more easily with pictures. You can list a user's photos with: ::

>>> from import FlickrStorage
>>> storage = FlickrStorage(api_key="myApiKey")
>>> storage.listdir('140893176@N07')
([], ['',

It will return image in original if you are allowed to get it, but it could be too
heavy for some usage, so you can use decide get it in "medium" format: ::

>>> storage.listdir('140893176@N07', original=False)
([], ['',

Or in "small" size: ::

>>> storage.listdir('140893176@N07', original=False, size='s')
([], ['',

For image gallery, you could also decide to list original and thumbnail: ::

>>> storage.list_image_and_thumb()

Uploading and deleting are available: ::

>>> from django.core.files import File
>>> with open('myPic', 'rb') as img:
...'picName', img)
>>> storage.delete('25839776716')


A demo project is available for testing and trying purpose, for use it: ::

git clone
cd flickr-pony-demo
pip install requirements.txt
cd demo_project
export FLICKR_API_KEY="YourFlickrApiKey" # Mandatory
# export FLICKR_USER_ID="YourFlickrUserId"
./manage runserver

You can also deploy it on Heroku:

.. image::


All contribution are very welcomed, propositions, problems, bugs and
enhancement are tracked with `GitHub issues`_ system and patch are submitted
via `pull requests`_.

We use `Travis`_ coupled with `Coveralls`_ as continious integration tools.

.. _`Django Storage`:
.. _`Flickr`:
.. _`GitHub issues`:
.. _`pull requests`:
.. _Travis:
.. _Coveralls:

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for flickr-pony, version 0.3
Filename, size File type Python version Upload date Hashes
Filename, size flickr-pony-0.3.tar.gz (11.8 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page