JsonEnv allows you to make environment variables with Json, allowing you to write numbers and other types of variables
Project description
English
What is JsonEnv?
JsonEnv is a Python library that allows you to use a json file to create environment variables, allowing you to directly save numbers, lists, booleans, etc. avoiding having to convert the environment variable (which is always returned as a string) to another data type.
How to create an environment class:
from JsonEnv.jsonenv import env
env.load_env("path")
How to get the value of a key from the environment:
env.get('key_name')
How to get all environment:
env.get_env()
How change a key value:
env.change("key_name", "new_value")
Español
Que es JsonEnv?
JsonEnv es una libreria de Python que te permite usar un archivo json para crear variables de entorno, haciendo que puedas guardar directamente numeros, listas, booleanos, etc. evitando tener que convertir la variable de entorno (que siempre son devueltas como cadena) a otro tipo de dato.
Como crear una clase de entorno:
from JsonEnv.jsonenv import env
env.load_env("ruta")
Como conseguir el valor de una llave de entorno:
env.get('nombre_de_la_llave')
Como conseguir todo el entorno:
env.get_env()
Como cambiar el valor de una llave:
env.change("nombre_llave", "nuevo_valor")
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
Built Distribution
File details
Details for the file jsonenv-0.2.1.3.tar.gz
.
File metadata
- Download URL: jsonenv-0.2.1.3.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 98e78dc7011f9f1a7fff23ddc916bc6f4d670fcbb3ad8c41827fc04a338e714f |
|
MD5 | acd43aba11f379b44cba2eb86f533864 |
|
BLAKE2b-256 | c1e6883c5f4bf673f97371f5d171991314ccf049831557b32d9572e5d04d4bc6 |
File details
Details for the file JsonEnv-0.2.1.3-py3-none-any.whl
.
File metadata
- Download URL: JsonEnv-0.2.1.3-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdd1d11df904cc85cded50d6b7bcd87b6191689cb1d2dc2cf2b458dc45144411 |
|
MD5 | 6b4f71b17a5447bd901cf939787a67df |
|
BLAKE2b-256 | ad50f1ad36b718c467fccbd8f589fe1c6abdc23850bc0e709e0b40614b8d27f4 |