Skip to main content

Module to update python script using dropbox api

Project description

dropbox-updater

Module to update python script using dropbox api

Installation

pip install dropbox-updater

Example

Uploading

>>> from dropbox_updater.updater import upload
>>> config = [
...     {
...         'name': 'my-project',
...         'token': DROPBOX_ACCESS_TOKEN,
...         'dropbox_path': '/my-project.tar.bz2',
...         'file_path': 'dist/my-project.tar.bz2',
...         'extract_dir': '.',
...     },
... ]
>>> upload(config)
05/12/2022 02:13:54 PM - INFO - Compressing to dist/my-project.tar.bz2...
05/12/2022 02:13:54 PM - INFO - my-project requires uploading.
05/12/2022 02:13:54 PM - INFO - Uploading to /my-project.tar.bz2...
05/12/2022 02:13:54 PM - INFO - Uploading (0/1)...
05/12/2022 02:13:57 PM - INFO - Uploading (1/1)...

Checking for updates

>>> from dropbox_updater.updater import check_for_updates
>>> config = [
...     {
...         'name': 'my-project',
...         'token': DROPBOX_ACCESS_TOKEN,
...         'dropbox_path': '/my-project.tar.bz2',
...         'file_path': 'dist/my-project.tar.bz2',
...         'extract_dir': '.',
...     },
... ]
>>> check_for_updates(config, restart=False)
05/12/2022 02:22:38 PM - INFO - Checking for updates...
05/12/2022 02:22:39 PM - INFO - Already upto date.

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

dropbox-updater-1.0.7.tar.gz (4.7 kB view hashes)

Uploaded Source

Built Distribution

dropbox_updater-1.0.7-py3-none-any.whl (5.4 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