Skip to main content

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.

Metadata

Release files for external-variables 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for external-variables 0.2.1
File Size Uploaded
external-variables-0.2.1.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for external-variables 0.2.1
File Interpreter ABI Platform
external_variables-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / external-variables-0.2.1.tar.gz

Download URL external-variables-0.2.1.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
f4e9052095235d231f3b21bcd108cfc05f2c6c63e552364876e0ef9f6d9c6809
BLAKE2b-256 checksum
How to use checksums
4d587807729332b8a532ccddd69c00c370e59245697ae234ad391af54badb51c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

Release files / external_variables-0.2.1-py3-none-any.whl

Download URL external_variables-0.2.1-py3-none-any.whl
Size 4.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
77f1699565d72eed57e1d17f65d63b11971777c33682935bb4c2851fbac4896b
BLAKE2b-256 checksum
How to use checksums
76f97d8e2e2b691ab995034aa47eeabd4989927e9f8c9f185232a97506ec8bae
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.0 CPython/3.8.2

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page