Python package to handle multiple files with environment variables.
- TODO: Ver si puedo instalarlo en global para manejar las variables dentro de arch.
Quickstart
- Crear folder
.envs/en la raiz del proyecto.
cd /path/to/project
mkdir -p .envs
touch .envs/name_env.env
- Editar las variables de entorno, deberán llamarse
{NAME_ENV}_{VAR}.
SIMPLE_VAR=my_cats_are_beautiful
NAME_ENV_SOME_STRING=my_var_1
NAME_ENV_SOME_PATH=/path/to/data
from izienv import BaseEnv, load_env_var, load_izienv
class MyEnv(BaseEnv):
@property
@load_env_var_str()
def SIMPLE_VAR(self) -> str:
return "SIMPLE_VAR"
@property
@load_env_var_str(name_left=True) # Set name_left to add the `NAME_ENV` to the variable.
def SOME_STRING(self) -> str:
return "SOME_STRING"
@property
@load_env_var_path(name_left=True) # Set name_left to add the `NAME_ENV` to the variable.
def SOME_PATH(self) -> str:
return "SOME_PATH"
NAME = 'name_env'
load_izienv(name=NAME, path_envs=Path(".envs"))
# You need .envs/ folder with envs. Or set `path_envs`.
env = MyEnv(name=NAME)
print(env.SIMPLE_VAR)
print(env.SOME_STRING)
print(env.SOME_PATH)
Metadata
Release files for izienv 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| izienv-0.1.2.tar.gz | 3.7 kB | Without provenance | Details for izienv-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| izienv-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for izienv-0.1.2-py3-none-any.whl |
Total release size: 8.0 kB
Release files / izienv-0.1.2.tar.gz
| Download URL | izienv-0.1.2.tar.gz |
|---|---|
| Size | 3.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
abe0961463964d926c3191ad08078ed39f2093355caef55ed499f6637dffab54
|
|
BLAKE2b-256 checksum How to use checksums |
1fa0d5be5a8738b591e1ca7b301512d39c4213550c7770123de9ccfb00d806ce
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Release files / izienv-0.1.2-py3-none-any.whl
| Download URL | izienv-0.1.2-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
900d927034082548bc25e7c5926ccc741ea3120328cebf23bf03b02a3765e40c
|
|
BLAKE2b-256 checksum How to use checksums |
3301a8e7c3648b9f30ecdd50307796fbcab1a0f68aa2373bb02d2aef20d9aecc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.4
|
Security for izienv 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.