Skip to main content

Download stock photos from flickr

Project description

Do you need a whole bunch of stock photos for your latest project? Or maybe some images to flesh out a prototype? This command line tool fetches photos with a Creative Commons licence using the flickr API.

Installation

pip install flickrstock

Usage

You will need a flickr API key. It takes about 30 seconds to get one. Set is as the FLICKR_API_KEY environment variable or pass it on the command line.

usage: flickrstock [-h] [-s {sq,t,s,q,m,n,z,c,l,o}] [-n NUMBER] [-o OUTPUT]
                   [-k KEY]
                   tag [tag ...]

Download stock photos from flickr

positional arguments:
  tag                   tags to search for

optional arguments:
  -h, --help            show this help message and exit
  -s {sq,t,s,q,m,n,z,c,l,o}, --size {sq,t,s,q,m,n,z,c,l,o}
                        photo size
  -n NUMBER, --number NUMBER
                        how many photos
  -o OUTPUT, --output OUTPUT
                        output directory
  -k KEY, --key KEY     flickr api key

Examples

Fetch some medium-sized pictures of pandas:

$ flickrstock --size m panda

Download 5 original-size photos of hotel rooms, saving the original urls in a separate file for attribution purposes:

$ flickrstock -n 5 --size o --output ./hotel-rooms hotel room > urls.txt

Licence

MIT.

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

flickrstock-0.1.tar.gz (2.2 kB view details)

Uploaded Source

File details

Details for the file flickrstock-0.1.tar.gz.

File metadata

  • Download URL: flickrstock-0.1.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for flickrstock-0.1.tar.gz
Algorithm Hash digest
SHA256 55d66a5e1e3cf568169ddfab02a9a0b09db242bf922bde3e8425a1b43e2d153a
MD5 404e5d5d88d0f3ec8294697a5c744a71
BLAKE2b-256 02989709f82518749337e2fc605b8b6ee3205e51654c7ecfd7ec2f2ac178e1c7

See more details on using hashes here.

Supported by

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