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.5.tar.gz
(4.4 kB
view hashes)
Built Distribution
Close
Hashes for dropbox_updater-1.0.5-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 65c3bb11ba5957ac9f82c0b453e991ef57540913442828764c332dc463531ef7 |
|
MD5 | 301c1c77a6d2c74d0d2940adb9f8b29d |
|
BLAKE2b-256 | 92be7c37787105faf9379a556e7c7917b7978a8b177d8580a87e65d38a8f710e |