Skip to main content

Search unsplash for photos

Project description

unsplash-search

Unsplash-search is small python library to search for photos from the Unsplash photograph hosting website.

Install

pip install unsplash-search

Usage

First and foremost, you must get an access key from the Unsplash Deverloper API website.

You must then instantiate the UnsplashSearch Class with your key to use the program.

unsplash = UnsplashSearch(YOUR_KEY)

Search using queries

The unsplash search method takes in a query as an argument for what kind of photos you want to get.

If successful, it will return a random image dictionary.

img = unsplash.search('mountains') #=> dict

The image dictionary object has two keys: The url of the image, and the author's instagram username.

So if you simply want to get a random image matching the query just do

img['img']

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

unsplash-search-0.1.0.tar.gz (2.2 kB view hashes)

Uploaded Source

Built Distribution

unsplash_search-0.1.0-py3-none-any.whl (3.6 kB view hashes)

Uploaded Python 3

Supported by

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