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
- Host: GitHub
- URL: https://github.com/guysoft/ownphotos-client
- Owner: guysoft
- License: gpl-3.0
- Created: 2019-01-05T13:14:17.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-01-06T16:23:13.000Z (over 6 years ago)
- Last Synced: 2025-02-24T13:03:16.400Z (3 months ago)
- Language: Python
- Size: 14.6 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
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)