external-variables-0.2.1
توضیحات
A simple way to use enviroment configurations.
| ویژگی | مقدار |
|---|---|
| سیستم عامل | OS Independent |
| نام فایل | external-variables-0.2.1 |
| نام | external-variables |
| نسخه کتابخانه | 0.2.1 |
| نگهدارنده | [] |
| ایمیل نگهدارنده | [] |
| نویسنده | Davi Mello |
| ایمیل نویسنده | dsmello.9@gmail.com |
| آدرس صفحه اصلی | https://github.com/Combofoods/pyenv |
| آدرس اینترنتی | https://pypi.org/project/external-variables/ |
| مجوز | GPL |
## A simple python module to help to handle with ENV variables and files with paramters ( .env, .config, .properties ...)
## Installing
```
pip install external-variables
```
## Usage
```
from envpy import get_variables
get_variables(readFile:bool=True, requiredFile:bool=False, readOS:bool=True, filepath:str=f'{os.getcwd()}', filename:str='.env', prefix:str='')
```
The method *get_variables* will read the variables from a 'enviroment file' and/or 'enviroment vars' from host system.
The normal behaivior is the method will try to read a 'console current path .env file' if exist and after will check on host if had any enviroment variable with the same name and overide de file value.
Can be change if a enviroment file is or not required. If required will raise a error if the file was not found.
If the readFile or readOS is False the method will ignore the override step.
Also the values can be filter by the use of prefix.
نحوه نصب
نصب پکیج whl external-variables-0.2.1:
pip install external-variables-0.2.1.whl
نصب پکیج tar.gz external-variables-0.2.1:
pip install external-variables-0.2.1.tar.gz