Skip to main content

A tiny module to read environment variables and tranform them.

Project description

envyronment

A tiny module to read environment variables and tranform them.

When load_dotenv is available, this is called at import time.


Code style: Ruff Typing: Pyright Linting: Pylint License CI Validation


Features

  • ✅ Simple, typed API
  • ✅ Loads .env if installed with extra dotenv
  • ✅ Flexible casting via astype=...
  • ✅ Propagates errors raised in the astype callable
  • ✅ Zero dependencies required, python-dotenv optionally installed

Requirements

  • Python 3.10+ (only 3.13 is tested)

Quick start

  1. Install the package

    pip install envyronment
    

    or

    pip install envyronment[dotenv]  # Ensure python-dotenv is also installed
    
  2. Import and use

    import env
    
    ascii_asterisk = env.read("ASCII_ASTERISK", 42, astype=int)  # typed as int, 42 by default
    debug = env.read("DEBUG", astype=bool)  # typed as bool, required
    

License

This project is licensed under the MIT License — see the LICENSE file for details.

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

envyronment-0.1.1.tar.gz (6.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

envyronment-0.1.1-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

Details for the file envyronment-0.1.1.tar.gz.

File metadata

  • Download URL: envyronment-0.1.1.tar.gz
  • Upload date:
  • Size: 6.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for envyronment-0.1.1.tar.gz
Algorithm Hash digest
SHA256 90cba4659e4d49547943f71dc67a2a3633af28bc972e1a5fb7e5b8e10d4f854e
MD5 6c81776ff587c0e9e4d78b0efec4d53a
BLAKE2b-256 3849d8eb3886cf11297249f47c71e6970b33a3feffc63ae8f9e358625633499e

See more details on using hashes here.

Provenance

The following attestation bundles were made for envyronment-0.1.1.tar.gz:

Publisher: release.yml on shifqu/envyronment

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file envyronment-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: envyronment-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 3.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for envyronment-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 179500d1559ca42fa3338220a91ce2582ee89931b87bb2520743d40f28965720
MD5 38cb15dabf48370d1929c989e345543a
BLAKE2b-256 e1e03ad58379d0b568378477b8ba9153fe901d252e11e4f91c47cc6a2efe7a0e

See more details on using hashes here.

Provenance

The following attestation bundles were made for envyronment-0.1.1-py3-none-any.whl:

Publisher: release.yml on shifqu/envyronment

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

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