{"id":16916918,"url":"https://github.com/althonos/jinja2-fsloader","last_synced_at":"2025-07-12T15:07:02.315Z","repository":{"id":49132644,"uuid":"166740130","full_name":"althonos/jinja2-fsloader","owner":"althonos","description":"A Jinja2 template loader using PyFilesystem2.","archived":false,"fork":false,"pushed_at":"2021-06-27T13:44:37.000Z","size":27,"stargazers_count":9,"open_issues_count":1,"forks_count":2,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-06-13T04:45:58.075Z","etag":null,"topics":["jinja2","jinja2-extension","loader","pyfilesystem2","python-library","template-engine"],"latest_commit_sha":null,"homepage":"","language":"Python","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/althonos.png","metadata":{"files":{"readme":"README.rst","changelog":"CHANGELOG.rst","contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-01-21T03:06:11.000Z","updated_at":"2024-02-21T12:07:33.000Z","dependencies_parsed_at":"2022-09-21T05:05:27.307Z","dependency_job_id":null,"html_url":"https://github.com/althonos/jinja2-fsloader","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"purl":"pkg:github/althonos/jinja2-fsloader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/althonos%2Fjinja2-fsloader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/althonos%2Fjinja2-fsloader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/althonos%2Fjinja2-fsloader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/althonos%2Fjinja2-fsloader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/althonos","download_url":"https://codeload.github.com/althonos/jinja2-fsloader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/althonos%2Fjinja2-fsloader/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261255900,"owners_count":23131478,"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":["jinja2","jinja2-extension","loader","pyfilesystem2","python-library","template-engine"],"created_at":"2024-10-13T19:31:22.616Z","updated_at":"2025-06-22T07:37:42.477Z","avatar_url":"https://github.com/althonos.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"``jinja2-fsloader`` |star me|\n=============================\n\n.. |star me| image:: https://img.shields.io/github/stars/althonos/jinja2-fsloader.svg?style=social\u0026maxAge=3600\u0026label=Star\n   :target: https://github.com/althonos/jinja2-fsloader/stargazers\n\n*A Jinja2 template loader using PyFilesystem2.*\n\n|build| |repo| |versions| |changelog| |format| |coverage| |grade| |license|\n\n.. |build| image:: https://img.shields.io/travis/althonos/jinja2-fsloader/master.svg?label=travis-ci\u0026style=flat-square\n   :target: https://travis-ci.org/althonos/jinja2-fsloader/\n\n.. |repo| image:: https://img.shields.io/badge/source-GitHub-303030.svg?style=flat-square\n   :target: https://github.com/althonos/jinja2-fsloader\n\n.. |versions| image:: https://img.shields.io/pypi/v/jinja2-fsloader.svg?style=flat-square\n   :target: https://pypi.org/project/jinja2-fsloader\n\n.. |format| image:: https://img.shields.io/pypi/format/jinja2-fsloader.svg?style=flat-square\n   :target: https://pypi.org/project/jinja2-fsloader\n\n.. |grade| image:: https://img.shields.io/codacy/grade/f74bd301468341f59ce664ae129021ef/master.svg?style=flat-square\n   :target: https://www.codacy.com/app/althonos/jinja2-fsloader/dashboard\n\n.. |coverage| image:: https://img.shields.io/codecov/c/github/althonos/jinja2-fsloader/master.svg?style=flat-square\n   :target: https://codecov.io/gh/althonos/jinja2-fsloader\n\n.. |license| image:: https://img.shields.io/pypi/l/jinja2-fsloader.svg?style=flat-square\n   :target: https://choosealicense.com/licenses/mit/\n\n.. |changelog| image:: https://img.shields.io/badge/keep%20a-changelog-8A0707.svg?maxAge=86400\u0026style=flat-square\n   :target: https://github.com/althonos/jinja2-fsloader/blob/master/CHANGELOG.rst\n\nAbout\n'''''\n\nThis library allows you to use PyFilesystem2 as a backend to load templates into\nJinja2. You can take advantage of the whole ``fs`` ecosystem, which already implements\ndrivers for FTP, SSH, SMB, S3, WebDAV servers, ZIP and Tar archives, and\n`many more \u003chttps://www.pyfilesystem.org/page/index-of-filesystems/\u003e`_!\n\n\nInstallation\n''''''''''''\n\nInstall with ``pip``::\n\n    $ pip install --user -U jinja2-fsloader\n\n\nUsage\n'''''\n\n.. code:: Python\n\n    from jinja2_fsloader import FSLoader\n    FSLoader(template_fs, encoding='utf-8', use_syspath=False)\n\n``template_fs``\n    a ``FS`` instance or an `FS URL \u003chttps://docs.pyfilesystem.org/en/latest/openers.html\u003e`_\n    where the templates are located.\n``encoding``\n    the encoding of the template files (*utf-8* by default).\n``use_syspath``\n    set to ``True`` for the loader to return the real path or an URL to the template\n    when available (``False`` by default).\n\n\nExamples\n''''''''\n\n.. code:: python\n\n    import jinja2\n    from jinja2_fsloader import FSLoader\n\n    # templates in a ZIP archive\n    env = jinja2.Environment(loader=FSLoader(\"zip:///path/to/my/templates.zip\"))\n\n    # templates in a S3 bucket\n    env = jinja.Environment(loader=FSLoader(\"s3://mybucket\"))\n\n    # templates in memory\n    mem = fs.open_fs('mem://')\n    mem.settext('template.j2', 'This template is {{adjective}}')\n    env = jinja.Environment(loader=FSLoader(mem))\n\n\nSee Also\n''''''''\n\nThe `complete documentation \u003chttps://www.pyfilesystem.org/\u003e`_ of PyFilesystem2 can\ngive you a better overview of all the features available in the library.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falthonos%2Fjinja2-fsloader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falthonos%2Fjinja2-fsloader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falthonos%2Fjinja2-fsloader/lists"}