Skip to content

gjo/storagedef

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

storagedef

Abstract storage layer

Install

from PyPI:

pip install storagedef

from Source:

pip install -e .

How to use

If you use pyramid:

import storagedef

def main(global_config, **settings):
    storage_session = storagedef.Session.from_config(settings, prefix='mystorage.')
    config = Configurator(settings=settings)

    # Some your configuration using storage_session

    return config.make_wsgi_app()

Configuration Keys

Example ini-file if you use 'mystorage.' as prefix:

mystorage.engine = storagedef.engines.s3:S3StorageEngine
mystorage.credentials_file = ~/.aws/credentials
mystorage.config_file = ~/.aws/config
mystorage.region = ap-northeast-1
mystorage.bucket = some-test-bucket
mystorage.acl = public-read

another ini-file using localmem:

mystorage.engine = storagedef.engines.localmemory:LocalMemoryStorageEngine

About

Abstract storage layer for python

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages