Skip to main content

PyFlickr - Unofficial Flickr API

Project description

PyFlickr - An Unofficial Flickr API

PyFlickr

PyPI - Python Version License: MIT

PyFlickr provides python-developers to access to user, albums, photos and other public information from Flickr website. You can customize these to fit your requirements. This API also provide an easy way to download public photos and albums.

📕 Setup

To install PyFlickr, simply use pip:

$ pip install PyFlickr

Then, before using, you have to download Chromedriver to driver folder and unzip it.

$ mkdir driver
$ cd driver
$ curl -O https://chromedriver.storage.googleapis.com/{VERSION}/chromedriver_{OS}.zip
$ unzip chromedriver_{OS}.zip

Remember to update{VERSION}with the latest version and{OS}with your computer OS.

For example:

# version 2.41 on Mac
$ curl -O https://chromedriver.storage.googleapis.com/2.41/chromedriver_mac64.zip
# version 2.41 on Windows
$ curl -O https://chromedriver.storage.googleapis.com/2.41/chromedriver_win32.zip

📗 Getting Start

Start by importing module - PyFlickr:

from pyflickr import PyFlickr

📘 Documentation

PyFlickr provides 5 features : User Information, Photo Size Information, Photo Direct Url, Download Single Photo, Download Single Album.

❗️ For more details, please see PyFlickr Guide .

Example :

# This example shows : Download all of albums of one user in a new folder named "ResultFolder"

from pyflickr import PyFlickr

user = PyFlickr.getUser('139958401@N06')
result = user.getAlbums(limit_trigger = False)
albums = result['Albums_Result']
for album_data in albums:
	album_url = album_data['url']
	PyFlickr.singleAlbum_DL(album_url = album_url, folder_path='ResultFolder')

📙 Development

It's simple to run PyFlickr on your computer. Follow instruction below step-by-step:

$ git clone https://github.com/rf777rf777/PyFlickr.git
$ cd PyFlickr
$ pip install -r requirements.txt

Then, as mentioned previously, please setup your Chromedriver (see Setup).

📝 License

Licensed under MIT license.

Project details


Download files

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

Source Distribution

PyFlickr-1.0.0.tar.gz (10.3 kB view details)

Uploaded Source

File details

Details for the file PyFlickr-1.0.0.tar.gz.

File metadata

  • Download URL: PyFlickr-1.0.0.tar.gz
  • Upload date:
  • Size: 10.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.19.1 setuptools/40.2.0 requests-toolbelt/0.8.0 tqdm/4.25.0 CPython/3.6.0

File hashes

Hashes for PyFlickr-1.0.0.tar.gz
Algorithm Hash digest
SHA256 598f35f0790ee7bc0fddea9e87f66deb91d2e46943963ff025bf45e27b66b8f4
MD5 c3689800c02ca870c02c74e25e2ce509
BLAKE2b-256 2e2bb00a199bb1ad742ecdeb9fe05677d5d571cf5a63d146add56e608bdae002

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page