Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_unsplash_source-0.9.0.tar.gz (6.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_unsplash_source-0.9.0-py3-none-any.whl (34.4 kB view details)

Uploaded Python 3

File details

Details for the file py_unsplash_source-0.9.0.tar.gz.

File metadata

  • Download URL: py_unsplash_source-0.9.0.tar.gz
  • Upload date:
  • Size: 6.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for py_unsplash_source-0.9.0.tar.gz
Algorithm Hash digest
SHA256 e07417db8e43ab70c775702b07e0fcef6b344eba169485ee67389526505bb0d5
MD5 f76e9eac5535294d7de9cf781e352061
BLAKE2b-256 e84240bd19fe4d5b946fee738e089451f25b5dfbe4ff0e8c650b57c911f8274c

See more details on using hashes here.

File details

Details for the file py_unsplash_source-0.9.0-py3-none-any.whl.

File metadata

  • Download URL: py_unsplash_source-0.9.0-py3-none-any.whl
  • Upload date:
  • Size: 34.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

File hashes

Hashes for py_unsplash_source-0.9.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d44cc6d9a580e6da9af4434bb7fa1e447a80161536f0a204fb7745877fc74bc1
MD5 70cd0a00bda4592f63b83459e14bedfd
BLAKE2b-256 17ed90bd3b060ed79fd29b64c71d420735e8b5a8831346759592cf2ba0fb78f1

See more details on using hashes here.

Supported by

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