Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dax-dot-gay/giss
Google Infinite Storage Solution
https://github.com/dax-dot-gay/giss
Last synced: 6 days ago
JSON representation
Google Infinite Storage Solution
- Host: GitHub
- URL: https://github.com/dax-dot-gay/giss
- Owner: dax-dot-gay
- License: mit
- Created: 2020-07-15T14:52:14.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-07-15T19:24:04.000Z (over 4 years ago)
- Last Synced: 2024-08-22T18:03:25.310Z (3 months ago)
- Language: Python
- Size: 7.81 KB
- Stars: 2
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GISS
Google Infinite Storage Solution### Setup
Download or clone the repository.
Run `pip install -r requirements.txt` in the project directory.
Create a new project in the Google API Console, and give it Drive and Docs api access. Download the `credentials.json` file into this folder.
Change `'ID'` on line 223 of `__init__.py` to the ID of an empty folder
Run `__init__.py` for a demo.
### Documentation
`GISS(folderId,path='credentials.json')`:
The main class of GISS. Every other method is a member of this class.- `folderId`: the ID of your target folder
- `path`: the path to your `credentials.json` file`GISS().store(key,obj)`:
Stores any python object or file object in GISS- `key`: The name of the object. This should be unique.
- `obj`: A python object or file object to store. File objects stored this way must be open in `rb` mode.**Returns:** None
`GISS().read(key)`:
Reads a stored object.- `key`: Key of the object to read.
**Returns:** The object or file passed to `store()`. If it was a file, it can be passed to a `.write()` function.
`GISS().delete(key)`:
Deletes a stored object.- `key`: Key of the object to delete.
**Returns:** None
### Warning
Do not delete the `._registry` file that the program generates in the folder. This will unlink all your files from their keys and locations, and it will be near-impossible to reassemble them.