FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
vim-python-docstring/python/ibis/__init__.py at master · pixelneo/vim-python-docstring · GitHub
pixelneo
/
vim-python-docstring
Public
Notifications
You must be signed in to change notification settings
Fork
8
Star
47
Code
Issues
5
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
vim-python-docstring
/
python
/
ibis
/
__init__.py
Copy path
More file actions
More file actions
Latest commit
History
History
History
51 lines (46 loc) · 1.78 KB
Breadcrumbs
vim-python-docstring
/
python
/
ibis
/
__init__.py
Copy path
File metadata and controls
51 lines (46 loc) · 1.78 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# --------------------------------------------------------------------------
# Ibis: a lightweight template engine.
#
# How it works: A lexer transforms a template string into an iterable
# sequence of tokens. A parser takes this sequence and compiles it into a
# tree of nodes. Each node has a .render() method which takes a context
# object and returns a string. The entire compiled node tree can be rendered
# by calling .render() on the root node.
#
# Compiling and rendering the node tree are two distinct processes. Once
# the template has been compiled it can be cached and rendered multiple times
# with different context objects.
#
# The Template class acts as the public interface to the template engine.
# This is the only class the end-user needs to interact with directly.
#
# A Template object is initialized with a template string. It compiles the
# string and stores the resulting node tree for future rendering. Calling the
# template object's .render() method with a dictionary of key-value pairs or
# a set of keyword arguments renders the template and returns the result as a
# string.
#
# Example:
#
# >>> template = Template('{{foo}} and {{bar}}')
#
# >>> template.render(foo='ham', bar='eggs')
# 'ham and eggs'
#
# >>> template.render({'foo': 1, 'bar': 2})
# '1 and 2'
#
# Author: Darren Mulholland <darren@mulholland.xyz>
# License: Public Domain
# --------------------------------------------------------------------------
# Library version number.
__version__
=
"1.6.0"
# Import modules to make them available to callers via a simple 'import ibis'
# statement. Otherwise callers would have to 'import.foo' for each
# individual module.
from
.
import
config
from
.
import
filters
from
.
import
nodes
from
.
import
loaders
from
.
import
errors
from
.
templates
import
Template
Back
|
FazBrowse Home
|
New Git URL