Skip to main content

Download a complete history of georeferenced flickr posts

This is a Python script that can download a complete history of georeferenced flickr photo metadata. It uses the official flickr API, and saves the data into a PostgreSQL/PostGIS database.

The script will download all photos until its starting time, and keep track of already downloaded time periods in a cache file (default location ~/.cache/flickrhistory.yml). Upon restart it will catch up until the new starting time.

Flickrhistory makes use of multiple threads and can use multiple API keys (something that most likely disagrees with flickr’s T&C, use feature at your own risk).

If you use flickrhistory for scientific research, please cite it in your publication:

Fink, C. (2020): flickrhistory: a Python tool to download a complete flickr timeline. doi:10.5281/zenodo.6566196.

screen shot

Dependencies

The script is written in Python 3 and depends on the Python modules blessed, GeoAlchemy2, psycopg2, PyYaml, Requests and SQLAlchemy.

Installation

pip install flickrhistory

Configuration

Copy the example configuration file flickrhistory.yml.example to a suitable location, depending on your operating system:

  • on Linux systems:
    • system-wide configuration: /etc/flickrhistory.yml
    • per-user configuration:
      • ~/.config/flickrhistory.yml OR
      • ${XDG_CONFIG_HOME}/flickrhistory.yml
  • on MacOS systems:
    • per-user configuration:
      • ${XDG_CONFIG_HOME}/flickrhistory.yml
  • on Microsoft Windows systems:
    • per-user configuration: %APPDATA%\flickrhistory.yml

Adapt the configuration:

  • Configure a PostgreSQL connection string (connection_string), pointing to an existing database (with the PostGIS extension enabled).
  • Configure one or more API access keys to the flickr API flickr_api_keys). Using more than one API key in all likelihood violates the Terms and Conditions of the Flickr API (don’t do it!).

If you have a cache file from a previous installation in which already downloaded time periods are saved, copy it to ${XDG_CACHE_HOME}/flickrhistory.yml or %LOCALAPPDATA%/flickrhistory.yml on Linux or MacOS, and Microsoft Windows, respectively.

Usage

Command line executable

python -m flickrhistory

Python

Import the flickrhistory module. Instantiate a FlickrHistoryDownloader, and call its download() method.

import flickrhistory

downloader = flickrhistory.FlickrHistoryDownloader()
downloader.download()

Metadata

Release files for flickrhistory 0.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flickrhistory 0.3.1
File Size Uploaded
flickrhistory-0.3.1.tar.gz 34.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for flickrhistory 0.3.1
File Interpreter ABI Platform
flickrhistory-0.3.1-py3-none-any.whl Python 3 none any Details

Total release size: 79.0 kB

Release files / flickrhistory-0.3.1.tar.gz

Download URL flickrhistory-0.3.1.tar.gz
Size 34.2 kB
Tags Source
SHA-256 checksum
How to use checksums
ccd127d5732b6679fa19f081d479ce0e650fdd32aba00f0d5528892578eddd88
BLAKE2b-256 checksum
How to use checksums
0e6656fcaac1a9e1ac5eee85358bb9a15912ac2897bd209904ceaf1eb571cead
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 16, 2025.

Transparency log

Release files / flickrhistory-0.3.1-py3-none-any.whl

Download URL flickrhistory-0.3.1-py3-none-any.whl
Size 44.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
815d4edccaeac82c937572edbbd013f52f1f79d45b308470643917e41dca3982
BLAKE2b-256 checksum
How to use checksums
52cd96aa7385553dc301a4feb699e0027b188dd275ded606fb544ca94f8056f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.12.9

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 16, 2025.

Transparency log
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page