Dropbox API File Upload Utility in Python

github repo

A Python-based utility to upload files to Dropbox using the official Dropbox API. This project provides a simple script to automate file backups to a specified Dropbox path.


Features

  • Upload local files to Dropbox with overwrite capability
  • Basic error handling for Dropbox API errors, including insufficient space
  • Easily configurable access token and file paths

Tech Stack

  • Python 3.5+
  • Dropbox Python SDK

Getting Started

Prerequisites

  • Python 3.5 or higher installed
  • Dropbox Python SDK installed
sudo pip install dropbox

Installation

Clone the repository:

git clone https://github.com/justin-napolitano/project-dropbox-api.git
cd project-dropbox-api

Configuration

  • Insert your Dropbox API access token in the dropbox_upload.py script at the TOKEN variable
  • Adjust LOCALFILE and BACKUPPATH variables as needed to specify the local file and Dropbox destination path

Running

Run the upload script:

python dropbox_upload.py

Project Structure

project-dropbox-api/
├── dropbox_upload.py  # Main Python script for uploading files
├── test               # Folder likely for tests (content not specified)
└── test.txt           # Sample file for upload

Future Work / Roadmap

  • Complete and expand file detail checking functions
  • Add support for uploading multiple files or entire directories
  • Implement token management and refresh logic
  • Add unit and integration tests
  • Enhance error handling and logging
  • Provide command-line arguments for flexibility
  • Support Python versions beyond 3.5

Note: This README is based on available code and inferred assumptions.

hjkl / arrows · / search · :family · :tag · :datefrom · :dateto · ~/entries/slug · Ctrl+N/Ctrl+P for suggestions · Ctrl+C/Ctrl+G to cancel
entries 201/201 · entry -/-
:readyentries 201/201 · entry -/-