Cloudfile
Cloudfile can upload and download (large) files to the original position.
Installation
pip install cloudfile- If you only want to use cloudfile to restore you are done.
- To also upload you need to install Google Client Library, make an API key, and login to your google account. This means executing:
-
python -m cloudfile enable_google_apiThis will install the Google Client Library and open https://developers.google.com/drive/api/v3/quickstart/python
On site, click on
Enable the Drive APIto make an API key. Save the file in the root directory ascredentials.json. -
python -m cloudfile enable_google_driveThis will make you sign in to your google account.
-
Usage
-
python -m cloudfile restoreThis will restore the keys with the corresponding urls in
cloudfile.json. Add--hard=Trueto download all file even if they already exist. -
python -m cloudfile restore_file fileThis will restore the specified file from the corresponding urls in
cloudfile.json. Add--hard=Trueto download all file even if they already exist. -
python -m cloudfile add folderUplouds file or the content of the folder to google drive and adds the link to
cloudfile.json. -
python -m cloudfile add_file fileUploud the file to google drive and adds the link to
cloudfile.json. The files will be calledcloudfile_{filename}and by default will be accessible to anyone who has the link. -
python -m cloudfile add_link file urlAdd a file to
cloudfile.jsonthe location should befileandlinkis the download location. Please ensure it's the actual file not the share page. You can use: https://syncwithtech.blogspot.com/p/direct-download-link-generator.html to convert a link to the actual file. Note when using this option enclose with "". Your shell will otherwise mess up the input if there are strainge tokens in there (e.g. ?). -
python -m cloudfile del_link fileDelete a link from
cloudfile.json -
python -m cloudfile download fileDownload the file even if the file already exists.
TODO
- make zip of files
- Handle larger files (<5MB)
- Make a google drive folder
cloudfile
Release files for cloudfile 0.2.11
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| cloudfile-0.2.11.tar.gz | 6.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| cloudfile-0.2.11-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.7 kB
Release files / cloudfile-0.2.11.tar.gz
| Download URL | cloudfile-0.2.11.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
82502949fd7aca6941cce74675584451236f96f47a7146a325166d7df069388b
|
|
BLAKE2b-256 checksum How to use checksums |
9896f180ba8cf738b2817c45dfaf9e525ccee7061900466e5b3e69d909a36ca8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|
Release files / cloudfile-0.2.11-py3-none-any.whl
| Download URL | cloudfile-0.2.11-py3-none-any.whl |
|---|---|
| Size | 11.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
997753b7d6c1d0640bc49e43ccc7238c0a0e3d9d3e3bd2d63da001fa662b8399
|
|
BLAKE2b-256 checksum How to use checksums |
cea31c5249a2cdfecdda7ccbe90b5af229a1c9a9410c2778822cc32f0dad9709
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.8
|