Download a complete history of georeferenced flickr posts
Project description
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.
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.ymlOR${XDG_CONFIG_HOME}/flickrhistory.yml
- system-wide configuration:
- on MacOS systems:
- per-user configuration:
${XDG_CONFIG_HOME}/flickrhistory.yml
- per-user configuration:
- on Microsoft Windows systems:
- per-user configuration:
%APPDATA%\flickrhistory.yml
- per-user configuration:
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()
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file flickrhistory-0.3.1.tar.gz.
File metadata
- Download URL: flickrhistory-0.3.1.tar.gz
- Upload date:
- Size: 34.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ccd127d5732b6679fa19f081d479ce0e650fdd32aba00f0d5528892578eddd88
|
|
| MD5 |
8ca8ed7243f2115dd0e74b98d69e547a
|
|
| BLAKE2b-256 |
0e6656fcaac1a9e1ac5eee85358bb9a15912ac2897bd209904ceaf1eb571cead
|
Provenance
The following attestation bundles were made for flickrhistory-0.3.1.tar.gz:
Publisher:
release.yml on DigitalGeographyLab/flickrhistory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flickrhistory-0.3.1.tar.gz -
Subject digest:
ccd127d5732b6679fa19f081d479ce0e650fdd32aba00f0d5528892578eddd88 - Sigstore transparency entry: 197902881
- Sigstore integration time:
-
Permalink:
DigitalGeographyLab/flickrhistory@5817dd9564e1b00cf4fec9ffe9658d6abb045a46 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/DigitalGeographyLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5817dd9564e1b00cf4fec9ffe9658d6abb045a46 -
Trigger Event:
push
-
Statement type:
File details
Details for the file flickrhistory-0.3.1-py3-none-any.whl.
File metadata
- Download URL: flickrhistory-0.3.1-py3-none-any.whl
- Upload date:
- Size: 44.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
815d4edccaeac82c937572edbbd013f52f1f79d45b308470643917e41dca3982
|
|
| MD5 |
8bf0be8687324f4455d0568bc65aa803
|
|
| BLAKE2b-256 |
52cd96aa7385553dc301a4feb699e0027b188dd275ded606fb544ca94f8056f8
|
Provenance
The following attestation bundles were made for flickrhistory-0.3.1-py3-none-any.whl:
Publisher:
release.yml on DigitalGeographyLab/flickrhistory
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
flickrhistory-0.3.1-py3-none-any.whl -
Subject digest:
815d4edccaeac82c937572edbbd013f52f1f79d45b308470643917e41dca3982 - Sigstore transparency entry: 197902884
- Sigstore integration time:
-
Permalink:
DigitalGeographyLab/flickrhistory@5817dd9564e1b00cf4fec9ffe9658d6abb045a46 -
Branch / Tag:
refs/tags/v0.3.1 - Owner: https://github.com/DigitalGeographyLab
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5817dd9564e1b00cf4fec9ffe9658d6abb045a46 -
Trigger Event:
push
-
Statement type: