Skip to main content

EasyWorkEnv

The simplest way to manage environment variables in Python.

PyPI version Python License: GPL v3

Load .env, .json, and .yaml config files in one line of code. Access your variables with clean dot notation — no more os.getenv() boilerplate.


Why EasyWorkEnv?

Managing environment variables in Python shouldn't be painful. Most solutions either force you into a single file format, require verbose syntax, or lack support for nested configurations.

EasyWorkEnv solves this by providing:

  • Multi-format support — .env, .json, and .yaml out of the box
  • Dot notation access — config.DATABASE.HOST instead of config["DATABASE"]["HOST"]
  • Nested configuration — structure your settings with unlimited depth
  • Zero config — just point to your file, it works
  • Lightweight — only one dependency (PyYAML)
  • Python 3.8+ compatible

Installation

pip install easyworkenv

Quick Start

from EasyWorkEnv import Config

config = Config(".env")

# Access your variables directly as attributes
print(config.API_KEY)
print(config.DATABASE_URL)

That's it. One import, one line of setup.


Usage Examples

.env file

# .env
APP_NAME=MyApp
SECRET_KEY=super-secret-value
DEBUG=true
DATABASE_URL=postgresql://localhost:5432/mydb
from EasyWorkEnv import Config

config = Config(".env")

print(config.APP_NAME)       # "MyApp"
print(config.SECRET_KEY)     # "super-secret-value"
print(config.DATABASE_URL)   # "postgresql://localhost:5432/mydb"

.json file (with nested config)

{
  "APP_NAME": "MyApp",
  "DATABASE": {
    "HOST": "localhost",
    "PORT": 5432,
    "NAME": "mydb"
  },
  "API_KEY": "sk-abc123"
}
from EasyWorkEnv import Config

config = Config("config.json")

print(config.APP_NAME)        # "MyApp"
print(config.DATABASE.HOST)   # "localhost"
print(config.DATABASE.PORT)   # 5432
print(config.API_KEY)         # "sk-abc123"

.yaml file (with nested config)

# config.yaml
APP_NAME: MyApp
DATABASE:
  HOST: localhost
  PORT: 5432
  NAME: mydb
REDIS:
  URL: redis://localhost:6379
from EasyWorkEnv import Config

config = Config("config.yaml")

print(config.APP_NAME)        # "MyApp"
print(config.DATABASE.HOST)   # "localhost"
print(config.REDIS.URL)       # "redis://localhost:6379"

Supported File Formats

Format Extension Nested Config Comments
dotenv .env No Yes
JSON .json Yes No
YAML .yaml Yes Yes

Contributing

Contributions are welcome! If you'd like to help improve EasyWorkEnv:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Commit your changes (git commit -m "Add my feature")
  4. Push to the branch (git push origin feature/my-feature)
  5. Open a Pull Request

License

This project is licensed under the GNU General Public License v3.0 — see the LICENSE file for details.


Made by Hugo Galley

Release files for easyworkenv 0.3.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for easyworkenv 0.3.7
File Size Uploaded
easyworkenv-0.3.7.tar.gz 16.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for easyworkenv 0.3.7
File Interpreter ABI Platform
easyworkenv-0.3.7-py3-none-any.whl Python 3 none any Details

Total release size: 32.2 kB

Release files / easyworkenv-0.3.7.tar.gz

Download URL easyworkenv-0.3.7.tar.gz
Size 16.0 kB
Tags Source
SHA-256 checksum
How to use checksums
31a40f36082d9db5ff06560e46b51d4047afbfc3ab16b3285c80b93ba84459d2
BLAKE2b-256 checksum
How to use checksums
ecb7c933c8e2ce18f80d0ce6fc0b7cc60c947a9bbf139048c9c4b808e2c13e8a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release files / easyworkenv-0.3.7-py3-none-any.whl

Download URL easyworkenv-0.3.7-py3-none-any.whl
Size 16.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5f5e94764f255923dad2b8b5cbe64e1c64f3a8007d2fa4fb7dbcd3428bdb7831
BLAKE2b-256 checksum
How to use checksums
62d94b7067e5b30cc8304fa61d700ee8c34c337dcd1d10887213f52717a2326f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

0.3.7 This release

2 release files

0.3.6

2 release files

0.3.5

2 release files

0.3.4

2 release files

0.3.3

2 release files

0.3.2

2 release files

0.3.1

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page