jjtemplate


Namejjtemplate JSON
Version 0.9.0 PyPI version JSON
download
home_pageNone
SummaryJinja2 Templating with JSON files
upload_time2024-10-14 04:47:04
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.
            # jjtemplate

Jinja2 Templating with JSON files

## Example

`example.txt.jinja`:

```
Hello, {{ name }}.

```

`example.json`:

```json
{
    "name": "world"
}
```

You run:

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

Then you get `result.txt`:

```
Hello, world.

```

## Install

```console
$ pip install jjtemplate
```


## Usage


```
usage: jjtemplate [-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 `jjtemplate` command runs `main` function of `jjtemplate.py`, which
is the sole entire content of the module.

You can copy `jjtemplate.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

jjtemplate 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": "jjtemplate",
    "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/48/02/614fd08fc35318696434b14f2cadc063bf45cbbac29e02af1c5775656879/jjtemplate-0.9.0.tar.gz",
    "platform": null,
    "description": "# jjtemplate\n\nJinja2 Templating with JSON files\n\n## Example\n\n`example.txt.jinja`:\n\n```\nHello, {{ name }}.\n\n```\n\n`example.json`:\n\n```json\n{\n    \"name\": \"world\"\n}\n```\n\nYou run:\n\n```console\n$ jjtemplate -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 jjtemplate\n```\n\n\n## Usage\n\n\n```\nusage: jjtemplate [-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\n                        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\n                        multiple times)\n  -o OUTPUT, --output OUTPUT\n                        output file name\n```\n\nInstalled `jjtemplate` command runs `main` function of `jjtemplate.py`, which\nis the sole entire content of the module.\n\nYou can copy `jjtemplate.py` and add it to your project freely.  See the\nLicense section 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\njjtemplate 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 files",
    "version": "0.9.0",
    "project_urls": {
        "Repository": "https://bitbucket.org/emptypage/jjtemplate/"
    },
    "split_keywords": [
        "jinja2",
        " json",
        " template",
        " templating"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "36f310084b790c2958408d686de95a5cf4c45b7883d3b389495c9f8ee9f059f8",
                "md5": "d8fb166a555812955141e62a487d1956",
                "sha256": "b28072163edd3b5d5f0119bf77e27c0dadd43e22c4980416445fd917ed34c9e1"
            },
            "downloads": -1,
            "filename": "jjtemplate-0.9.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "d8fb166a555812955141e62a487d1956",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 6476,
            "upload_time": "2024-10-14T04:47:02",
            "upload_time_iso_8601": "2024-10-14T04:47:02.154758Z",
            "url": "https://files.pythonhosted.org/packages/36/f3/10084b790c2958408d686de95a5cf4c45b7883d3b389495c9f8ee9f059f8/jjtemplate-0.9.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4802614fd08fc35318696434b14f2cadc063bf45cbbac29e02af1c5775656879",
                "md5": "b96d57f7cd9e7afd04512602445276c8",
                "sha256": "a92c2ed8bd645b725c5f19871bd16d1d3c3a62513dd271a7b3ffc569d7e22300"
            },
            "downloads": -1,
            "filename": "jjtemplate-0.9.0.tar.gz",
            "has_sig": false,
            "md5_digest": "b96d57f7cd9e7afd04512602445276c8",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 6015,
            "upload_time": "2024-10-14T04:47:04",
            "upload_time_iso_8601": "2024-10-14T04:47:04.008326Z",
            "url": "https://files.pythonhosted.org/packages/48/02/614fd08fc35318696434b14f2cadc063bf45cbbac29e02af1c5775656879/jjtemplate-0.9.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-14 04:47:04",
    "github": false,
    "gitlab": false,
    "bitbucket": true,
    "codeberg": false,
    "bitbucket_user": "emptypage",
    "bitbucket_project": "jjtemplate",
    "lcname": "jjtemplate"
}
        
Elapsed time: 0.74293s