An open API service indexing awesome lists of open source software.

https://github.com/guysoft/ownphotos-client

A python package to interact with ownphotos api backend
https://github.com/guysoft/ownphotos-client

Last synced: 2 months ago
JSON representation

A python package to interact with ownphotos api backend

Awesome Lists containing this project

README

        

Ownphotos Client
================
Lets you interact with an `Ownphotos `_ backend server.

Installation::

pip3 install ownphotos-client

Example::

#!/usr/bin/python3
from ownphotos_client import OwnphotosAPI

if __name__ == "__main__":
username = "admin"
password = "admin"
url= 'https://ownphotos.gnethomelinux.com/'
a = OwnphotosAPI(url, username, password)
print(a.avilable())
for i in a.get_user_photos()["results"]:
for cover in i["cover_photos"]:
image_data = a.get_thumbnail(cover["image_hash"])
with open("/tmp/" + cover["image_hash"] + ".jpg",'wb') as w:
w.write(image_data)