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
Import the UnsplashSearch module
from unsplash_search import UnsplashSearch
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.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 489c88cda4b5826941b96f1ed0373853b944e7abeb7e8036f14ae97b2894006f |
|
MD5 | 508e98c5e20c36fc5ce4ed3c7d595072 |
|
BLAKE2b-256 | 8650e063c9987f990bd977a692a8c139b7451b9cc63f68fafb88a84d7938b81c |