Skip to main content

aiophotoprism

Asynchronous Python client for the Photoprism

Warning: Photoprism API is not stable yet, use on your own risk

NOTE: The package is in active development. Not all features of the API are implemented.

Installation

pip install aiophotoprism

Usage

import asyncio

from aiophotoprism import Photoprism

async def main():

  async with Photoprism("username", "password") as client:
    # interact with the client here
    pass

if __name__ == "__main__":
  asyncio.run(main())

Photoprism

Photoprism is the entrypoint class, it acts as an async context manager and provides access to API endpoints.

Initialization

    def __init__(
        self,
        username, # your username
        password, # your password
        url="http://127.0.0.1:2342", # A base URL of the server, https://photoprism.example.com:443/something is also possible
        timeout=DEFAULT_TIMEOUT, # Timeout in seconds
        verify_ssl=True, # Perform SSL verification
        loop=None, # event loop
        session=None # client session,
    )...

Photos

Returns list of photos.

await client.photos(count=50)

Config

Returns Photoprism instance config.

await client.config()

Index

Forces the Photoprism instance to index photos. Complete scan is not supported.

await client.index()

License

MIT License

Copyright (c) 2021 Gleb Sinyavskiy

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Metadata

Release files for aiophotoprism 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for aiophotoprism 0.2.0
File Size Uploaded
aiophotoprism-0.2.0.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for aiophotoprism 0.2.0
File Interpreter ABI Platform
aiophotoprism-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 12.2 kB

Release files / aiophotoprism-0.2.0.tar.gz

Download URL aiophotoprism-0.2.0.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
63eb978baab7f74cb96a5c5956c5aaacfd5b2d5c08eff363552204f6a936bfb5
BLAKE2b-256 checksum
How to use checksums
4b1c16770f7ea8317c07decd497644514a06b4ec2dc0186ace0b96e85ac3ddfa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

Release files / aiophotoprism-0.2.0-py3-none-any.whl

Download URL aiophotoprism-0.2.0-py3-none-any.whl
Size 6.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9512a4eac944b3d135844694bf021ce3fc65c09d16699a0473e247b68946ef62
BLAKE2b-256 checksum
How to use checksums
d7c729b23fc38dbee68269647338bac86b795aba30c12c6739170c6239870cee
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.1 importlib_metadata/4.5.0 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.61.0 CPython/3.9.5

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.1

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page