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 (officially supported)

  • Python 3.13

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.0.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.0-py3-none-any.whl (3.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: envyronment-0.1.0.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.0.tar.gz
Algorithm Hash digest
SHA256 e0e33ef5f7e932db6ceb2f1ac8c88f89f2693a13a5fabcdaabe7ac719dd1b828
MD5 3a545622b538a9c0dcae1d4531621223
BLAKE2b-256 7815441d9e45956171e890a3d07d0d04959e315cf3a4f62ba23aaeb835512177

See more details on using hashes here.

Provenance

The following attestation bundles were made for envyronment-0.1.0.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.0-py3-none-any.whl.

File metadata

  • Download URL: envyronment-0.1.0-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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 65a30197344b8a79409d2514f14e7564868f717990a5fcdf24d0453554203695
MD5 1104d1cd699a7b7b74e454dd67e9bacf
BLAKE2b-256 012542e171bebbe0b20d2e24013998e08bae32e938e99394dc8e973201d11791

See more details on using hashes here.

Provenance

The following attestation bundles were made for envyronment-0.1.0-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