{"id":42642343,"url":"https://github.com/schlerp/jinja2loader","last_synced_at":"2026-01-29T06:17:44.952Z","repository":{"id":62572391,"uuid":"85656322","full_name":"schlerp/jinja2loader","owner":"schlerp","description":"a decorator for loading jinja2 templates for use with cherrypy","archived":false,"fork":false,"pushed_at":"2017-03-21T06:01:32.000Z","size":4,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-01T01:04:11.918Z","etag":null,"topics":["cherrypy","decorator","easy-to-use","html","jinja2","python","python2","python3","simple","typescript","web"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/schlerp.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2017-03-21T03:47:03.000Z","updated_at":"2021-04-12T04:02:06.000Z","dependencies_parsed_at":"2022-11-03T18:26:39.017Z","dependency_job_id":null,"html_url":"https://github.com/schlerp/jinja2loader","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/schlerp/jinja2loader","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlerp%2Fjinja2loader","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlerp%2Fjinja2loader/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlerp%2Fjinja2loader/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlerp%2Fjinja2loader/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/schlerp","download_url":"https://codeload.github.com/schlerp/jinja2loader/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/schlerp%2Fjinja2loader/sbom","scorecard":{"id":803987,"data":{"date":"2025-08-11","repo":{"name":"github.com/schlerp/jinja2loader","commit":"f7f724cb31864542b64d915d02835979bbae0849"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.8,"checks":[{"name":"Code-Review","score":0,"reason":"Found 0/2 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":1,"reason":"9 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2019-217 / GHSA-462w-v97r-4m45","Warn: Project is vulnerable to: PYSEC-2014-8 / GHSA-8r7q-cvjq-x353","Warn: Project is vulnerable to: GHSA-cpwx-vrp4-4pq7","Warn: Project is vulnerable to: PYSEC-2014-82 / GHSA-fqh9-2qgg-h84h","Warn: Project is vulnerable to: PYSEC-2021-66 / GHSA-g3rq-g295-4j3m","Warn: Project is vulnerable to: GHSA-h5c8-rqwp-cp95","Warn: Project is vulnerable to: GHSA-h75v-3vvj-5mfj","Warn: Project is vulnerable to: PYSEC-2019-220 / GHSA-hj2j-77xm-mc5v","Warn: Project is vulnerable to: GHSA-q2x7-8rv6-6q7h"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-23T11:17:05.435Z","repository_id":62572391,"created_at":"2025-08-23T11:17:05.435Z","updated_at":"2025-08-23T11:17:05.435Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28865892,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-29T05:56:06.453Z","status":"ssl_error","status_checked_at":"2026-01-29T05:55:57.668Z","response_time":59,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["cherrypy","decorator","easy-to-use","html","jinja2","python","python2","python3","simple","typescript","web"],"created_at":"2026-01-29T06:17:44.256Z","updated_at":"2026-01-29T06:17:44.943Z","avatar_url":"https://github.com/schlerp.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"jinja2loader\n============\n\nThis package is to be used with simple cherrypy applications needing a quick\nand easy way to load templates from the file system.\n\nImporting and Setup\n-------------------\nIn order to use this module correctly you must import it and then set the\n`template_directory`. The `template_directory` is initially set to be\n`os.path.join(os.getcwd(), 'templates')`.\n\nIf your templates are stored in './templates/' then you can just import this\nmodule. ::\n    \n    import jinja2loader\n\nHowever, if your templates are in another directory structure you will\nneed to import the module and then set the template `template_directory`. A\nhelper function has been create to allow this, you can use it via calling\n`jinja2loader.set_template_directory('template_directory')`. ::\n    \n    import jinja2loader\n    jinja2loader.set_template_directory('../resources/templates')\n\n\nload_template\n-------------\nThis Function wraps an application method which returns the\ncontext for a template, this decorator takes a single arguement, which is\nthe `template_name` to pass to `Environment.get_template(template_name)`\nWhen using this decorator all you need to do from your application\nfunction is to return the context you want to pass into the template. In\naddition you need to specify the `template_name` as the argument to the\ndecorator like `@load_template('template_name.html')`\nSee example below which loads a template 'test.html' using\n`Environment.get_template(template_name)`. ::\n\n    class Application(object):\n        @cherrypy.expose\n        @load_template('test.html')\n        def index(self):\n            context = {'name': 'derp',\n                       'name_list': ['bleep',\n                                     'blerp',\n                                     'herp']}\n            return context\n\nThe above example will result in the template 'test.html' being rendered\nwith the context from the function `Application.index()`\nIf nothing is passed in as the context like in the below example, the\ndecorator method will automatically replace this with an empty `Dict`\nbefore the call the render. ::\n\n    @load_template('test.html')\n    def index(self):\n        return\n\nThe above example will return the 'test.html' template, this is useful for\nloading and returning static pages which do not require context.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschlerp%2Fjinja2loader","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fschlerp%2Fjinja2loader","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fschlerp%2Fjinja2loader/lists"}