便捷的环境文件读取
Project description
envx
介绍
环境信息的管理模块
-
使用目录
- Windows 系统
使用目录:C:\env\
- macOS 系统
使用目录:/Users/env/
- Linux 系统
使用目录:/env/
-
文件内容格式
HOST=192.168.0.1
PORT=6379
- 读取结果格式
{
"HOST": "192.168.0.1",
"PORT": "6379"
}
安装教程
- pip安装
pip3 install envx
- pip安装(使用淘宝镜像加速)
pip3 install envx -i https://mirrors.aliyun.com/pypi/simple
使用说明
- demo
import envx
redis_env = envx.read('redis.env')
- DEFAULT_ENV.env
-
一般用来描述当前的环境信息,可以用来标记当前的环境类型
-
开发环境
ENV=DEV
MSG=开发环境
- 测试环境
ENV=TEST
MSG=测试环境
- 开发环境
ENV=PROD
MSG=生产环境
- 缺省详细路径的文件名不区分大小写
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
envx-1.0.0.tar.gz
(3.3 kB
view hashes)
Built Distribution
envx-1.0.0-py3-none-any.whl
(4.2 kB
view hashes)