REST API to get a picture of the day. This fetches photos from a Nextcloud Photos / Memories album. It let you specify to deliver a specific photo for a specific day, for unspecified days it chooses a random picture.
Project description
Picture of the Day
This project provides a REST API endpoint for delivering a Picture of the Day.
It requires a connection to a Nextcloud instance with Nextcloud Photos being enabled. You can also use Memories for Nextcloud, but you need to have Nextcloud Photos enabled for photo album support (Memories and Photos are sharing their albums).
You can then specify an album from which the photos are fetched. Afterwards, you can assign for each calandar day a specific photo. For days for which there is no photo assigned, a random photo is choosen.
The app remembers which photos have already been delivered and prefers photos for the random assignment which haven't been picked yet. If there are no more new photos, the already delivered photos will be picked again.
Motivation
My personal motivation for this app is to use it for an ESP32-S3-PhotoFrame, which has an e-ink display and therefore has ultra-low energy consumption and can run on a battery for months.
Important
[!CAUTION]
While this application has some form of basic authentication, I still recommend to only run this within a trusted home network without exposing it to the internet.
Install
To install the latest release:
pip install picture-of-the-day
To install from source:
pip install .
Developing & Testing
Install all dependencies:
pip install -U .[dev,tests]
Run tests:
pytest -v
Run
picture-of-the-day run
License
This project is licensed under the terms of the MIT license.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file picture_of_the_day-0.4.0a5.tar.gz.
File metadata
- Download URL: picture_of_the_day-0.4.0a5.tar.gz
- Upload date:
- Size: 12.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62c5ff4df58ff07e6707a0e8b562b92855092b81e5237810a4f3f06d6297b4f7
|
|
| MD5 |
422063237e5ba5b36e3db7730d5f1a78
|
|
| BLAKE2b-256 |
820ce5595fa4b3e1c54aa83e89049a7b517c1d80bdf5c23bc170c9adf413ab44
|
Provenance
The following attestation bundles were made for picture_of_the_day-0.4.0a5.tar.gz:
Publisher:
ci.yml on Croydon/picture-of-the-day
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
picture_of_the_day-0.4.0a5.tar.gz -
Subject digest:
62c5ff4df58ff07e6707a0e8b562b92855092b81e5237810a4f3f06d6297b4f7 - Sigstore transparency entry: 1017480986
- Sigstore integration time:
-
Permalink:
Croydon/picture-of-the-day@45bb2d1c54e0d6f360f2aa8a62c17a2c933bba86 -
Branch / Tag:
refs/tags/0.4.0a5 - Owner: https://github.com/Croydon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@45bb2d1c54e0d6f360f2aa8a62c17a2c933bba86 -
Trigger Event:
push
-
Statement type:
File details
Details for the file picture_of_the_day-0.4.0a5-py3-none-any.whl.
File metadata
- Download URL: picture_of_the_day-0.4.0a5-py3-none-any.whl
- Upload date:
- Size: 10.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1eae624be2d88aae6c3fdbbdb0dc57a3cab4da52d4a39d0c87c44539a20a5de3
|
|
| MD5 |
ec9cbd079697dffeafe47c3992693ecc
|
|
| BLAKE2b-256 |
7f23b0650c222c7a655824476d9ff7779ca0cb995f9521e979d1a36ed9ea9a43
|
Provenance
The following attestation bundles were made for picture_of_the_day-0.4.0a5-py3-none-any.whl:
Publisher:
ci.yml on Croydon/picture-of-the-day
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
picture_of_the_day-0.4.0a5-py3-none-any.whl -
Subject digest:
1eae624be2d88aae6c3fdbbdb0dc57a3cab4da52d4a39d0c87c44539a20a5de3 - Sigstore transparency entry: 1017481053
- Sigstore integration time:
-
Permalink:
Croydon/picture-of-the-day@45bb2d1c54e0d6f360f2aa8a62c17a2c933bba86 -
Branch / Tag:
refs/tags/0.4.0a5 - Owner: https://github.com/Croydon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
ci.yml@45bb2d1c54e0d6f360f2aa8a62c17a2c933bba86 -
Trigger Event:
push
-
Statement type: