Last updated:
0 purchases
photoprism 0.1.0
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())
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.