{"id":21061380,"url":"https://github.com/chaudum/j2y","last_synced_at":"2025-05-16T00:34:23.876Z","repository":{"id":53114855,"uuid":"141756576","full_name":"chaudum/j2y","owner":"chaudum","description":"A Jinja2 Template CLI","archived":false,"fork":false,"pushed_at":"2020-11-12T12:59:14.000Z","size":45,"stargazers_count":3,"open_issues_count":3,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-05-13T14:21:25.176Z","etag":null,"topics":["cli","hcl","jinja2","json","python3","yaml"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/chaudum.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGES.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-07-20T20:51:31.000Z","updated_at":"2022-08-04T11:56:15.000Z","dependencies_parsed_at":"2022-09-13T17:01:32.240Z","dependency_job_id":null,"html_url":"https://github.com/chaudum/j2y","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaudum%2Fj2y","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaudum%2Fj2y/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaudum%2Fj2y/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chaudum%2Fj2y/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chaudum","download_url":"https://codeload.github.com/chaudum/j2y/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254394723,"owners_count":22063984,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","hcl","jinja2","json","python3","yaml"],"created_at":"2024-11-19T17:24:12.865Z","updated_at":"2025-05-16T00:34:20.431Z","avatar_url":"https://github.com/chaudum.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==================\nj2y - A Jinja2 CLI\n==================\n\n.. image:: https://travis-ci.org/chaudum/j2y.svg?branch=master\n    :target: https://travis-ci.org/chaudum/j2y\n    :alt: Travis CI\n\n.. image:: https://badge.fury.io/py/j2y.svg\n    :target: http://badge.fury.io/py/j2y\n    :alt: Python Package Index\n\n.. image:: https://img.shields.io/badge/code%20style-black-000000.svg\n    :target: https://github.com/ambv/black\n    :alt: Code Style: Black\n\n|\n\nRender Jinja2 templates on the command line using a YAML_, JSON_ or HCL_ file\nas input for the render context.\n\nInstallation\n============\n\n``j2y`` is installed using ``pip``::\n\n  $ pip install j2y\n\n.. Note::\n\n   The name of this Python package is ``j2y``, but it will be renamed to\n   ``j2-cli`` with the next major release.\n\nAlternatively you can install directly from Github master branch::\n\n  $ pip install git+https://github.com/chaudum/j2y.git@master\n\nUsage\n=====\n\nBy default, the ``j2cli`` command takes a YAML_ file as input::\n\n  $ j2cli template.j2 \u003c values.yaml\n\nAlternatively you can use JSON_ or HCL_ as input format::\n\n  $ j2cli template.j2 -f json \u003c values.json\n  $ j2cli template.j2 -f hcl \u003c values.hcl\n\nIt's also possible to provide multiple input files::\n\n  $ j2cli template.j2 --context v1.yaml --context v2.yaml\n\nRun ``j2cli -h`` to see all available options.\n\nTemplate Variables\n------------------\n\nAdditionally to the variables provided by the input file, ``j2cli`` also\nprovides built-in default variables. These variables are:\n\n:meta.date:\n  Type:  ``datetime``\n\n  Value: Current UTC datetime object\n\n:meta.platform:\n  Type:  ``dict``\n\n  Value: Output of ``platform.uname()``\n\n:env:\n  Type:  ``dict``\n\n  Value: All environment variables (output of ``os.environ``).\n\nLocal Development\n=================\n\nBootstrapping\n-------------\n\nCreate a virtualenv_ and install the package as develop egg::\n\n  $ python -m venv env\n  $ source env/bin/activate\n  (env) $ pip install -e .\n\nTests\n-----\n\nAt the moment there are very simple test cases only. Test are written as\nPython doctests and run using pytest_::\n\n  (env) $ pip install -e \".[test]\"\n  (env) $ pytest\n\nPytest additionally runs the black_ linter and mypy_ static type checker.\n\nDocumentation\n.............\n\nThe tests located in the ``docs/`` folder can also be built into HTML using\nSphinx_::\n\n  (env) $ sphinx-build -E -W docs/ _build/\n\n\n.. _YAML: http://yaml.org/spec/\n.. _JSON: https://www.json.org/\n.. _HCL: https://github.com/hashicorp/hcl\n.. _virtualenv: https://docs.python.org/3/tutorial/venv.html\n.. _pytest: https://docs.pytest.org/en/latest/\n.. _black: https://github.com/ambv/black\n.. _mypy: https://github.com/python/mypy\n.. _Sphinx: http://www.sphinx-doc.org/en/master/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaudum%2Fj2y","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchaudum%2Fj2y","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchaudum%2Fj2y/lists"}