gp_wrapper
Typed Python wrapper for the Google Photos Library API — albums, media, uploads, and search with a clean object model instead of raw HTTP.
Requires Python 3.11+.
Why gp_wrapper?
Google Photos is powerful; its API is verbose. gp_wrapper turns authenticated sessions into first-class objects so you can script backups, migrations, and album workflows without hand-rolling OAuth, paging, or payload shapes.
- Full Library API coverage plus convenience helpers for real upload/migration flows
GooglePhotos,Album, andMediaItemas the main entry points- Enums and dataclasses that mirror the API (
MimeType,MediaItemMaskTypes,NewMediaItem, …) - Video-aware uploads — non-mp4 sources can be transcoded with preserved timing metadata
- MIT licensed, CI-tested on Python 3.11–3.13
Install
pip install gp_wrapper
# or
uv add gp_wrapper
Quick start
from gp_wrapper import GooglePhotos, Album, MediaItem, NewMediaItem, SimpleMediaItem
gp = GooglePhotos("path/to/client_secrets.json")
album = Album.exists(gp, name="Vacation") or Album.create(gp, "Vacation")
token = MediaItem.upload_media(gp, "photo.jpg")
MediaItem.batchCreate(
gp,
[NewMediaItem("from gp_wrapper", SimpleMediaItem(token, "photo.jpg"))],
albumId=album.id,
)
Google Cloud OAuth setup and a longer walkthrough: READMES/example.md · credentials shape: READMES/client_secrets_example.json
What you get
| Surface | Role |
|---|---|
GooglePhotos |
Authenticated session over the Photos Library API |
Album |
Create, list, share, enrich, and manage album membership |
MediaItem |
Upload, batch-create, search, and update media |
| Filters & enums | Content, date, feature, and media-type search filters |
| Structures | SimpleMediaItem, NewMediaItem, AlbumPosition, MediaMetadata, … |
Contributing & development
Agent/developer workflow (uv, tests, CI/CD labels, secrets): see AGENTS.md.
Report security issues privately via GitHub advisories — please do not open a public issue for vulnerabilities.
License
MIT — see LISENCE.
Metadata
Release files for gp_wrapper 0.9.13
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| gp_wrapper-0.9.13-py3-none-any.whl | Python 3 | none | any | Details for gp_wrapper-0.9.13-py3-none-any.whl |
Release files / gp_wrapper-0.9.13-py3-none-any.whl
| Download URL | gp_wrapper-0.9.13-py3-none-any.whl |
|---|---|
| Size | 39.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d19ac859366f3225478aff56cba6ca928092b13753486953fe89ef4928096373
|
|
BLAKE2b-256 checksum How to use checksums |
8ec2517852e77f55aaeb5a8977d92c96eb8183dc987e8682711d555e3f6d6ab6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
uv/0.13.7 {"installer":{"name":"uv","version":"0.13.7","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for gp_wrapper 0.9.13
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.