Skip to main content

Unsplashpy

Description

An Unsplash client without the need for an api key. For a full documentation visit https://sauldom102.github.io/unsplashpy.

Getting started

You can try out how this module works by importing the Unsplash class, which will help you with some user regular actions as searching for a keyword and then download a certain number of image pages of that results.

from unsplashpy import Unsplash

u = Unsplash()

search_text = input('Tell me what are you searching for: ')
u.search(search_text)

num_pages = input('Pages to download [10]: ')
num_pages = 5 if num_pages == '' else int(num_pages)

image_size = input('Image size to download [regular]: ')
image_size = 'regular' if image_size == '' else image_size

u.download_last_search(num_pages=num_pages, image_size=image_size)

Some examples

Download user's photos

The bellow code will allow you to download all the user's published photos. One difference from the "Quick start" example is that this will take much more time downloading all pictures because this part doesn't make use of multithreading. We'll see another example on how to make this in a much more efficient way.

Another thing to know is that, by default, all the images downloaded will have a regular resolution.

from unsplashpy import User

username = input('Tell me a username: ')
u = User(username)

for p in u.photos:
    p.download(download_location=username)

Download user's photos (multithreading way)

As said before, this is a more efficient way to download photos. It takes much less time than the above example.

from unsplashpy import User

username = input('Tell me a username: ')
u = User(username)
u.download_all_photos()

Download random photo

from unsplashpy import Photo

p = Photo.random()
p.download()

Release files for unsplashpy 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for unsplashpy 0.0.2
File Size Uploaded
unsplashpy-0.0.2.tar.gz 4.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unsplashpy 0.0.2
File Interpreter ABI Platform
unsplashpy-0.0.2-py2.py3-none-any.whl Python 2, Python 3 none any Details

Total release size:9.3 kB

Release files / unsplashpy-0.0.2.tar.gz

Download URL unsplashpy-0.0.2.tar.gz
Size 4.5 kB
Tags Source
SHA-256 checksum
How to use checksums
6e136f8868347bf0ea24f96f1b60eac2ab5ac62c5e450abd91d555bdb04d60f2
BLAKE2b-256 checksum
How to use checksums
ca97d9744fbc1657a426ad003fd74c96992b7346958628fce8b60353d1fa8376
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2

Release files / unsplashpy-0.0.2-py2.py3-none-any.whl

Download URL unsplashpy-0.0.2-py2.py3-none-any.whl
Size 4.8 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
fefeca03232f21cdb94d9aaba5402f67a2aad9427b6e698b4662ab74ab187c68
BLAKE2b-256 checksum
How to use checksums
8506f34d2c34c583489948f63479d7c6a2700f2df9fa0d38b65820d3474e7702
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.5.2

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page