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
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
Hashes for unsplash_search-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d64f1cafd128d1953e34d0f30bdee22cf511f445a1796b9e52871cf45c3d3d45 |
|
MD5 | d22e1e1a1483469bef150d617d4d1278 |
|
BLAKE2b-256 | 3c79b2a16bf2621487d353f7d9848492ed575c1bb1380a2296c14fb6166d9f63 |