Skip to main content

Copy photos from Google Photos to Dropbox without saving to your local machine

Project description

jyphoto_transfer

Disclosure

  1. Setup required - Users need to create their own Google/Dropbox OAuth apps
  2. Personal use focus - It’s designed for individual use, not multi-tenant production
  3. Prerequisites - Technical comfort with OAuth setup

Installation

pip install jyphoto_transfer

Setup

Before using, you need to set up credentials for both Google and Dropbox.

1. Google Cloud Setup

  1. Go to Google Cloud Console
  2. Create a new project (or select existing)
  3. Go to APIs & Services → Library
  4. Search for “Photos Library API” and click Enable
  5. Go to APIs & Services → Credentials
  6. Click Create Credentials → OAuth client ID
  7. If prompted, configure the OAuth consent screen (choose External, fill in app name)
  8. For application type, choose Web Application and enter your Redirect URL (Should be BASE_URL/callback)
  9. Click Create, then download the JSON file
  10. Save it somewhere safe (e.g., ~/.config/jyphoto_transfer/google_photos_creds.json)
  11. If keeping project in Testing mode, add your test users in Audience.

Google Cloud Console Setup

Add these scopes in the Data Access tab * https://www.googleapis.com/auth/photospicker.mediaitems.readonly * openid * https://www.googleapis.com/auth/userinfo.email

2. Dropbox App Setup

  1. Go to Dropbox App Console
  2. Click Create app
  3. Choose Scoped access and Full Dropbox
  4. Give it a name and click Create app
  5. On the app settings page, note your App key and App secret
  6. Make to give the following permissions
  • files.content.write - to upload files
  • files.metadata.read - to check if files exist (for your get_unique_filename function)
  1. enter your callback URI

3. Environment Config

Create a file called ~/.config/jyphoto_transfer/.env with these values:

BASE_URL=http://localhost:8000/
GOOGLE_CREDS_FILE=google_photos_creds.json
DROPBOX_APP_KEY=your_dropbox_app_key
DROPBOX_APP_SECRET=your_dropbox_app_secret
GOOGLE_TOKEN_FILE=google_token.json 
DROPBOX_TOKEN_FILE=dropbox_token.json 
DROPBOX_FOLDER=/CopiedPhotosLocation
Variable Description
BASE_URL Where the app runs (include trailing slash)
GOOGLE_CREDS_FILE Path to your downloaded Google OAuth JSON
DROPBOX_APP_KEY From Dropbox app settings
DROPBOX_APP_SECRET From Dropbox app settings
GOOGLE_TOKEN_FILE Location of google_token.json
DROPBOX_TOKEN_FILE Location of dropbox_token.json
DROPBOX_FOLDER Dropbox folder to copy photos into

4. Protect Your Secrets

Add these to your .gitignore:

*.env
*_creds.json
google_token.json
dropbox_token.json

Never commit credentials to git!

Usage

from jyphoto_transfer.core import app, serve
serve()

Open your browser to http://localhost:8000, log in with Google, connect Dropbox, select photos, and sync!


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

jyphoto_transfer-0.0.2.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

jyphoto_transfer-0.0.2-py3-none-any.whl (15.2 kB view details)

Uploaded Python 3

File details

Details for the file jyphoto_transfer-0.0.2.tar.gz.

File metadata

  • Download URL: jyphoto_transfer-0.0.2.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for jyphoto_transfer-0.0.2.tar.gz
Algorithm Hash digest
SHA256 2ec427898099e8140243874c64fd1d5b603aac1cc9c6966ca2d2f0c6786a9008
MD5 272bfdef6dd035d7cc7243a73eb5a31c
BLAKE2b-256 d98de1b068bd910c83d495a2edd232d21d05ee49b52c49aae4b66baf84fbe0da

See more details on using hashes here.

File details

Details for the file jyphoto_transfer-0.0.2-py3-none-any.whl.

File metadata

File hashes

Hashes for jyphoto_transfer-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 0350ffaeb13884abc71441ac839b2ed05a66c38fce487f4b4bda21aec6227ae0
MD5 706985c997278cd50cbe9214579deca0
BLAKE2b-256 d7c91d5ba89563a5bf7e21c5b77af512cc62f2793082a46e3a0a013c82a624b0

See more details on using hashes here.

Supported by

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