REALLY quick(and lazy way) to use the python dot-env project.
Project description
Quikenv
This was wrapper around the python dot-env project at
Here is the pypi release I made:
I really liked the project but wanted something even more lazy. All credit goes to the original developers. I only added features I wanted on top of an already really great project.
This wrapper has the following features:
- A ezload() classmethod that automatically looks for for your .env file in the current working directory and 2 dirs up
import quikenv
env = quikenv.ezload()
var = env.get("my_environment_var")
print(env.environment_variables)
- A proper_load() classmethod that will load this class with a given file path
import quikenv
env_path = "C:/somedir/.env"
env = quikenv.proper_load(env_path)
var = env.get("my_environment_var")
print(env.environment_variables)
- A normal procedural start for the class
import quikenv
env_path = "C:/somedir/.env"
env = quickenv.Quikenv(env_path)
env.load()
var = env.get("my_environment_var")
print(env.environment_variables)
- A lot of safety features (I don't think speed is relevant here):
- Errors out when you give it an invalid file path to the .env file
- Will NOT add values from your computer and will only use values from your .env file
- Errors out when you try to get a value that doesn't exist or has am empty value
- My years of programming has taught me that I'm still stupid enough to do this. You probably are too.
- At least you get told now when something is null/empty instead of spending 2 hours debugging your idiocy.
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
quikenv-1.0.0.tar.gz
(5.4 kB
view details)
Built Distribution
File details
Details for the file quikenv-1.0.0.tar.gz
.
File metadata
- Download URL: quikenv-1.0.0.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5ed1d9ecca523035bc3e2ff10ed27b9cbf37e9c753d7acd490cf275077465a2e |
|
MD5 | a85829d0ce74da5301b33254c7e0e88f |
|
BLAKE2b-256 | 2258cd7d37c5cc35ad30cb7b06e70cfd0842709518fad3501c4b55b5414dd66f |
File details
Details for the file quikenv-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: quikenv-1.0.0-py3-none-any.whl
- Upload date:
- Size: 5.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.10.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08c92f0a24d6211d6e8011b4b9c971e6e996e548646f39047bfde72d3ea11158 |
|
MD5 | 4a46d8772fa21c419d27533a241b4a48 |
|
BLAKE2b-256 | a574885805efdb8f2d7a1e5d480bf0528c5d318b464d1187b71700fd6228a200 |