A basic API wrapper for Unsplash.
Project description
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
Python 3.8 or higher
requests library
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)
Links
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.
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file unsplash_client-1.0.0.tar.gz.
File metadata
- Download URL: unsplash_client-1.0.0.tar.gz
- Upload date:
- Size: 10.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
67e7737a0e296c9b2d38de625470edd4254e344f3072ef6d012a6f5880161c91
|
|
| MD5 |
5c045dbdcb73c1d7814c3bf33eba12d6
|
|
| BLAKE2b-256 |
3ceebc81f964143ada66e523929982b2e1d7b8ab4e7e24fb629fd28ee63609ba
|
File details
Details for the file unsplash_client-1.0.0-py3-none-any.whl.
File metadata
- Download URL: unsplash_client-1.0.0-py3-none-any.whl
- Upload date:
- Size: 13.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.23
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
440a2e662e968ac35bf00e306e532a7aca84d9a4f6ae64b45c0de4a2c64ec116
|
|
| MD5 |
cf4ab4dc071f7777c5b5b60167feac10
|
|
| BLAKE2b-256 |
a442d6b8b4436cf4ced9894fd9b627698ba92830fdc8ecb8283e9a57c86abf14
|