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.
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)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| unsplash_client-1.0.0.tar.gz | 10.9 kB | Without provenance | Details for unsplash_client-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| unsplash_client-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for unsplash_client-1.0.0-py3-none-any.whl |
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
|
Security for unsplash-client 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.