Tag: python
GRPC: Open Source RPC framework built on HTTP/2 with libraries in 10 languages
- GRPC has libraries in C, C++, Java, Go, Node.js, Python, Ruby, Objective-C, PHP and C#.
- Define services using Protocol Buffers.
Jinja: Python template engine
{% extends "layout.html" %}
{% block body %}
<ul>
{% for user in users %}
<li><a href="{{ user.url }}">{{ user.username }}</a></li>
{% endfor %}
</ul>
{% endblock %}
Features (from Jinja website)
- Sandboxed execution mode. Every aspect of the template execution is monitored and explicitly whitelisted or blacklisted, whatever is preferred. This makes it possible to execute untrusted templates.
- powerful automatic HTML escaping system for cross site scripting prevention.
- Template inheritance makes it possible to use the same or a similar layout for all templates.
- High performance with just in time compilation to Python bytecode. Jinja2 will translate your template sources on first load into Python bytecode for best runtime performance.
- Optional ahead-of-time compilation
- Easy to debug with a debug system that integrates template compile and runtime errors into the standard Python traceback system.
- Configurable syntax. For instance you can reconfigure Jinja2 to better fit output formats such as LaTeX or JavaScript.
- Template designer helpers. Jinja2 ships with a wide range of useful little helpers that help solving common tasks in templates such as breaking up sequences of items into multiple columns and more.
Tamper: Chrome devtools extension that lets you edit remote files locally and serve them directly to the browser
Node Version Manager: Manage multiple active node.js versions
https://github.com/creationix/nvm ᔥ
Commands
$ nvm [tab][tab]
alias deactivate install ls run unload
clear-cache exec list ls-remote unalias use
current help list-remote reinstall-packages uninstall version
Two Microsoft Windows alternatives:
- nvmw – Requires Python and Git
- nvm-windows – Written in Go. Installer available.
Mako: Template library written in Python
http://www.makotemplates.org/ ᔥ
Mako is a template library written in Python. It provides a familiar, non-XML syntax which compiles into Python modules for maximum performance. Mako’s syntax and API borrows from the best ideas of many others, including Django and Jinja2 templates, Cheetah, Myghty, and Genshi. Conceptually, Mako is an embedded Python (i.e. Python Server Page) language, which refines the familiar ideas of componentized layout and inheritance to produce one of the most straightforward and flexible models available, while also maintaining close ties to Python calling and scoping semantics.
Example:
<%inherit file="base.html"/>
<%
rows = [[v for v in range(0,10)] for row in range(0,10)]
%>
<table>
% for row in rows:
${makerow(row)}
% endfor
</table>
<%def name="makerow(row)">
<tr>
% for name in row:
<td>${name}</td>\
% endfor
</tr>
</%def>
Tutorial: Making a Static Blog with Pelican (a python-based static website generator)
Graphite: Scalable Real-Time Graphing system written in Python
Notejam: Sample web application written in multiple frameworks and languages to facilitate comparison
https://github.com/komarserjio/notejam
Supported frameworks
In progress
- Javascript (node.js)
- Express
- Python
- web2py
- PHP
- CakePHP
- CodeIgniter