Skip to main content

A simple tool that controls dropbox files.

Project description

rdbtool

Dropboxのファイルを簡単に扱うためのライブラリ。

インストール

pip install rdbtool

事前準備

  • ここでDropbox側の設定を行う
    • 設定方法は後日解説記事を作成予定

使い方

import rdbtool

# クラスの定義
db = rdbtool.RDB('(アクセストークン)', 'プロジェクト名')

# ファイルのダウンロード (test.txtというファイルをtest1.txtとしてダウンロード)
db.download_file('test1.txt', 'test.txt')

# ファイルのダウンロード (ファイルの競合を防ぐロックをかける、アップロードでロック解除)
db.download_file('test1.txt', 'test.txt', lock=True)

# ファイルのアップロード (test1.txtというファイルをtest2.txtとしてアップロード)
db.upload_file('test1.txt', 'test2.txt')

# ファイルのアップロード (test1.txtというファイルをtest.txtとして上書きアップロード)
db.upload_file('test1.txt', 'test.txt', overwrite=False)

# 共有リンクの取得 (test.txtの共有リンクを取得)
link = db.get_shared_link('test.txt'):

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

rdbtool-1.0.1.tar.gz (2.5 kB view hashes)

Uploaded Source

Built Distribution

rdbtool-1.0.1-py3-none-any.whl (3.7 kB view hashes)

Uploaded Python 3

Supported by

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