Skip to main content

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 it 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]
                   term [term ...]

Download stock photos from flickr

positional arguments:
  term                  search terms

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.

Release files for flickrstock 0.2.2

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

Source distribution (sdist)

Source distribution for flickrstock 0.2.2
File Size Uploaded
flickrstock-0.2.2.tar.gz 2.3 kB Details

Release files / flickrstock-0.2.2.tar.gz

Download URL flickrstock-0.2.2.tar.gz
Size 2.3 kB
Tags Source
SHA-256 checksum
How to use checksums
00502206f01904d1c5850e4c01fff187bad77e45f9e8fbc2670ea26434806136
BLAKE2b-256 checksum
How to use checksums
c6224137a1436e6a5fcc76150ead916cd38e00957ea025ec65cbf8ae84db71ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.2.2 This release

1 release file

0.2.1

1 release file

0.2

1 release file

0.1

1 release file

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