Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/miraculixx/pycloudfs
helper classes to access s3 and mongodb's gridfs
https://github.com/miraculixx/pycloudfs
Last synced: 24 days ago
JSON representation
helper classes to access s3 and mongodb's gridfs
- Host: GitHub
- URL: https://github.com/miraculixx/pycloudfs
- Owner: miraculixx
- Created: 2016-06-24T10:41:48.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2016-08-07T04:30:41.000Z (over 8 years ago)
- Last Synced: 2024-10-29T00:28:01.406Z (2 months ago)
- Language: Python
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 1
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
Pycloudfs
==
A collection of helper classes/scripts to ease access to s3,
gridfs and other storages (will be added later).Usage
===
```
#gridfs
from pycloudfs import GridFSHelper
gf = GridFSHelper()
gf.mongo_url = 'mongodb://localhost:27017/mydb'
gf.collection = 'mycollection'
gf.get_list()
print gf.get_file('Untitled.txt', asfile=True)._id
gf.get_file('dummy.txt')
gf.put_file('newfile.txt')#s3
#keys can also be read from local environment
from pycloudfs import S3Helper
s3 = S3Helper(bucket='test', aws_access_key_id="key", aws_secret_access_key="secret")
s3.get_list()
s3.download_file('uploadtest.crypt')
```