Amazon Photos API
Project description
Amazon Photos API
Table of Contents
Installation
pip install amazon-photos
Setup
A .env
file must be created with these cookie values.
session-id=...
ubid-acbca=...
at-acbca=...
Query Syntax
For valid location and people IDs, see the results from the
aggregations()
method.
Example query:
type:(PHOTOS OR VIDEOS)
AND things:(plant AND beach OR moon)
AND timeYear:(2019)
AND timeMonth:(7)
AND timeDay:(1)
AND location:(CAN#BC#Vancouver)
AND people:(CyChdySYdfj7DHsjdSHdy)
Examples
from amazon_photos import Photos
ap = Photos()
# get entire Amazon Photos library
ap.query("type:(PHOTOS OR VIDEOS)")
# query Amazon Photos library for specific photos/videos
ap.query("type:(PHOTOS OR VIDEOS) AND things:(plant AND beach OR moon) AND timeYear:(2023) AND timeMonth:(8) AND timeDay:(14) AND location:(CAN#BC#Vancouver)")
# convenience method to get all photos
ap.photos()
# convenience method to get all videos
ap.videos()
# get current usage stats
ap.usage()
# get all identifiers calculated by Amazon.
ap.aggregations(category="all")
# get specific identifiers calculated by Amazon.
ap.aggregations(category="location")
# get trash bin contents
ap.trashed()
# move a batch of images/videos to the trash bin
ap.trash([...])
# restore a batch of images/videos from the trash bin
ap.restore([...])
# upload a batch of images/videos
ap.upload([...])
# download a batch of images/videos
ap.download([...])
# permanently delete a batch of images/videos.
ap.delete([...])
Common Paramters
name | type | description |
---|---|---|
ContentType | str | "JSON" |
_ | int | 1690059771064 |
asset | str | "ALL" "MOBILE" "NONE "DESKTOP" default: "ALL" |
filters | str | "type:(PHOTOS OR VIDEOS) AND things:(plant AND beach OR moon) AND timeYear:(2019) AND timeMonth:(7) AND location:(CAN#BC#Vancouver) AND people:(CyChdySYdfj7DHsjdSHdy)" default: "type:(PHOTOS OR VIDEOS)" |
groupByForTime | str | "day" "month" "year" |
limit | int | 200 |
lowResThumbnail | str | "true" "false" default: "true" |
resourceVersion | str | "V2" |
searchContext | str | "customer" "all" "unknown" "family" "groups" default: "customer" |
sort | str | "['contentProperties.contentDate DESC']" "['contentProperties.contentDate ASC']" "['createdDate DESC']" "['createdDate ASC']" "['name DESC']" "['name ASC']" default: "['contentProperties.contentDate DESC']" |
tempLink | str | "false" "true" default: "false" |
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
amazon-photos-0.0.5.tar.gz
(10.8 kB
view details)
Built Distribution
File details
Details for the file amazon-photos-0.0.5.tar.gz
.
File metadata
- Download URL: amazon-photos-0.0.5.tar.gz
- Upload date:
- Size: 10.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc1966efd801a0d0aae44530ac118e05b3c7bb57ef8f351933aeb756600a02a5 |
|
MD5 | 6231b43a3aa973c947a45eff1f3883e7 |
|
BLAKE2b-256 | 14464ce973ca677fa4d5151a01aba65b3c8e5ee93f824bbe199e3e3778a7d1ab |
Provenance
File details
Details for the file amazon_photos-0.0.5-py3-none-any.whl
.
File metadata
- Download URL: amazon_photos-0.0.5-py3-none-any.whl
- Upload date:
- Size: 10.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 33102f6028686072d067b1e4297eeab0083d7ab1fe8731ce7e78bbd7c1aa7457 |
|
MD5 | fab7bc856acfaced0bdef8e9bab96723 |
|
BLAKE2b-256 | 37ca1edfffb2be49752ffc840754fef14e615b78415a37776fa46df256a88986 |