{"id":22242546,"url":"https://github.com/multiversecoder/pug4py","last_synced_at":"2025-07-28T01:31:51.507Z","repository":{"id":47940113,"uuid":"221770750","full_name":"multiversecoder/pug4py","owner":"multiversecoder","description":"Use Pug.js within any python framework","archived":false,"fork":false,"pushed_at":"2021-08-11T16:50:21.000Z","size":76,"stargazers_count":16,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-14T14:43:25.005Z","etag":null,"topics":["bottle","django","flask","frontend","nodejs","pug","pyramid","python","python-framework","python3","template-engine","turbogears","web2py"],"latest_commit_sha":null,"homepage":null,"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/multiversecoder.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}},"created_at":"2019-11-14T19:24:27.000Z","updated_at":"2024-03-16T16:35:45.000Z","dependencies_parsed_at":"2022-08-12T14:41:14.195Z","dependency_job_id":null,"html_url":"https://github.com/multiversecoder/pug4py","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversecoder%2Fpug4py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversecoder%2Fpug4py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversecoder%2Fpug4py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/multiversecoder%2Fpug4py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/multiversecoder","download_url":"https://codeload.github.com/multiversecoder/pug4py/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227850021,"owners_count":17829088,"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":["bottle","django","flask","frontend","nodejs","pug","pyramid","python","python-framework","python3","template-engine","turbogears","web2py"],"created_at":"2024-12-03T04:16:33.052Z","updated_at":"2024-12-03T04:16:33.665Z","avatar_url":"https://github.com/multiversecoder.png","language":"Python","readme":"# Pug4Py - Pug Templates for Python\n\nWhat is Pug (Pug.js)?\n---------------------\n\nPug is a tool similar to HAML (or better its evolution) that allows you to abstract the html syntax, preventing errors and improving the speed of frontend development. \n\nCheck pug.js on:\n\n[Pugjs.org](https://pugjs.org/api/getting-started.html)\n\nWhat is pug4py?\n-------------\n\nPug4Py is a simple script that allows you to use all the functions of Pug (NodeJs)\nin any python framework with the addition that you can also use the\nmako syntax (a popular and fast template engine for python).\n\nHere is a small example of usage:\n\n```python\nfrom pug4py.pug import Pug\n\npug = Pug(\"pug\")\n\ndef say_hello():\n    return \"Hello World\"\n\npug.render(\"example.pug\", say_hello=say_hello, year=\"2019\", author=\"https://github.com/multiversecoder/pug4py\")\n\n```\n\n\nRequirements\n------------\n\nYou need Python 3.7 or later to run pug4py, node v12.10.0 and yarn\n\nIn Ubuntu, Mint and Debian you can install Requirements like this:\n\n    $ apt-get install python3 python3-pip\n    $ curl -sL https://deb.nodesource.com/setup_12.10.0 | sudo -E bash -\n    $ apt update \u0026\u0026 apt install nodejs\n    $ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -\n    $ echo \"deb https://dl.yarnpkg.com/debian/ stable main\" | sudo tee /etc/apt/sources.list.d/yarn.list\n    $ apt update \u0026\u0026 apt install yarn\n\n\nFor fedora\n\n    $ dnf install python3 python3-pip\n    $ curl -sL https://deb.nodesource.com/setup_12.10.0 | sudo -E bash -\n    $ dnf update \u0026\u0026 dnf install nodejs\n    $ curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo\n    $ dnf install yarn\n\nFor other systems\n\n    - Install Python3\n    - Install Nodejs\n    - Install Yarn\n\nPug Installation\n-----------------\n\nPug will be installed implicitly when the Pug class is initialized and installed inside the pug4py package directory\n\nQuick start\n-----------\n\npug4py can be installed using pip:\n\n    $ python3 -m pip install -U pug4py\n\nor:\n\n    $ pip install pug4py\n\nfor install pug4py from source:\n\n    $ git clone https://github.com/multiversecoder/pug4py\n    $ cd ./pug4py\n    $ pip install .\n\n\nDevelopment status\n------------------\n\npug4py is beta software, but it has already been used in production and it has an extensive test suite.\n\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiversecoder%2Fpug4py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmultiversecoder%2Fpug4py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmultiversecoder%2Fpug4py/lists"}