Skip to main content

Python package to handle multiple files with environment variables.

Project description

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}.
NAME_ENV_VAR_1=my_var_1
NAME_ENV_VAR_2=my_var_2
from izienv import BaseEnv, load_env_var, load_izienv

class MyEnv(BaseEnv):
    @property
    @load_env_var()
    def VAR_1(self) -> str:
        return "VAR_1"
    
    @property
    @load_env_var()
    def VAR_2(self) -> str:
        return "VAR_2"

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.VAR_1)
print(env.VAR_2)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

izienv-0.0.5.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

izienv-0.0.5-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file izienv-0.0.5.tar.gz.

File metadata

  • Download URL: izienv-0.0.5.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for izienv-0.0.5.tar.gz
Algorithm Hash digest
SHA256 6ae4ec005dc7835b82da1931f82d0a6f0ad0d6308f0c4b7b1953bf9037977ceb
MD5 48de70783ce6e3ce33a0b88204e09c08
BLAKE2b-256 ee81963965e284c930cc8cac823188573c1e706eba6f0d42499dc564387d9ad7

See more details on using hashes here.

File details

Details for the file izienv-0.0.5-py3-none-any.whl.

File metadata

  • Download URL: izienv-0.0.5-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.12.4

File hashes

Hashes for izienv-0.0.5-py3-none-any.whl
Algorithm Hash digest
SHA256 6affdc9f1071a1103bd8bdaad898c07c05219d112145eb4715ef5cefd9646f1c
MD5 cce0cda00a75a2207a73320273d1fe71
BLAKE2b-256 cfc52f31a5ba33018a6e46cc9df3fa21e74d4fa41fa1e1f39a08e4a5a99ecde7

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page