Raspberry pi -- Python İle Dropbox'a Dosya Gönderimi Dropbox'a girip Developer bölümünden application için tanım yapıp access token aldıktan sonra aşağıdaki python kodu kullanılabilir. Kod: import sys import os from subprocess import call import dropbox import string import random recFileName = sys.argv[1] access_token ='your app access token here' client = dropbox.client.DropboxClient(access_token) print 'linked account: ', client.account_info() f = open(recFileName, 'rb') response = client.put_file('/' + recFileName, f) print 'uploaded: ', response Örnek Kullanım python RaspiDropbox.py /mnt/usb/saved.jpg
Yorumlar