抽象存储接口
storagedef的Python项目详细描述
抽象存储层
安装
来自PyPI:
pip install storagedef
来源:
pip install -e .
如何使用
如果您使用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()
配置键
如果使用“mystorage.”作为前缀,则为INI文件示例:
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
另一个使用localmem的ini文件:
mystorage.engine = storagedef.engines.localmemory:LocalMemoryStorageEngine
更改历史记录
0.1-2015-05-09
- 初次发布