Skip to main content

dropbox with a simple (dict-like or list-like) interface

Project description

dropboxdol

dropbox with a simple (dict-like or list-like) interface

To install: pip install dropboxdol

A persister for dropbox.

You need to have the python connector (if you don't: pip install dropbox) You also need to have a token for your dropbox app. If you don't it's a google away. Finally, for the test below, you need to put this token in ~/.py2store_configs.json' under key dropbox.__init__kwargs, and have a folder named /py2store_data/test/ in your app space.

>>> import json
>>> import os
>>> from dropboxdol import DropboxPersister
>>> configs = json.load(open(os.path.expanduser('~/.py2store_configs.json')))
>>> s = DropboxPersister('/py2store_data/test/', **configs['dropbox']['__init__kwargs'])
>>> if '/py2store_data/test/_can_remove' in s:
...     del s['/py2store_data/test/_can_remove']
...
>>>
>>> n = len(s)
>>> if n == 1:
...     assert list(s) == ['/py2store_data/test/_can_remove']
...
>>> s['/py2store_data/test/_can_remove'] = b'this is a test'
>>> assert len(s) == n + 1
>>> assert s['/py2store_data/test/_can_remove'] == b'this is a test'
>>> '/py2store_data/test/_can_remove' in s
True
>>> del s['/py2store_data/test/_can_remove']

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

dropboxdol-0.0.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

dropboxdol-0.0.2-py3-none-any.whl (9.4 kB view details)

Uploaded Python 3

File details

Details for the file dropboxdol-0.0.2.tar.gz.

File metadata

  • Download URL: dropboxdol-0.0.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for dropboxdol-0.0.2.tar.gz
Algorithm Hash digest
SHA256 d69b3d61a3ecbaf2536ff999e168a251801aa06a9d1da8375013ea3cbe2fe722
MD5 7e3b4f5d708fc9f579e6ecaee37b3693
BLAKE2b-256 5f8647b14bc667c810d83b7de12d0a58395a477d753a54e6ec90d873aeb84539

See more details on using hashes here.

File details

Details for the file dropboxdol-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: dropboxdol-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 9.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.24.0 setuptools/49.2.1 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6

File hashes

Hashes for dropboxdol-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 87baa62a4d4f783e8d690f7d8a1c7b3dbe65f7ed45283e72443d1bed89d575b3
MD5 fc83ffb3d704f498e92c2dee6b387cf1
BLAKE2b-256 5e5fb4d5950eff5f1a72e995464f9375f4fc885d029832ffff743219fc65f412

See more details on using hashes here.

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