[![Testing](https://img.shields.io/github/actions/workflow/status/libranet/autoread-dotenv/testing.yaml?branch=main&longCache=true&style=flat-square&label=tests&logo=GitHub%20Actions&logoColor=fff")](https://github.com/libranet/autoread-dotenv/actions/workflows/testing.yaml)
[![Linting](https://img.shields.io/github/actions/workflow/status/libranet/autoread-dotenv/linting.yaml?branch=main&longCache=true&style=flat-square&label=linting&logo=GitHub%20Actions&logoColor=fff")](https://github.com/libranet/autoread-dotenv/actions/workflows/linting.yaml)
[![Read the Docs](https://readthedocs.org/projects/autoread-dotenv/badge/?version=latest)](https://autoread-dotenv.readthedocs.io/en/latest/)
[![Codecov](https://codecov.io/gh/libranet/autoread-dotenv/branch/main/graph/badge.svg?token=QTOWRXGH61)](https://codecov.io/gh/libranet/autoread-dotenv)
[![PyPi Package](https://img.shields.io/pypi/v/autoread-dotenv?color=%2334D058&label=pypi%20package)](https://pypi.org/project/autoread-dotenv/)
[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/libranet/autoread-dotenv/blob/main/docs/license.md)
## Installation
Install via pip:
```bash
> bin/pip install autoread-dotenv
```
Or add to your poetry-based project:
```bash
> poetry add autoread-dotenv
```
## 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_:
``` toml
[tool.poetry.plugins]
[tool.poetry.plugins."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](http://pypi.python.org/pypi/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](https://img.shields.io/pypi/pyversions/autoread-dotenv?:alt:PyPI-PythonVersion)](https://pypi.org/project/autoread-dotenv/)
[![PyPI - Implementation](https://img.shields.io/pypi/implementation/autoread-dotenv?:alt:PyPI-Implementation)](https://pypi.org/project/autoread-dotenv/)
``autoread-dotenv`` works on Python 3.8+, including PyPy3. Tested until Python 3.11,
## Notable dependencies
- [sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)
- [python-dotenv](http://pypi.python.org/pypi/python-dotenv)
Raw data
{
"_id": null,
"home_page": "https://github.com/libranet/autoread-dotenv",
"name": "autoread-dotenv",
"maintainer": "Wouter Vanden Hove",
"docs_url": null,
"requires_python": ">=3.8.0",
"maintainer_email": "wouter@libranet.eu",
"keywords": "entrypoints, dotenv, sitecustomize",
"author": "Wouter Vanden Hove",
"author_email": "wouter@libranet.eu",
"download_url": "https://files.pythonhosted.org/packages/9f/11/5323e4f66787eba9e64c72d83b2da56b5b31fd9bff42c5c6fc60971fe25c/autoread_dotenv-1.0.3.tar.gz",
"platform": null,
"description": "[![Testing](https://img.shields.io/github/actions/workflow/status/libranet/autoread-dotenv/testing.yaml?branch=main&longCache=true&style=flat-square&label=tests&logo=GitHub%20Actions&logoColor=fff\")](https://github.com/libranet/autoread-dotenv/actions/workflows/testing.yaml)\n[![Linting](https://img.shields.io/github/actions/workflow/status/libranet/autoread-dotenv/linting.yaml?branch=main&longCache=true&style=flat-square&label=linting&logo=GitHub%20Actions&logoColor=fff\")](https://github.com/libranet/autoread-dotenv/actions/workflows/linting.yaml)\n[![Read the Docs](https://readthedocs.org/projects/autoread-dotenv/badge/?version=latest)](https://autoread-dotenv.readthedocs.io/en/latest/)\n[![Codecov](https://codecov.io/gh/libranet/autoread-dotenv/branch/main/graph/badge.svg?token=QTOWRXGH61)](https://codecov.io/gh/libranet/autoread-dotenv)\n[![PyPi Package](https://img.shields.io/pypi/v/autoread-dotenv?color=%2334D058&label=pypi%20package)](https://pypi.org/project/autoread-dotenv/)\n[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/libranet/autoread-dotenv/blob/main/docs/license.md)\n\n\n\n## Installation\n\nInstall via pip:\n\n```bash\n> bin/pip install autoread-dotenv\n```\n\nOr add to your poetry-based project:\n\n```bash\n> poetry add autoread-dotenv\n```\n\n\n## Usage\n\nThe only thing left to do for you is the create a ``.env`` in the root of your project.\n\n\n## Registered sitecustomize-entrypoint\n\nThe ``autoread_dotenv.entrypoint``-function is registered as a ``sitecustomize``-entrypoint in our pyproject.toml_:\n\n``` toml\n [tool.poetry.plugins]\n [tool.poetry.plugins.\"sitecustomize\"]\n autoread_dotenv = \"autoread_dotenv:entrypoint\"\n```\n\nSitecustomize and all its registered entrypoints will be executed at the start of *every* python-process.\nFor more information, please see [sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)\n\n\n## Avoid overriding existing environments variables\n\nBy default, your .env-file read by ``autoread-dotenv`` will override any pre-existing environment variables.\nYou can avoid this behaviour by setting ``AUTOREAD_ENFORCE_DOTENV=0``.\n\n\n## Compatibility\n\n [![Python Version](https://img.shields.io/pypi/pyversions/autoread-dotenv?:alt:PyPI-PythonVersion)](https://pypi.org/project/autoread-dotenv/)\n [![PyPI - Implementation](https://img.shields.io/pypi/implementation/autoread-dotenv?:alt:PyPI-Implementation)](https://pypi.org/project/autoread-dotenv/)\n\n``autoread-dotenv`` works on Python 3.8+, including PyPy3. Tested until Python 3.11,\n\n\n## Notable dependencies\n\n- [sitecustomize-entrypoints](http://pypi.python.org/pypi/sitecustomize-entrypoints)\n- [python-dotenv](http://pypi.python.org/pypi/python-dotenv)\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Automatically set env-vars at the beginning of every python-process in your in-project virtualenv.",
"version": "1.0.3",
"project_urls": {
"Bug Tracker": "https://github.com/libranet/autoread-dotenv/issues",
"Docs": "https://autoread-dotenv.readthedocs.io",
"Documentation": "https://autoread-dotenv.readthedocs.io",
"Homepage": "https://github.com/libranet/autoread-dotenv",
"Repository": "https://github.com/libranet/autoread-dotenv"
},
"split_keywords": [
"entrypoints",
" dotenv",
" sitecustomize"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "62ef301b3c11c93bcc59085e0abd2378d49dab7138950711660fa4ab6cd27685",
"md5": "f149d35c57e2757e866c0fa6cc6ecf7a",
"sha256": "cd7292b178b2e65c4611fd872b720612997b19ece909b62e3dd3565d9e560c0a"
},
"downloads": -1,
"filename": "autoread_dotenv-1.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "f149d35c57e2757e866c0fa6cc6ecf7a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8.0",
"size": 4402,
"upload_time": "2025-01-15T09:52:33",
"upload_time_iso_8601": "2025-01-15T09:52:33.701402Z",
"url": "https://files.pythonhosted.org/packages/62/ef/301b3c11c93bcc59085e0abd2378d49dab7138950711660fa4ab6cd27685/autoread_dotenv-1.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "9f115323e4f66787eba9e64c72d83b2da56b5b31fd9bff42c5c6fc60971fe25c",
"md5": "2c493c8fb99729c967573ae1eb8579d2",
"sha256": "809f2be634cd8e998e23d90829e615d2798f66ac1b36b5794d701fcce6b2a094"
},
"downloads": -1,
"filename": "autoread_dotenv-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "2c493c8fb99729c967573ae1eb8579d2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8.0",
"size": 5985,
"upload_time": "2025-01-15T09:52:36",
"upload_time_iso_8601": "2025-01-15T09:52:36.571516Z",
"url": "https://files.pythonhosted.org/packages/9f/11/5323e4f66787eba9e64c72d83b2da56b5b31fd9bff42c5c6fc60971fe25c/autoread_dotenv-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-15 09:52:36",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "libranet",
"github_project": "autoread-dotenv",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "autoread-dotenv"
}