Flickr Download
Introduction
Simple script to download a Flickr set.
To use it you need to get your own Flickr API key here: https://www.flickr.com/services/api/misc.api_keys.html
flickr_download -k <api key> -s <api secret> -d <set id>
It can also list the public set ids for a given user:
flickr_download -k <api key> -s <api secret> -l <user name>
The user name can be passed in as a URL, email, or user name.
Get a public set using the title and id to name the downloaded files:
flickr_download -k <api key> -s <api secret> -d <set id> -n title_and_id
Download private or restricted photos by authorizing against the users account. (see below)
Installation
To install this script use the Python pip utility bundled with your Python distribution:
> pip install flickr_download
API key
Get your Flickr API key.
You can also set your API key and secret in ~/.flickr_download:
api_key: my_key
api_secret: my_secret
User Authentication Support
The script also allows you to authenticate as a user account. That way you can download sets that
are private and public photos that are restricted. To use this mode, initialize the authorization by
running the script with the t parameter to authorize the app.
flickr_download -k <api key> -s <api secret> -t
This will save ~/.flickr_token containing the authorization. Subsequent calls with -t will use the
stored token. For example using
flickr_download -k <api key> -s <api secret> -l <USER>
with USER set to your own username, will only fetch your publicly available sets, whereas adding -t
flickr_download -k <api key> -s <api secret> -l <USER> -t
will fetch all your sets including private restricted sets.
Note, if you want to log in as another user delete ~/.flickr_token.
Downloading a lot of photos
If you are downloading a lot of photos, two parameters will speed things up. Especially on errors (which the Flickr API seems to like to throw regularly). Those parameters are:
--cache <cache_file>– this will cache API responses in the given file, and will thus speed up repeated calls to the same API--metadata_store- this will store metadata information for the set downloads in.metadata.db, which makes it faster to skip already downloaded files.
So to download all the sets for a given user XXX, including private photos and sets, do:
> flickr_download -k KEY -s SECRET --user_auth --cache api_cache --metadata_store --download_user XXX
Optional arguments
-h, --help show this help message and exit
-k API_KEY, --api_key API_KEY
Flickr API key
-s API_SECRET, --api_secret API_SECRET
Flickr API secret
-t, --user_auth Enable user authentication
-l USER, --list USER List photosets for a user
-d SET_ID, --download SET_ID
Download the given set
-p USERNAME, --download_user_photos USERNAME
Download all photos for a given user
-u USERNAME, --download_user USERNAME
Download all sets for a given user
-i PHOTO_ID, --download_photo PHOTO_ID
Download one specific photo
-q SIZE_LABEL, --quality SIZE_LABEL
Quality of the picture. Examples: Original/Large/Medium/Small. By default the largest available is used.
-n NAMING_MODE, --naming NAMING_MODE
Photo naming mode. Use --list_naming to get a list of possible NAMING_MODEs
-m, --list_naming List naming modes
-o, --skip_download Skip the actual download of the photo
-j, --save_json Save photo info like description and tags, one .json file per photo
-c CACHE_FILE, --cache CACHE_FILE
Cache results in CACHE_FILE (speed things up on large downloads in particular)
--metadata_store Store information about downloads in a metadata file (helps with retrying downloads)
-v, --verbose Turns on verbose logging
--version Lists the version of the tool
Metadata
Release files for flickr-download 0.3.7
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| flickr_download-0.3.7.tar.gz | 15.0 kB | Without provenance | Details for flickr_download-0.3.7.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| flickr_download-0.3.7-py3-none-any.whl | Python 3 | none | any | Details for flickr_download-0.3.7-py3-none-any.whl |
Total release size: 31.0 kB
Release files / flickr_download-0.3.7.tar.gz
| Download URL | flickr_download-0.3.7.tar.gz |
|---|---|
| Size | 15.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a5ece146f9b7e58a6192ea625b80a565c2428b3f1ebf3427b94306d379b7caa
|
|
BLAKE2b-256 checksum How to use checksums |
c10bb2750ea81875190569a9a9b68ad5dbe3e7d239360312229274f990e2b6c2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.1 CPython/3.12.6 Darwin/23.6.0
|
Release files / flickr_download-0.3.7-py3-none-any.whl
| Download URL | flickr_download-0.3.7-py3-none-any.whl |
|---|---|
| Size | 16.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
64d99a497ef80ac59762f86b4f034089eaa3958bf7af7b8be02aff728fdfbe5d
|
|
BLAKE2b-256 checksum How to use checksums |
48ccf4993525fc40c57f7c735a4473692b2418f9dc6c53c259d788ede7d8788e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.1 CPython/3.12.6 Darwin/23.6.0
|
Security for flickr-download 0.3.7
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.