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 details)
Built Distribution
File details
Details for the file dropbox-updater-1.0.7.tar.gz
.
File metadata
- Download URL: dropbox-updater-1.0.7.tar.gz
- Upload date:
- Size: 4.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f030a1e55f4274b736e05f672348c0ee834c05365ae56d7850bbd6ec23878c2 |
|
MD5 | e35da4e450b46a74b4df7016a58b93c3 |
|
BLAKE2b-256 | 08d0a8be0b8e4517bf6db0be02c3cd04df552c12d225c4297a614ba80cfa7b0f |
File details
Details for the file dropbox_updater-1.0.7-py3-none-any.whl
.
File metadata
- Download URL: dropbox_updater-1.0.7-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.8
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f69af79ef56bc854f93260b00fbb1379624a12bb0efe9aa452e5344890ed2f39 |
|
MD5 | 3d7adde2fcdf9bd0f418f4d78de3c6bc |
|
BLAKE2b-256 | b22005f6f19e7a31a4f90701f3c53f9cef7af7d8090125472209789d157f9fc2 |