Python library to get pictures from source.unsplash.com
Project description
py_unsplash_source is a really really simple library to easily interface with the source.unsplash.com service. Typical usage often looks like this:
#!/usr/bin/env python from py_unsplash_source import PyUnsplashSourceClient su = PyUnsplashSourceClient(width=1920, height=1080) # Random √ image = (su.random_image() .daily() # Or .weekly() .search('nature,landscape')).get() image.save_as('/tmp/random.jpg') # Random from a specific user √ image = (su.image_from_user('gangdise') .from_likes()).get() image.save_as('/tmp/user.jpg') # Random from a collection √ image = su.image_from_collection(145698).get() image.save_as('/tmp/collection.jpg') # Random from featured collection √ image = (su.image_from_featured() .search('nature,landscape', 'sunset')).get() image.save_as('/tmp/featured.jpg') # Speficic image √ image = su.image("ieic5Tq8YMk").get() image.save_as('/tmp/item.jpg')
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
Close
Hashes for py_unsplash_source-0.9.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d44cc6d9a580e6da9af4434bb7fa1e447a80161536f0a204fb7745877fc74bc1 |
|
MD5 | 70cd0a00bda4592f63b83459e14bedfd |
|
BLAKE2b-256 | 17ed90bd3b060ed79fd29b64c71d420735e8b5a8831346759592cf2ba0fb78f1 |