All Projects → multiversecoder → pug4py

multiversecoder / pug4py

Licence: MIT license
Use Pug.js within any python framework

Programming Languages

python
139335 projects - #7 most used programming language
HTML
75241 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to pug4py

Pug
Pug template engine for PHP
Stars: ✭ 341 (+1905.88%)
Mutual labels:  template-engine, pug
Zappa
Serverless Python
Stars: ✭ 11,859 (+69658.82%)
Mutual labels:  pyramid, bottle
Email Templates
📫 Create, preview, and send custom email templates for Node.js. Highly configurable and supports automatic inline CSS, stylesheets, embedded images and fonts, and much more!
Stars: ✭ 3,291 (+19258.82%)
Mutual labels:  template-engine, pug
Squirrelly
Semi-embedded JS template engine that supports helpers, filters, partials, and template inheritance. 4KB minzipped, written in TypeScript ⛺
Stars: ✭ 359 (+2011.76%)
Mutual labels:  template-engine, pug
Phug
Phug - The Pug Template Engine for PHP
Stars: ✭ 43 (+152.94%)
Mutual labels:  template-engine, pug
tale-pug
Tale Pug is the popular JavaScript Template Engine Pug, formerly Jade, for PHP!
Stars: ✭ 32 (+88.24%)
Mutual labels:  template-engine, pug
Jade
Jade.go - pug template engine for Go (golang)
Stars: ✭ 251 (+1376.47%)
Mutual labels:  template-engine, pug
pypugjs
PugJS syntax adapter for Django, Jinja2 and Mako templates
Stars: ✭ 237 (+1294.12%)
Mutual labels:  template-engine, pug
eslint-plugin-pug
An ESLint plugin for linting inline scripts in Pug files
Stars: ✭ 17 (+0%)
Mutual labels:  pug
pug-server
🐶 A simple pug server
Stars: ✭ 19 (+11.76%)
Mutual labels:  pug
bash-tpl
A smart, lightweight shell script templating engine, written in Bash
Stars: ✭ 26 (+52.94%)
Mutual labels:  template-engine
TemplateEngine
Design and build web applications with components using only your web browser
Stars: ✭ 41 (+141.18%)
Mutual labels:  template-engine
mole
A tool for managing design decision outputs for different platforms
Stars: ✭ 30 (+76.47%)
Mutual labels:  template-engine
code-line-daily
A line of code of the day.
Stars: ✭ 17 (+0%)
Mutual labels:  pug
laravel-theme
This package creates multiple managed theme infrastructure for Laravel.
Stars: ✭ 19 (+11.76%)
Mutual labels:  template-engine
programming-crypto-contracts
Programming Crypto Blockchain Contracts Step-by-Step Book / Guide. Let's Start with Ponzi & Pyramid Schemes. Run Your Own Lotteries, Gambling Casinos and more on the Blockchain World Computer...
Stars: ✭ 54 (+217.65%)
Mutual labels:  pyramid
ftmpl
Fast typesafe templating for golang
Stars: ✭ 61 (+258.82%)
Mutual labels:  template-engine
pyramid basemodel
Global base classes for Pyramid SQLAlchemy applications.
Stars: ✭ 14 (-17.65%)
Mutual labels:  pyramid
generator-speedseed
Oriented to components, allow create/choice template, multiple configuration with easy maintenance
Stars: ✭ 13 (-23.53%)
Mutual labels:  pug
discord-10man
Discord bot for CS:GO Scrims and Pugs
Stars: ✭ 34 (+100%)
Mutual labels:  pug

Pug4Py - Pug Templates for Python

What is Pug (Pug.js)?

Pug 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.

Check pug.js on:

Pugjs.org

What is pug4py?

Pug4Py is a simple script that allows you to use all the functions of Pug (NodeJs) in any python framework with the addition that you can also use the mako syntax (a popular and fast template engine for python).

Here is a small example of usage:

from pug4py.pug import Pug

pug = Pug("pug")

def say_hello():
    return "Hello World"

pug.render("example.pug", say_hello=say_hello, year="2019", author="https://github.com/multiversecoder/pug4py")

Requirements

You need Python 3.7 or later to run pug4py, node v12.10.0 and yarn

In Ubuntu, Mint and Debian you can install Requirements like this:

$ apt-get install python3 python3-pip
$ curl -sL https://deb.nodesource.com/setup_12.10.0 | sudo -E bash -
$ apt update && apt install nodejs
$ curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | sudo apt-key add -
$ echo "deb https://dl.yarnpkg.com/debian/ stable main" | sudo tee /etc/apt/sources.list.d/yarn.list
$ apt update && apt install yarn

For fedora

$ dnf install python3 python3-pip
$ curl -sL https://deb.nodesource.com/setup_12.10.0 | sudo -E bash -
$ dnf update && dnf install nodejs
$ curl -sL https://dl.yarnpkg.com/rpm/yarn.repo -o /etc/yum.repos.d/yarn.repo
$ dnf install yarn

For other systems

- Install Python3
- Install Nodejs
- Install Yarn

Pug Installation

Pug will be installed implicitly when the Pug class is initialized and installed inside the pug4py package directory

Quick start

pug4py can be installed using pip:

$ python3 -m pip install -U pug4py

or:

$ pip install pug4py

for install pug4py from source:

$ git clone https://github.com/multiversecoder/pug4py
$ cd ./pug4py
$ pip install .

Development status

pug4py is beta software, but it has already been used in production and it has an extensive test suite.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].