Photoprism Python API Client
Installation
pip install photoprism
Usage
import asyncio
from pathlib import Path
from photoprism import PhotoprismSession, PhotoprismClient
from photoprism.models.query import Size
async def main():
session = PhotoprismSession(
username="username",
password="password",
host="localhost",
protocol="http",
)
client = PhotoprismClient(session)
albums = await client.albums.filter(count=3, q="cats")
for album in albums:
image_path = await client.albums.download_cover_image(
album_uid=album.uid,
size=Size.Tile50,
file_dir=Path("data/album_covers"),
)
print(image_path)
if __name__ == '__main__':
asyncio.run(main())
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
photoprism-0.1.0.tar.gz
(13.5 kB
view details)
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 photoprism-0.1.0.tar.gz.
File metadata
- Download URL: photoprism-0.1.0.tar.gz
- Upload date:
- Size: 13.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.10.7-lqx1-1-lqx
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd5f21b523113ef4e7a2a6e3883fcde84adcdea316e1877fa1af889630fd6ac4
|
|
| MD5 |
80702372b303f0838f09ce4e736e7fa5
|
|
| BLAKE2b-256 |
9946f2dd56abcfaf77ca60a8944432d07985230e59ed1fd8c262900b4940dd94
|
File details
Details for the file photoprism-0.1.0-py3-none-any.whl.
File metadata
- Download URL: photoprism-0.1.0-py3-none-any.whl
- Upload date:
- Size: 19.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.8.3 CPython/3.12.5 Linux/6.10.7-lqx1-1-lqx
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e392194c3b2c9f64398a4ca60dbc403cdbfe31bd7fc8403067b5342dd3a4ba81
|
|
| MD5 |
d36871799c3a3902c0a5d9643eecfce6
|
|
| BLAKE2b-256 |
9ae12676dd514fbeed70a9674676110e479addfd06850e39355dae7e86aa68bd
|