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.4.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for dropbox_updater-1.0.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 743da4d7e640de188ee56ef6191eb4769a98ac5994eba18cbc3cfb109fe609a5 |
|
MD5 | 752d5bdbb24cc942c79be4856df6670d |
|
BLAKE2b-256 | f6e7eedc7f1ccd793828802be4a13067e664b0c3c72968cf32108e0fd0e13178 |