Skip to content

jahodfra/mrkev

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

61 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple markup langage for python

import mrkev
code = '''
[Html :=[
    <html>[Header][Body]</html>
] Header=[
    <head><title>[#title]</title></head>
] Body=[
    <body>[@]</body>
]]
[Html [Hello world!]]
'''
print mrkev.Template(code).render(title=u'New Page')

is converted into

<html><head><title>New page</title></head><body>Hello world!</body></html>

Features

  • runtime safe - templates cannot run own python code
  • sandboxed function - template can be extended by new functions and syntax elements
  • simple syntax - only two characters to escape

Authors

About

Simple template language for Python 2.x

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published