Skip to main content

Ownphotos client

Project description

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ownphotos_client-0.1.1.tar.gz (2.3 kB view hashes)

Uploaded Source

Built Distribution

ownphotos_client-0.1.1-py3-none-any.whl (15.3 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page