alkivi使用的python配置管理器
alkivi-config-manager的Python项目详细描述
alkivi使用的python配置管理器
包装
示例
像这样写一个conf
[default]; general configuration: default endpointendpoint=dev[dev]; configuration specific to 'dev' endpointenv=dev[prod]; configuration specific to 'prod' endpointenv=prod
fromalkivi.configimportConfigManagerconfig=ConfigManager('test')# This will look for several files, in order# 1. Current working directory: ``./test.conf``# 2. Current user's home directory ``~/.test.conf``# 3. System wide configuration ``/etc/test.conf``# Then find the endpointendpoint=config.get('default',endpoint)# Or use a specific oneendpoint='prod'# And thenenv=config.get(endpoint,'env')
参数
测试
使用pytest设置测试,覆盖率为 使用pytest cov插件处理。
使用根目录中的py.test运行测试。
覆盖率默认运行,并在pytest.ini文件中设置。看 覆盖率的HTML输出在运行 测验。
待办事项
特拉维斯ci
有一个.travis.yml文件被设置为运行您的测试 如果您选择使用Python2.7和Python3.2。
待办事项