jsonjinja


Namejsonjinja JSON
Version 0.8.1 PyPI version JSON
download
home_pageNone
SummaryJinja2 Templating with JSON
upload_time2024-10-07 12:43:59
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseNone
keywords jinja2 json template templating
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # jsonjinja

Jinja2 Templating with JSON files

## Example

`example.txt.jinja`:

```
{{ text }}

```

`example.json`:

```json
{
    "text": "Hello, world."
}
```

You run:

```console
$ jsonjinja -o result.txt example.txt.jinja example.json
```

Then you get `result.txt`:

```
Hello, world.

```

## Install

```console
$ pip install jsonjinja
```


## Usage


```
usage: jsonjinja [-h] [-i IMPORT_NAME] [-o OUTPUT] template_file [json_files ...]

positional arguments:
  template_file         Jinja2 template file
  json_files            JSON files loaded to the context (top-level object must be a dictionary)

optional arguments:
  -h, --help            show this help message and exit
  -i IMPORT_NAME, --import IMPORT_NAME
                        import Python module to the context (can be put multiple times)
  -o OUTPUT, --output OUTPUT
                        output file name
```

Installed `jsonjinja` command runs `main` function of `jsonjinja.py`, which is
the sole entire content of the module.

You can copy `jsonjinja.py` and add it to your project freely.  See the License
section bellow.

## References

- [Template Designer Documentation — Jinja Documentation (3.1.x)][1]
- [JSON][2]

[1]:https://jinja.palletsprojects.com/en/3.1.x/templates/
[2]:https://www.json.org/

## License

jsonjinja is marked with CC0 1.0. To view a copy of
this license, visit <https://creativecommons.org/publicdomain/zero/1.0/>.

(In other words, public domain.)

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "jsonjinja",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "jinja2, json, template, templating",
    "author": null,
    "author_email": "Masaaki Shibata <mshibata@emptypage.jp>",
    "download_url": "https://files.pythonhosted.org/packages/74/ec/c4c2aa74a849b8d55e4bab215345689f34bfdea62a2c41f6817ed98a07e1/jsonjinja-0.8.1.tar.gz",
    "platform": null,
    "description": "# jsonjinja\n\nJinja2 Templating with JSON files\n\n## Example\n\n`example.txt.jinja`:\n\n```\n{{ text }}\n\n```\n\n`example.json`:\n\n```json\n{\n    \"text\": \"Hello, world.\"\n}\n```\n\nYou run:\n\n```console\n$ jsonjinja -o result.txt example.txt.jinja example.json\n```\n\nThen you get `result.txt`:\n\n```\nHello, world.\n\n```\n\n## Install\n\n```console\n$ pip install jsonjinja\n```\n\n\n## Usage\n\n\n```\nusage: jsonjinja [-h] [-i IMPORT_NAME] [-o OUTPUT] template_file [json_files ...]\n\npositional arguments:\n  template_file         Jinja2 template file\n  json_files            JSON files loaded to the context (top-level object must be a dictionary)\n\noptional arguments:\n  -h, --help            show this help message and exit\n  -i IMPORT_NAME, --import IMPORT_NAME\n                        import Python module to the context (can be put multiple times)\n  -o OUTPUT, --output OUTPUT\n                        output file name\n```\n\nInstalled `jsonjinja` command runs `main` function of `jsonjinja.py`, which is\nthe sole entire content of the module.\n\nYou can copy `jsonjinja.py` and add it to your project freely.  See the License\nsection bellow.\n\n## References\n\n- [Template Designer Documentation \u2014 Jinja Documentation (3.1.x)][1]\n- [JSON][2]\n\n[1]:https://jinja.palletsprojects.com/en/3.1.x/templates/\n[2]:https://www.json.org/\n\n## License\n\njsonjinja is marked with CC0 1.0. To view a copy of\nthis license, visit &lt;https://creativecommons.org/publicdomain/zero/1.0/&gt;.\n\n(In other words, public domain.)\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Jinja2 Templating with JSON",
    "version": "0.8.1",
    "project_urls": {
        "Repository": "https://bitbucket.org/emptypage/jsonjinja/"
    },
    "split_keywords": [
        "jinja2",
        " json",
        " template",
        " templating"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5f5a6a18f7a0407385a37d418c5b8265d24ad782775d366c53989b216b223ba0",
                "md5": "9d87a701a0bce012cfe6186b6ed691d5",
                "sha256": "e47debf3213388fb2b7664c61b7eff6aed1daa430ef31010e8699e4747092edb"
            },
            "downloads": -1,
            "filename": "jsonjinja-0.8.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9d87a701a0bce012cfe6186b6ed691d5",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6448,
            "upload_time": "2024-10-07T12:43:57",
            "upload_time_iso_8601": "2024-10-07T12:43:57.808957Z",
            "url": "https://files.pythonhosted.org/packages/5f/5a/6a18f7a0407385a37d418c5b8265d24ad782775d366c53989b216b223ba0/jsonjinja-0.8.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "74ecc4c2aa74a849b8d55e4bab215345689f34bfdea62a2c41f6817ed98a07e1",
                "md5": "5903fdaa43d51752fbd4824dea9fbfb3",
                "sha256": "fff976427c63fa87dd4a5fbb57cbf5484e53bae2ab8964c77dcfb35b175cda37"
            },
            "downloads": -1,
            "filename": "jsonjinja-0.8.1.tar.gz",
            "has_sig": false,
            "md5_digest": "5903fdaa43d51752fbd4824dea9fbfb3",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 5997,
            "upload_time": "2024-10-07T12:43:59",
            "upload_time_iso_8601": "2024-10-07T12:43:59.308248Z",
            "url": "https://files.pythonhosted.org/packages/74/ec/c4c2aa74a849b8d55e4bab215345689f34bfdea62a2c41f6817ed98a07e1/jsonjinja-0.8.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-07 12:43:59",
    "github": false,
    "gitlab": false,
    "bitbucket": true,
    "codeberg": false,
    "bitbucket_user": "emptypage",
    "bitbucket_project": "jsonjinja",
    "lcname": "jsonjinja"
}
        
Elapsed time: 1.04389s