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())
Metadata
Release files for photoprism 0.1.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 | |
|---|---|---|---|
| photoprism-0.1.0.tar.gz | 13.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| photoprism-0.1.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 33.4 kB
Release files / photoprism-0.1.0.tar.gz
| Download URL | photoprism-0.1.0.tar.gz |
|---|---|
| Size | 13.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
fd5f21b523113ef4e7a2a6e3883fcde84adcdea316e1877fa1af889630fd6ac4
|
|
BLAKE2b-256 checksum How to use checksums |
9946f2dd56abcfaf77ca60a8944432d07985230e59ed1fd8c262900b4940dd94
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.5 Linux/6.10.7-lqx1-1-lqx
|
Release files / photoprism-0.1.0-py3-none-any.whl
| Download URL | photoprism-0.1.0-py3-none-any.whl |
|---|---|
| Size | 19.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
e392194c3b2c9f64398a4ca60dbc403cdbfe31bd7fc8403067b5342dd3a4ba81
|
|
BLAKE2b-256 checksum How to use checksums |
9ae12676dd514fbeed70a9674676110e479addfd06850e39355dae7e86aa68bd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.8.3 CPython/3.12.5 Linux/6.10.7-lqx1-1-lqx
|