tenvplate


Nametenvplate JSON
Version 0.0.4 PyPI version JSON
download
home_pageNone
SummaryGenerate .env files from templates and secrets managers
upload_time2024-10-24 14:48:18
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseNone
keywords env dotenv template secret
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # T\<env\>plate

A way to generate `.env` files from a template file using remote sources.

Currently, it supports the following remote sources:

- azure keyvault secrets (assumes the *az cli* is installed and configured)
- kubernetes secrets & configmaps (assumes the *kubectl cli* is installed and configured)

## Usage

1. Install the package. I recommend the use of [uv tool](https://github.com/astral-sh/uv) 
   or [pipx](https://github.com/pypa/pipx) to install it in a global and isolated environment: 

   `uv tool install tenvplate` or `pipx install tenvplate`

2. Create a .env.template with the following format:
   ```env
   # comment, will be ignored
   FIXED=will-be-left-untouched
   ENV_VAR_FROM_K8S_SECRET={{kubernetes/<name-space-name>/secrets/<secret-name>/<secret-field>}}
   ENV_VAR_FROM_K8S_CONFIGMAP={{kubernetes/<name-space-name>/configmaps/<configmap-name>/<configmap-field>}}
   ENV_VAR_FROM_AZURE_KEYVAULT={{azure-keyvault/<keyvault-name>/secrets/<secret-name>}}
   ```

3. Run the following command to generate an environment file simply run `tenvplate`. Optional arguments are:
   - `--src-path` to specify the template file (default `.env.template` in the working directory)
   - `--dst-path` to specify the destination file (default `.env` in the same directory as the template file)


## Contributing
See the [CONTRIBUTING.md](CONTRIBUTING.md) file for more information.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "tenvplate",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "env, dotenv, template, secret",
    "author": null,
    "author_email": "Gabriele Calvo <gcalvo87@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/46/1a/430b8100f9540dc5801b6d59fa469ad2a7e3a4bb04cfb87ff3c4e0391d58/tenvplate-0.0.4.tar.gz",
    "platform": null,
    "description": "# T\\<env\\>plate\n\nA way to generate `.env` files from a template file using remote sources.\n\nCurrently, it supports the following remote sources:\n\n- azure keyvault secrets (assumes the *az cli* is installed and configured)\n- kubernetes secrets & configmaps (assumes the *kubectl cli* is installed and configured)\n\n## Usage\n\n1. Install the package. I recommend the use of [uv tool](https://github.com/astral-sh/uv) \n   or [pipx](https://github.com/pypa/pipx) to install it in a global and isolated environment: \n\n   `uv tool install tenvplate` or `pipx install tenvplate`\n\n2. Create a .env.template with the following format:\n   ```env\n   # comment, will be ignored\n   FIXED=will-be-left-untouched\n   ENV_VAR_FROM_K8S_SECRET={{kubernetes/<name-space-name>/secrets/<secret-name>/<secret-field>}}\n   ENV_VAR_FROM_K8S_CONFIGMAP={{kubernetes/<name-space-name>/configmaps/<configmap-name>/<configmap-field>}}\n   ENV_VAR_FROM_AZURE_KEYVAULT={{azure-keyvault/<keyvault-name>/secrets/<secret-name>}}\n   ```\n\n3. Run the following command to generate an environment file simply run `tenvplate`. Optional arguments are:\n   - `--src-path` to specify the template file (default `.env.template` in the working directory)\n   - `--dst-path` to specify the destination file (default `.env` in the same directory as the template file)\n\n\n## Contributing\nSee the [CONTRIBUTING.md](CONTRIBUTING.md) file for more information.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Generate .env files from templates and secrets managers",
    "version": "0.0.4",
    "project_urls": null,
    "split_keywords": [
        "env",
        " dotenv",
        " template",
        " secret"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "eb9ef3123976beae5cf32760ec2a97e8f8a963f5afd78959107292611cf1a537",
                "md5": "5e002dacb1b54dc140639954328db464",
                "sha256": "dddaa732f8315afa62eef41347c15eb981ceed9f2e659932c6df0df7ae80976e"
            },
            "downloads": -1,
            "filename": "tenvplate-0.0.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "5e002dacb1b54dc140639954328db464",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 8559,
            "upload_time": "2024-10-24T14:48:17",
            "upload_time_iso_8601": "2024-10-24T14:48:17.963615Z",
            "url": "https://files.pythonhosted.org/packages/eb/9e/f3123976beae5cf32760ec2a97e8f8a963f5afd78959107292611cf1a537/tenvplate-0.0.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "461a430b8100f9540dc5801b6d59fa469ad2a7e3a4bb04cfb87ff3c4e0391d58",
                "md5": "4a5a36b91cf9e3264006bc7985d51d2d",
                "sha256": "f8f49450d7ab038ecae47c632b866b8508014d2997472494ef525af46baf1e45"
            },
            "downloads": -1,
            "filename": "tenvplate-0.0.4.tar.gz",
            "has_sig": false,
            "md5_digest": "4a5a36b91cf9e3264006bc7985d51d2d",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 7510,
            "upload_time": "2024-10-24T14:48:18",
            "upload_time_iso_8601": "2024-10-24T14:48:18.815887Z",
            "url": "https://files.pythonhosted.org/packages/46/1a/430b8100f9540dc5801b6d59fa469ad2a7e3a4bb04cfb87ff3c4e0391d58/tenvplate-0.0.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-24 14:48:18",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "tenvplate"
}
        
Elapsed time: 1.64492s