as_envhelper
A simple, powerful, and beginner-friendly environment variable loader for Python.
Read key-value pairs from a .env file and set them as environment variables.
Built by ASWIN KUMAR K.
🚀 Installation
pip install as_envhelper
⚡ Usage
Basic usage
from as_envhelper import load_env, get_env
# Load variables from a .env file
load_env(".env")
# Access a variable
db_user = get_env("DB_USER")
print("Database User:", db_user)
Get all environment variables as a dictionary
from as_envhelper import env_to_dict
env_dict = env_to_dict()
print(env_dict)
🐍 Flask Integration
from flask import Flask
from as_envhelper import apply_to_flask
app = Flask(__name__)
# Load .env variables and apply to Flask config
apply_to_flask(app, ".env")
print(app.config["DB_USER"])
🐍 Django Integration
# In your Django settings.py
from as_envhelper import apply_to_django_settings
import sys
# Apply .env variables to Django settings module
apply_to_django_settings(sys.modules[__name__], ".env")
print(DB_USER)
✨ Features
- Easy
.envfile loading - Safe variable access with optional type casting and validation
- Enterprise-ready (regex, numeric ranges, choices)
- Multiline and nested variable support (basic)
- Flask and Django integration
- Works on all major OS
⚠️ Limitations
- Advanced multiline parsing may be limited
- Direct overwrite of OS environment variables if same keys exist
- Users must manually create
.envfiles - Less community adoption initially (new library)
👨💻 Author
ASWIN KUMAR K
Email: aswinkumar06k@gmail.com
GitHub: https://github.com/Aswin-Kumar24072003/as_envhelper
📄 License
GPLv3 – See LICENSE file for details
Metadata
Release files for as-envhelper 1.0.3
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 | |
|---|---|---|---|---|
| as_envhelper-1.0.3.tar.gz | 8.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| as_envhelper-1.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.9 kB
Release files / as_envhelper-1.0.3.tar.gz
| Download URL | as_envhelper-1.0.3.tar.gz |
|---|---|
| Size | 8.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
93f3c821f35677974aa24a1a0e323bbfbcf53f67f5c6b992cb57f04f944f8ee2
|
|
BLAKE2b-256 checksum How to use checksums |
67c29c4d7758b9218830bb1f09d7a8ed846a2de30500cb2bd612f572c955dca5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Release files / as_envhelper-1.0.3-py3-none-any.whl
| Download URL | as_envhelper-1.0.3-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7adab4a8956a6cfabe2a93761184714176d9defcc50969ec5e7d8ed7d4056f9a
|
|
BLAKE2b-256 checksum How to use checksums |
521e8d75c5fe236af072a6a1f4da4a1da6c0599b4511eeb94044f9e27c07b0d8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.5
|
Security for as-envhelper 1.0.3
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.