Skip to main content
https://raw.githubusercontent.com/Ombucha/unsplash.py/main/banner.png PyPI version PyPI downloads Lines of code Repository size

A modern, Pythonic client for the Unsplash API.

Features

  • Search for photos, users, and collections

  • Download and trigger downloads for Unsplash images

  • Get random photos or curated collections

  • Access user profiles and statistics

  • Manage and create collections

  • List and explore Unsplash topics

  • Fully typed and Pythonic interface

  • Handles Unsplash API rate limits and errors gracefully

Requirements

Installation

Install the latest stable release from PyPI:

# For Unix / macOS
python3 -m pip install "unsplash.py"

# For Windows
py -m pip install "unsplash.py"

To install the latest development version:

git clone https://github.com/Ombucha/unsplash.py
cd unsplash.py
pip install -e .

Quick Start

Here’s how to use unsplash.py:

import unsplash

# Initialize the client with your Unsplash API access key
client = unsplash.Client(access_key="YOUR_ACCESS_KEY")

# Search for photos
photos = client.search_photos("mountains")
for photo in photos:
    print(photo.urls["regular"])

# Get a random photo
random_photo = client.get_random_photo()
print(random_photo[0].urls["full"])

# Get user profile
user = client.get_user("unsplash")
print(user.name, user.bio)

Contributing

Contributions are welcome! Please open an issue or pull request on GitHub. For major changes, please open an issue first to discuss what you would like to change.

Metadata

Release files for unsplash-client 1.0.0

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

Source distribution (sdist)

Source distribution for unsplash-client 1.0.0
File Size Uploaded
unsplash_client-1.0.0.tar.gz 10.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for unsplash-client 1.0.0
File Interpreter ABI Platform
unsplash_client-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 24.7 kB

Release files / unsplash_client-1.0.0.tar.gz

Download URL unsplash_client-1.0.0.tar.gz
Size 10.9 kB
Tags Source
SHA-256 checksum
How to use checksums
67e7737a0e296c9b2d38de625470edd4254e344f3072ef6d012a6f5880161c91
BLAKE2b-256 checksum
How to use checksums
3ceebc81f964143ada66e523929982b2e1d7b8ab4e7e24fb629fd28ee63609ba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release files / unsplash_client-1.0.0-py3-none-any.whl

Download URL unsplash_client-1.0.0-py3-none-any.whl
Size 13.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
440a2e662e968ac35bf00e306e532a7aca84d9a4f6ae64b45c0de4a2c64ec116
BLAKE2b-256 checksum
How to use checksums
a442d6b8b4436cf4ced9894fd9b627698ba92830fdc8ecb8283e9a57c86abf14
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.9.23

Release history Release notifications | RSS feed

This release

1.0.0 This release

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