{ "info": { "author": "Vinay Deshmukh", "author_email": "vinay.deshmukh.official@outlook.com", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3 :: Only" ], "description": "# Sheet Disk\n\nUse Google Sheets as a storage device!\n\n# What is it?\n\nEncode your files into `base64` format and store them in a Google Sheets spreadsheet in text format!\n\nGoogle Sheets files don't count towards your Drive Storage, so we create these files without them taking up space on the Drive. So, essentially you can have your data be on google servers but take up 0 bytes.\n\n**Note**: The spreadsheet files are created programmatically, and they are stored under the Service Account you get when you sign up for Google Sheet API credentials (See How to Install section), so you won't be able to see the files in your Google Drive.\nYou'll only be able to access these files through this program.\n\n# How it works\n\nEach cell can hold 50000 characters, that means each cell can easily hold 50kbytes of your data. But, we need to prepend the `'` character to each cell, so that `=` doesn't get interpreted as a formula.\n\nCurrent limit for each cell in the program is 49500 characters, but you could change that to 49998 for more storage.\n\nThe hard limit for cells in a Spreadsheet is 2 million cells, but when we fill the cells in such a dense manner, we can only use about 1000 cells in one spreadsheet file. Hence, your file is broken down in chunks of 1000 * 49500 bytes and stored in separate spreadsheet files.\n\n**Note**: There is a 33% overhead that comes with converting files to their `base64` representation.\n\n\n# How to install\n\n* Prerequisites:\n\n\tThis package makes use of `gspread`, which needs OAuth credentials to work. To see how to get them, [Click here](https://github.com/vinay-deshmukh/Sheet-Disk/blob/master/TUTORIAL.md).\n\n\tAfter you download the OAuth credentials file, store it in a safe location. Copy it's path, and create an environment variable, named `SH_DISK_CREDS`.\n\n\tFor example,\n\n\t![Environment variable](https://user-images.githubusercontent.com/32487576/50295990-6c9c3b00-049f-11e9-8635-b1e895ac09bc.png)\n\nTo install this package, run:\n\n`pip install sheet_disk`\n\n\nRequirements: \n* Python 3.6.7+ (May work on lower versions of 3.x, but hasn't been tested on that).\n* Windows 10 (May work on Linux, MacOS, and older Windows but it's not been tested on them).\n\n# How to use\n\n## 1. Using as a Command Line Program\n\n\n ### Uploading a file:\n\n python -m sheet_disk.cli upload \n\n\n After uploading has finished, a JSON file ([Click for more details](#json_file)) will be created in your current directory. This file will help you retrieve your uploaded file from Google Sheets. \n\n\n\n Where,\n\n * path_to_file: The file which you want to upload\n\n Note: **DON'T LOSE THIS JSON FILE. IF YOU LOSE THIS FILE, YOU CAN'T RETRIEVE YOUR UPLOADED FILE.**\n\n Currently, the created sheets files are made public by default, so that you can share your files with friends, by simply sending them the JSON file.([Click for more details](#json_file))\n\n ### Resuming an upload of a file:\n\n python -m sheet_disk.cli upload \n\n Where,\n\n * file_info.json([Click for more details](#json_file)): **This argument is optional.** If your uploading is cut off before completion, the program will still create a json file, you can pass this json file to resume uploading from that point.\n\n\n\n ### Downloading a file:\n\n python -m sheet_disk.cli download \n\n Where,\n\n * download_path = Download location for the file, \n\n For Example:\n \tC:/Users/Me/file.jpg\n\n * file_info.json = The json file([Click for more details](#json_file)) containing the information about the uploaded file, you got when you uploaded the file\n\n Note: If your download is interrupted for some reason, you can just the run the above command again and Sheet-Disk will resume your download from the last completely downloaded sheet.\n\n #### To see argument usage, use: \n python -m sheet_disk.cli -h\n\n\n## 2. Using in a program\n\n For using this package in a program, you can do the following:\n\n >>> import sheet_disk\n >>> \n >>> # Uploading a file\n \t>>> sheet_disk.upload('My File Path.jpg')\n \t>>> \n \t>>> # Resuming an upload of file\n \t>>> sheet_disk.upload('My File Path.jpg', 'My File Details.json') \n \t>>> \n \t>>> # Download a file\n \t>>> sheet_disk.download('My downloaded file.jpg', 'My File Details.json')\n\n\n\n# Sample Usage\n\n* ## CLI:\n\n\t* ### Code:\n\n\t\t`python -m sheet_disk.cli upload starry_night.jpg`\n\n `python -m sheet_disk.cli download starry_night_download.jpg starry_night.jpg.json`\n\n\t* ### Uploading a file:\n\n \tBefore Uploading:\n\n\t\t![Before Uploading](https://user-images.githubusercontent.com/32487576/50295988-6c03a480-049f-11e9-99f7-3763cd4e5fda.png)\n\n\t\tAfter Uploading:\n\n\t\t![After Uploading](https://user-images.githubusercontent.com/32487576/50295998-6e65fe80-049f-11e9-8eb3-36ab485b554c.png)\n\n\t* ### Downloading a file:\n\n\t\tBefore Downloading:\n\n\t\t![Before Downloading](https://user-images.githubusercontent.com/32487576/50295987-6c03a480-049f-11e9-91d7-7b623a5bd49b.png)\n\n After Downloading:\n\n\t\t![After Downloading](https://user-images.githubusercontent.com/32487576/50295997-6dcd6800-049f-11e9-9b50-d2ee0b2d0688.png)\n* ## Program:\n\n\t* ### Code:\n\n\t\t\timport sheet_disk\n \t sheet_disk.upload('starry_night.jpg')\n \tsheet_disk.download('starry_night_download.jpg', 'starry_night.jpg.json')\n\n\t* ### Uploading a file:\n\n \tBefore Uploading:\n\n\t\t![Before Uploading](https://user-images.githubusercontent.com/32487576/50297334-9b67e080-04a2-11e9-9254-d63d5a1c8b09.png)\n\n After Uploading:\n\n ![After Uploading](https://user-images.githubusercontent.com/32487576/50295993-6d34d180-049f-11e9-84b1-0b9426bdfd37.png)\n\n\t* ### Downloading a file:\n\n \tBefore Downloading:\n\n \t![Before Download](https://user-images.githubusercontent.com/32487576/50297337-9c990d80-04a2-11e9-9074-56ff00062ae3.png)\n\n After Downloading:\n\n ![After Download](https://user-images.githubusercontent.com/32487576/50295992-6c9c3b00-049f-11e9-9336-6af03bedf2a5.png)\n\n \n# JSON File\n\nSheet-Disk stores the keys/ids of the spreadsheets, version of the program used when creating the file in a JSON file. This JSON file has the name of your file, and will have a timestamp if a file with the same name exists.\n\nCreation of this file will happen even if the program quits unexpectedly due to an external exception, like if your internet stops working, this file will keep track of the data that has already been uploaded to Sheets. This way you can resume uploading, if the file you were uploading is big.\n\nThis JSON file is your only way to access the file contents that you have stored online, so **PLEASE KEEP THIS FILE SAFE!**\n\nYou can share this file with your friends to share your uploaded files with your friends.\n\n# Notable Features\n\n* Your file is divided into pieces of ~50 * 10^6 bytes and stored separately in a single Sheet.\n* You can resume uploading and downloading if you were interrupted. The program automatically tracks this and skips sheets if they have already been uploaded/downloaded, thus, reducing your internet usage.\n* Multiple threads are used for uploading and downloading. This speeds up the uploading and downloading, since multiple concurrent connections can send/receive data simultaneously.\n* File Chunking. Due to file chunking methods, RAM usage won't increase for bigger input files.\n* Only a single file can be uploaded, but you can zip up all your files into one archive and upload that.\n* Uploading is a bit slow since writing data to Sheets takes longer than reading data. Hence, downloading is a lot faster than uploading.\n\n# Liability\n\nI don't take any liability on the off chance that you are not able to retrieve your file from Sheets. \nPlease take multiple backups of your files, in case you are not able to retrieve your files from Google Sheets.\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/vinay-deshmukh/Sheet-Disk", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "sheet-disk", "package_url": "https://pypi.org/project/sheet-disk/", "platform": "", "project_url": "https://pypi.org/project/sheet-disk/", "project_urls": { "Homepage": "https://github.com/vinay-deshmukh/Sheet-Disk" }, "release_url": "https://pypi.org/project/sheet-disk/0.1.1/", "requires_dist": [ "gspread (>=3.0.1)", "oauth2client (>=4.1.3)" ], "requires_python": "", "summary": "Use Google Sheets as a storage device!", "version": "0.1.1" }, "last_serial": 5196599, "releases": { "0.0.0.2": [ { "comment_text": "", "digests": { "md5": "a95503abcbefdded256075b9ee17ba31", "sha256": "9576ad6c3ff5945836726f8966d8e4e64354eb460869a655d3f09f0d269ecb6f" }, "downloads": -1, "filename": "sheet_disk-0.0.0.2-py3-none-any.whl", "has_sig": false, "md5_digest": "a95503abcbefdded256075b9ee17ba31", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9789, "upload_time": "2018-12-06T16:57:58", "url": "https://files.pythonhosted.org/packages/1d/28/c0bb823123e5074535c4e3fd3b5bd467d03d22dc65643e05224ddffc2d65/sheet_disk-0.0.0.2-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2a3bc349a15bab2ca4b4b49bd1fc9f0b", "sha256": "fd9be943854d6267f5844c9ca0c57cf49bcee01d20da1e1c3ee19ecd387b94ac" }, "downloads": -1, "filename": "sheet_disk-0.0.0.2.tar.gz", "has_sig": false, "md5_digest": "2a3bc349a15bab2ca4b4b49bd1fc9f0b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 8198, "upload_time": "2018-12-06T16:58:00", "url": "https://files.pythonhosted.org/packages/4f/a2/7efee0bda08b31a2880e0aedc502b6f72b10f7e9d3d8ac88af0c04eacef0/sheet_disk-0.0.0.2.tar.gz" } ], "0.1": [ { "comment_text": "", "digests": { "md5": "02e45155c2ac397336789d941b752106", "sha256": "e1b7e1adc74499c497050b9dfdac61b90f42f8d8a9e2b9ad8a099514aea99354" }, "downloads": -1, "filename": "sheet_disk-0.1-py3.6.egg", "has_sig": false, "md5_digest": "02e45155c2ac397336789d941b752106", "packagetype": "bdist_egg", "python_version": "3.6", "requires_python": null, "size": 28139, "upload_time": "2018-12-21T09:56:07", "url": "https://files.pythonhosted.org/packages/c2/ec/d7d52d6c0d6c2f5462a6718e46b24673e0e3aff6f7050bf0e4257947c063/sheet_disk-0.1-py3.6.egg" }, { "comment_text": "", "digests": { "md5": "d49f0612fed05f149ab78a2fe8a0b7ff", "sha256": "05366d91e84f7ba1d53c8eea40d07500df88b0ab1903981595aa209bd469eb3e" }, "downloads": -1, "filename": "sheet_disk-0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d49f0612fed05f149ab78a2fe8a0b7ff", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16150, "upload_time": "2018-12-21T09:55:26", "url": "https://files.pythonhosted.org/packages/f2/a6/6cf52e9872ef637f4d48082bf75507b2f6b9a4c3b9d172bc089e50b0a9ef/sheet_disk-0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a19ce623c8f8ca4ee5a960060a593907", "sha256": "bd62d3cda7f7699773bc5a3880192c32e22b3b07219c249b4d1d649b8edd0546" }, "downloads": -1, "filename": "sheet_disk-0.1.tar.gz", "has_sig": false, "md5_digest": "a19ce623c8f8ca4ee5a960060a593907", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16649, "upload_time": "2018-12-21T09:56:09", "url": "https://files.pythonhosted.org/packages/b0/6b/e651216014256370c80336be00188fb474f54405b6a4707f834f462183e3/sheet_disk-0.1.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "9ab158b529e66592c3a6da16d3ecb304", "sha256": "a89e5d6f2862914c85b39f14a92f3d4882e55ae3335317e6929585dd35b7d8c7" }, "downloads": -1, "filename": "sheet_disk-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9ab158b529e66592c3a6da16d3ecb304", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16922, "upload_time": "2019-04-27T12:54:46", "url": "https://files.pythonhosted.org/packages/4d/80/64bb6025b3091614053c098dc663c66e33313e053bfccb993f3e74742c20/sheet_disk-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a1baa08ce9521b2a50c7bd9a437b50e2", "sha256": "5409b634f59057f985fcb3c76eded687dfc1ad91c30a2ec727646d2312b647f4" }, "downloads": -1, "filename": "sheet_disk-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a1baa08ce9521b2a50c7bd9a437b50e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17688, "upload_time": "2019-04-27T12:54:51", "url": "https://files.pythonhosted.org/packages/19/e1/1b8bc2082135b4ff4abd34b4bc01d64a236e97c03061539c6d7f74194a17/sheet_disk-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "9ab158b529e66592c3a6da16d3ecb304", "sha256": "a89e5d6f2862914c85b39f14a92f3d4882e55ae3335317e6929585dd35b7d8c7" }, "downloads": -1, "filename": "sheet_disk-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "9ab158b529e66592c3a6da16d3ecb304", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 16922, "upload_time": "2019-04-27T12:54:46", "url": "https://files.pythonhosted.org/packages/4d/80/64bb6025b3091614053c098dc663c66e33313e053bfccb993f3e74742c20/sheet_disk-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "a1baa08ce9521b2a50c7bd9a437b50e2", "sha256": "5409b634f59057f985fcb3c76eded687dfc1ad91c30a2ec727646d2312b647f4" }, "downloads": -1, "filename": "sheet_disk-0.1.1.tar.gz", "has_sig": false, "md5_digest": "a1baa08ce9521b2a50c7bd9a437b50e2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 17688, "upload_time": "2019-04-27T12:54:51", "url": "https://files.pythonhosted.org/packages/19/e1/1b8bc2082135b4ff4abd34b4bc01d64a236e97c03061539c6d7f74194a17/sheet_disk-0.1.1.tar.gz" } ] }