# dotenvplus
Reads key-value pairs from a .env file and supports multiple values with dynamic interpolation.
The values returned by the DotEnv object is treated like a dictionary, so you can use it like a normal dictionary.
Some of the usual dictionary methods are also supported like `.items()`, `.keys()`, `.values()`, etc.
Goal is to make it easy to use environment variables in your code, while also supporting multiple values.
## Installing
> You need **Python >=3.6** to use this library.
```bash
pip install dotenvplus
```
## Usage
```env
# .env
KEY1=value
KEY2=123
KEY3=true
```
```python
# main.py
from dotenvplus import DotEnv
# Create a DotEnv object
env = DotEnv()
>>> <DotEnv data={"KEY1": "value", "KEY2": 123, "KEY3": True}>
# Call it like a dictionary
(env["KEY1"], env["KEY2"], env["KEY3"])
>>> ("value", 123, True)
```
Raw data
{
"_id": null,
"home_page": null,
"name": "dotenvplus",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.6.0",
"maintainer_email": null,
"keywords": "dotenv, env, config, environment, variables, key-value, parser",
"author": null,
"author_email": "AlexFlipnote <root@alexflipnote.dev>",
"download_url": "https://files.pythonhosted.org/packages/17/6b/3a0bbdf5edb29332dbe78a558b1a3fac9f31cee4b27eba805c14b1cefc5c/dotenvplus-0.0.2.tar.gz",
"platform": null,
"description": "# dotenvplus\r\nReads key-value pairs from a .env file and supports multiple values with dynamic interpolation.\r\n\r\nThe values returned by the DotEnv object is treated like a dictionary, so you can use it like a normal dictionary.\r\nSome of the usual dictionary methods are also supported like `.items()`, `.keys()`, `.values()`, etc.\r\n\r\nGoal is to make it easy to use environment variables in your code, while also supporting multiple values.\r\n\r\n## Installing\r\n> You need **Python >=3.6** to use this library.\r\n\r\n```bash\r\npip install dotenvplus\r\n```\r\n\r\n## Usage\r\n```env\r\n# .env\r\nKEY1=value\r\nKEY2=123\r\nKEY3=true\r\n```\r\n\r\n```python\r\n# main.py\r\nfrom dotenvplus import DotEnv\r\n\r\n# Create a DotEnv object\r\nenv = DotEnv()\r\n>>> <DotEnv data={\"KEY1\": \"value\", \"KEY2\": 123, \"KEY3\": True}>\r\n\r\n# Call it like a dictionary\r\n(env[\"KEY1\"], env[\"KEY2\"], env[\"KEY3\"])\r\n>>> (\"value\", 123, True)\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Python library that handles interactions from Discord POST requests.",
"version": "0.0.2",
"project_urls": {
"Homepage": "https://github.com/AlexFlipnote/dotenvplus",
"Repository": "https://github.com/AlexFlipnote/dotenvplus"
},
"split_keywords": [
"dotenv",
" env",
" config",
" environment",
" variables",
" key-value",
" parser"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ea02bac6130623af27bd7d340615956f8458d1d828112dabb9d867268fecb231",
"md5": "7a85af3a4144f13468d023c9382012c8",
"sha256": "c4e42f408637233ed643e2582a2f9fbe07f289720ac69151086305ff975c927c"
},
"downloads": -1,
"filename": "dotenvplus-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7a85af3a4144f13468d023c9382012c8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.6.0",
"size": 4362,
"upload_time": "2024-10-08T16:20:06",
"upload_time_iso_8601": "2024-10-08T16:20:06.578959Z",
"url": "https://files.pythonhosted.org/packages/ea/02/bac6130623af27bd7d340615956f8458d1d828112dabb9d867268fecb231/dotenvplus-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "176b3a0bbdf5edb29332dbe78a558b1a3fac9f31cee4b27eba805c14b1cefc5c",
"md5": "9a64e80475f4e8fe26067ae24eef5004",
"sha256": "b58fe8c720119ecdfc65f05b154dfc1e6421e5dace8f603e3d073ab5340b401d"
},
"downloads": -1,
"filename": "dotenvplus-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "9a64e80475f4e8fe26067ae24eef5004",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.6.0",
"size": 5259,
"upload_time": "2024-10-08T16:20:08",
"upload_time_iso_8601": "2024-10-08T16:20:08.691069Z",
"url": "https://files.pythonhosted.org/packages/17/6b/3a0bbdf5edb29332dbe78a558b1a3fac9f31cee4b27eba805c14b1cefc5c/dotenvplus-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-08 16:20:08",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "AlexFlipnote",
"github_project": "dotenvplus",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "dotenvplus"
}