Skip to main content

Automatically set env-vars at the beginning of every python-process in your in-project virtualenv.

Project description

Testing Linting Read the Docs Codecov PyPi Package MIT License

Installation

Install via uv:

> uv add autoread-dotenv

Or add to your poetry-based project:

> poetry add autoread-dotenv

Install via pip:

> bin/pip install autoread-dotenv

Set up a local development environment

> just install

Usage

The only thing left to do for you is the create a .env in the root of your project.

Registered sitecustomize-entrypoint

The autoread_dotenv.entrypoint-function is registered as a sitecustomize-entrypoint in our pyproject.toml_:

    [project.entry-points.sitecustomize]
    autoread_dotenv = "autoread_dotenv:entrypoint"

Sitecustomize and all its registered entrypoints will be executed at the start of every python-process. For more information, please see sitecustomize-entrypoints

Avoid overriding existing environments variables

By default, your .env-file read by autoread-dotenv will override any pre-existing environment variables. You can avoid this behaviour by setting AUTOREAD_ENFORCE_DOTENV=0.

Compatibility

Python Version PyPI - Implementation

autoread-dotenv works on Python 3.8+, including PyPy3. Tested until Python 3.14.

Notable dependencies

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

autoread_dotenv-1.0.4.tar.gz (7.0 kB view details)

Uploaded Source

Built Distribution

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

autoread_dotenv-1.0.4-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file autoread_dotenv-1.0.4.tar.gz.

File metadata

  • Download URL: autoread_dotenv-1.0.4.tar.gz
  • Upload date:
  • Size: 7.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"AlmaLinux","version":"9.7","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for autoread_dotenv-1.0.4.tar.gz
Algorithm Hash digest
SHA256 e36a271e1fb4e93dfd99cd7fc8aa9ff8347a1e1b7b7b0952aac1bf45d576309e
MD5 5e95d3e0d8c23f570f98cdb9df174f70
BLAKE2b-256 30612e915db9863fec16782ad758c615237a2eeb4a45451c8f9aaef7b8b77bdb

See more details on using hashes here.

File details

Details for the file autoread_dotenv-1.0.4-py3-none-any.whl.

File metadata

  • Download URL: autoread_dotenv-1.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.26 {"installer":{"name":"uv","version":"0.9.26","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"AlmaLinux","version":"9.7","id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for autoread_dotenv-1.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 259bf78a376094f968cd7405b5b15ec77379eeb85ddb783be03a021c4c4d89eb
MD5 e4554a6beba02f9a9124618ec8267a52
BLAKE2b-256 8714e6faa86791cefca2451fccda672498193591c8a21ee11d48339cc99d4062

See more details on using hashes here.

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