未提供项目描述
项目描述
Bottle配置 - 从文件配置Bottle。
需求
python >= 2.6
安装
Bottle配置 应使用pip安装
pip install bottle_config
用法
该应用程序提供类似于Django设置的配置。
settings.py:
DEBUG = True ANOTHER_OPTION = 'VALUE'
import bottle from bottle_config import config app = bottle.Bottle() app.install(config) # See app.config
import bottle from bottle_config import Config app = bottle.Bottle() app.install(Config('custom.default.module')) # See app.config
使用环境变量 BOTTLE_CONFIG 设置配置模块
BOTTLE_CONFIG=project.config.production python app.py
错误跟踪器
如果您有任何建议、错误报告或烦恼,请通过https://github.com/klen/bottle_config/issues 的问题跟踪器报告。
贡献
起始器的开发发生在github: https://github.com/klen/bottle_config
贡献者
klen (Kirill Klenov)
许可证
在BSD许可证 下许可。