temv


Nametemv JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA tool for templating .env files.
upload_time2025-02-21 01:44:07
maintainerNone
docs_urlNone
authorBen Trinh
requires_python<4.0,>=3.12
licenseNone
keywords template management jinja2 secrets dotenv .env
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Secret Template Renderer

This project is a Jinja template renderer that supports fetching secrets from various providers.

## Features

- Load built-in and user-defined plugins to extend the functionality
- Register multiple secret providers
- Render Jinja templates with secrets

## Installation

### Using pip

1. Clone the repository
2. Install the required dependencies

   ```bash
   pip install -r requirements.txt
   ```

### Using pipx

```bash
pipx install temv

```

## Usage

```bash
python app.py -t <template_path> -o <output_path>
```

- `-t`, `--template`: Path to the Jinja template file
- `-o`, `--output`:   Path to the output file

## Custom Plugins

To load custom plugins, place your plugin `.py` files in `~/.config/temv/plugins/`.

Each plugin must have a `register` function that takes a dictionary of secret providers as an argument.

Example:

```python
import subprocess
from collections.abc import Callable


def get_custom_secret(item_name: str, path: str) -> str | None:
    pass


def register(secrets_providers: dict[str, Callable[[str, str], str | None]]):
    """Register the Bitwarden secret provider."""
    secrets_providers["custom_provider"] = get_custom_secret
```

## License

This project is licensed under the MIT License.

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "temv",
    "maintainer": null,
    "docs_url": null,
    "requires_python": "<4.0,>=3.12",
    "maintainer_email": null,
    "keywords": "template, management, jinja2, secrets, dotenv, .env",
    "author": "Ben Trinh",
    "author_email": "huantrinh1802@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/27/b9/5482e0b0d13936fac1b7d24aad3fd0d56751de537824f289efddce7f67f2/temv-0.1.0.tar.gz",
    "platform": null,
    "description": "# Secret Template Renderer\n\nThis project is a Jinja template renderer that supports fetching secrets from various providers.\n\n## Features\n\n- Load built-in and user-defined plugins to extend the functionality\n- Register multiple secret providers\n- Render Jinja templates with secrets\n\n## Installation\n\n### Using pip\n\n1. Clone the repository\n2. Install the required dependencies\n\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n### Using pipx\n\n```bash\npipx install temv\n\n```\n\n## Usage\n\n```bash\npython app.py -t <template_path> -o <output_path>\n```\n\n- `-t`, `--template`: Path to the Jinja template file\n- `-o`, `--output`:   Path to the output file\n\n## Custom Plugins\n\nTo load custom plugins, place your plugin `.py` files in `~/.config/temv/plugins/`.\n\nEach plugin must have a `register` function that takes a dictionary of secret providers as an argument.\n\nExample:\n\n```python\nimport subprocess\nfrom collections.abc import Callable\n\n\ndef get_custom_secret(item_name: str, path: str) -> str | None:\n    pass\n\n\ndef register(secrets_providers: dict[str, Callable[[str, str], str | None]]):\n    \"\"\"Register the Bitwarden secret provider.\"\"\"\n    secrets_providers[\"custom_provider\"] = get_custom_secret\n```\n\n## License\n\nThis project is licensed under the MIT License.\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "A tool for templating .env files.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/huantrinh1802/temv",
        "Issues": "https://github.com/huantrinh1802/temv/issues"
    },
    "split_keywords": [
        "template",
        " management",
        " jinja2",
        " secrets",
        " dotenv",
        " .env"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "413f87b45fad7950a9fdb29052af902070d9b8c5164c551a8f78c17e0fcb43cd",
                "md5": "19a10e1c93c576111de7359c852cdb4f",
                "sha256": "e4c709fd222271be75c2ca834d39048514cf04919d02a43c25fdab904111d578"
            },
            "downloads": -1,
            "filename": "temv-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "19a10e1c93c576111de7359c852cdb4f",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": "<4.0,>=3.12",
            "size": 5632,
            "upload_time": "2025-02-21T01:44:05",
            "upload_time_iso_8601": "2025-02-21T01:44:05.826253Z",
            "url": "https://files.pythonhosted.org/packages/41/3f/87b45fad7950a9fdb29052af902070d9b8c5164c551a8f78c17e0fcb43cd/temv-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "27b95482e0b0d13936fac1b7d24aad3fd0d56751de537824f289efddce7f67f2",
                "md5": "9ade51719ffed82555eccd8ee4d13e4f",
                "sha256": "93e2a33c1d3acb52cf6553ba6a86ec418217961a898f0c0c52d9544ff6edc8f9"
            },
            "downloads": -1,
            "filename": "temv-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "9ade51719ffed82555eccd8ee4d13e4f",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": "<4.0,>=3.12",
            "size": 3498,
            "upload_time": "2025-02-21T01:44:07",
            "upload_time_iso_8601": "2025-02-21T01:44:07.427618Z",
            "url": "https://files.pythonhosted.org/packages/27/b9/5482e0b0d13936fac1b7d24aad3fd0d56751de537824f289efddce7f67f2/temv-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-21 01:44:07",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "huantrinh1802",
    "github_project": "temv",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "temv"
}
        
Elapsed time: 0.42017s