{"id":29790199,"url":"https://github.com/ds-wizard/engine-jinja","last_synced_at":"2025-10-14T09:18:20.661Z","repository":{"id":306259833,"uuid":"1025557995","full_name":"ds-wizard/engine-jinja","owner":"ds-wizard","description":"Jinja rendering engine for use in Wizard projects","archived":false,"fork":false,"pushed_at":"2025-08-15T09:06:36.000Z","size":39,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-09-30T19:54:31.454Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Haskell","has_issues":false,"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/ds-wizard.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-24T12:43:24.000Z","updated_at":"2025-08-15T09:06:19.000Z","dependencies_parsed_at":"2025-07-24T17:45:49.185Z","dependency_job_id":"e673c737-caa3-4d33-8ae1-31f87a6bd869","html_url":"https://github.com/ds-wizard/engine-jinja","commit_stats":null,"previous_names":["ds-wizard/engine-jinja"],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/ds-wizard/engine-jinja","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ds-wizard%2Fengine-jinja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ds-wizard%2Fengine-jinja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ds-wizard%2Fengine-jinja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ds-wizard%2Fengine-jinja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ds-wizard","download_url":"https://codeload.github.com/ds-wizard/engine-jinja/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ds-wizard%2Fengine-jinja/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279018499,"owners_count":26086383,"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","status":"online","status_checked_at":"2025-10-14T02:00:06.444Z","response_time":60,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":[],"created_at":"2025-07-27T23:05:51.520Z","updated_at":"2025-10-14T09:18:20.657Z","avatar_url":"https://github.com/ds-wizard.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# engine-jinja\n\nJinja rendering engine for use in Wizard projects\n\n## Local Build\n\n1. Install dependencies:\n\n```sh\npip install -r requirements.txt\npip install nuitka\n```\n\n2. Build the library from Python source:\n\n```sh\nmake lib-python\n```\n\n3. Build wrapper with C API for FFI:\n\n```sh\nmake lip-wrapper\n```\n\nHere you need to know the Python version you are using, in this case it is Python 3.13. Also, on MacOS you may want to use .dylib instead of .so.\n\n## Runtime\n\nTo use the library, you need to:\n\n1. Have Python runtime installed (matching the version used to build the library).\n2. Copy the built shared library (`.so` and alt. `.dylib` files) to your project directory.\n3. Link to the libraries correctly (using `LD_LIBRARY_PATH` or similar environment variables).\n\n## Interface\n\nThe library provides a C API for rendering Jinja templates. You can use the following functions:\n\n```c\nchar* render_jinja(const char* input_str);\n\nvoid free_string(char* str);\n```\n\nFor simplicity, the function works with JSON-serialized strings:\n\n* `input_str` is a JSON-serialized string containing the Jinja templates and contexts:\n  - `templates`: array of Jinja templates to render (0 to n)\n  - `contexts`: array of contexts (JSON values) passed to templates (0 to n)\n* returns a JSON-serialized string with the rendered templates or error information, list of objects with the following fields:\n  - `ok`: if the rendering was successful\n  - `result`: the rendered template\n  - `message`: the error message if rendering failed\n\nThe iteration works as follows:\n- If there are multiple templates, they are rendered in the order they are provided.\n- For each template, it is rendered with all provided contexts in the order they are given.\n- Thus, there the result is a Cartesian product of templates and contexts.\n\nThe returned string should be freed by the caller using the `free_string` function when no longer needed.\n\n## License\n\nThis project is licensed under the Apache License 2.0. See the [LICENSE](LICENSE) file for details.\n\nWe bundle [Jinja](https://github.com/pallets/jinja) and [MarkupSafe](https://github.com/pallets/markupsafe) dependencies as part of the resulting shared library for convenience. See [NOTICE](NOTICE.md) for more details on the licenses of these components.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fds-wizard%2Fengine-jinja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fds-wizard%2Fengine-jinja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fds-wizard%2Fengine-jinja/lists"}