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
- Dropbox app created at Dropbox Developer Console with an access token generated
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.pyscript at theTOKENvariable - Adjust
LOCALFILEandBACKUPPATHvariables 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.