{"id":18666729,"url":"https://github.com/johnmai-dev/Jinja","last_synced_at":"2025-04-11T23:33:04.946Z","repository":{"id":228828895,"uuid":"775028253","full_name":"johnmai-dev/Jinja","owner":"johnmai-dev","description":"A minimalistic Swift implementation of the Jinja templating engine, specifically designed for parsing and rendering ML chat templates.","archived":false,"fork":false,"pushed_at":"2025-01-27T05:07:20.000Z","size":156,"stargazers_count":47,"open_issues_count":0,"forks_count":7,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-04-10T20:24:10.326Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Swift","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johnmai-dev.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}},"created_at":"2024-03-20T16:22:34.000Z","updated_at":"2025-03-14T09:20:38.000Z","dependencies_parsed_at":"2024-03-30T12:22:19.664Z","dependency_job_id":"20e8c180-6d94-4ec5-89b8-a5c11acc3265","html_url":"https://github.com/johnmai-dev/Jinja","commit_stats":null,"previous_names":["maiqingqiang/jinja","johnmai-dev/jinja"],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnmai-dev%2FJinja","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnmai-dev%2FJinja/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnmai-dev%2FJinja/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johnmai-dev%2FJinja/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johnmai-dev","download_url":"https://codeload.github.com/johnmai-dev/Jinja/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248495755,"owners_count":21113693,"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":[],"created_at":"2024-11-07T08:33:46.015Z","updated_at":"2025-04-11T23:32:59.985Z","avatar_url":"https://github.com/johnmai-dev.png","language":"Swift","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Jinja\nA minimalistic Swift implementation of the Jinja templating engine, specifically designed for parsing and rendering ML chat templates.\n\n## SwiftPM\n\nTo use `Jinja` with SwiftPM, you can add this to your `Package.swift`:\n\n```\ndependencies: [\n    .package(url: \"https://github.com/maiqingqiang/Jinja\", branch: \"main\")\n]\n```\n\nAnd then, add the Transformers library as a dependency to your target:\n\n```\ntargets: [\n    .target(\n        name: \"YourTargetName\",\n        dependencies: [\n            .product(name: \"Jinja\", package: \"Jinja\")\n        ]\n    )\n]\n```\n\n## Usage\n\n```swift\nimport Jinja\n\nlet template = \"\"\"\n{% for item in items %}\n{{ item }}\n{% endfor %}\n\"\"\"\n\nlet context = [\n    \"items\": [\n        \"item1\", \n        \"item2\", \n        \"item3\"\n    ]\n]\n\nlet result = try Template(template).render(context)\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnmai-dev%2FJinja","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohnmai-dev%2FJinja","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohnmai-dev%2FJinja/lists"}