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.6.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for dropbox_updater-1.0.6-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cea843bc472379ae4fb55f331819387dd40787ca849dfa7e6aaa2447465dcbe |
|
MD5 | 721ccf1c081f7c19725c9e075727aef9 |
|
BLAKE2b-256 | cd025ca45e9d023761e625e5953887de4a3688d4e24766badfd5ccf014f52db7 |