Skip to main content

vdropbox

Utilities to read/write objects to/from Dropbox.

📦 Installation

pip install vdropbox

# With pandas support (csv/excel/parquet helpers)
pip install vdropbox[pandas]

🚀 Usage

The first step is to declare the Vdropbox object using a token:

from vdropbox import Vdropbox
vdp = Vdropbox("my_secret")

Unlike the official dropbox Python package, it is not required to have a leading / in all file names.

🛠 Custom Logger

You can pass a custom logger to Vdropbox if you want to control logging behavior:

import logging
from vdropbox import Vdropbox

logger = logging.getLogger("my_logger")
vdp = Vdropbox("my_secret", logger=logger)

🔄 Automatic Retries

Transient errors (connection drops, timeouts, Dropbox 5xx, rate limits) are retried automatically with exponential backoff. You can tune or disable it:

vdp = Vdropbox("my_secret", max_retries=4)  # default; use 0 to disable

📁 Basic Functions

# Check if a file exists
vdp.file_exists("my_file.txt")
vdp.file_exists("folder/my_file.txt")

# Check contents of a folder
vdp.ls("my_folder")

# List all files recursively (returns paths relative to the folder)
vdp.ls("my_folder", recursive=True)

# Create a folder (and missing parents)
vdp.mkdir_p("folder/subfolder")

# Move/rename a file
vdp.move("my_file.txt", "folder/my_file.txt")

# Delete a file
vdp.delete("my_file.txt")

📝 Reading and Writing Text Files

data = "Hello world"

# Write a text file
vdp.write_file(data, "my_file.txt")

# Read a text file
vdp.read_file("my_file.txt")

📜 Reading and Writing YAML Files

data = {"a": 4, "b": 2}

# Write a YAML file
vdp.write_yaml(data, "my_file.yaml")

# Read a YAML file
vdp.read_yaml("my_file.yaml")

🧾 Reading and Writing JSON Files

data = {"a": 4, "b": 2}

# Write a JSON file
vdp.write_json(data, "my_file.json")

# Read a JSON file
vdp.read_json("my_file.json")

📊 Reading and Writing Excel Files with Pandas

import pandas as pd
# Create a dummy DataFrame
df = pd.DataFrame(list("ABCDE"), columns=["col"])

# Write an Excel file
vdp.write_excel(df, "df.xlsx")

# Read an Excel file
df = vdp.read_excel("df.xlsx")

Example:

vdp.write_excel(df, "test.xlsx", index=False)

🔹 Reading and Writing Parquet Files with Pandas

import pandas as pd
# Create a dummy DataFrame
df = pd.DataFrame(list("ABCDE"), columns=["col"])

# Write a Parquet file
vdp.write_parquet(df, "df.parquet")

# Read a Parquet file
df = vdp.read_parquet("df.parquet")

👥 Authors

📜 License

The content of this repository is licensed under MIT.

Metadata

Release files for vdropbox 2.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for vdropbox 2.0.0
File Size Uploaded Provenance Actions
vdropbox-2.0.0.tar.gz 63.4 kB Without provenance Details for vdropbox-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for vdropbox 2.0.0
File Interpreter ABI Platform Actions
vdropbox-2.0.0-py3-none-any.whl Python 3 none any Details for vdropbox-2.0.0-py3-none-any.whl

Total release size: 69.4 kB

Release files / vdropbox-2.0.0.tar.gz

Download URL vdropbox-2.0.0.tar.gz
Size 63.4 kB
Tags Source
SHA-256 checksum
How to use checksums
10dcc48133cce66077d31725dc9c8d0c70532bdb64c035c1defad70d1d68002c
BLAKE2b-256 checksum
How to use checksums
6798efdee23828cd0dde500554b6cca4b181e42c6b9af096e15eafe6ca5f2330
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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}

Release files / vdropbox-2.0.0-py3-none-any.whl

Download URL vdropbox-2.0.0-py3-none-any.whl
Size 6.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8d1d245b44535304141c38d2fbc2f069cddbe3c3d218cd2a2c9a29be80ad2b96
BLAKE2b-256 checksum
How to use checksums
fb886fd3bcf5cc799daf493c0ff5d554c5839b0d9cc4271f9bdbf0bb894c4ac9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.21 {"installer":{"name":"uv","version":"0.11.21","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 vdropbox 2.0.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page