You can edit almost every page by Creating an account. Otherwise, see the FAQ.

SOAT (template engine)

From EverybodyWiki Bios & Wiki

SOAT
Original author(s)Adnan Yunus
Stable release
0.7.15 / August 21, 2018; 6 years ago (2018-08-21)[1]
Written inPython
Engine
    TypeTemplate engine
    LicenseBSD License

    Search SOAT (template engine) on Amazon.

    SOAT is a template engine for the Python programming language and is licensed under a BSD License created by Adnan Yunus. It is similar to the Django template engine but provides Python expressions . It is a text-based template language and thus can be used to generate any markup as well as sourcecode.

    The SOAT template engine allows customization of delimiters similar to Mustache_(template_system). Because it is merely a thin wrapper over python language, full language features such as functions are available within a template.

    Features[edit]

    Some of the unique features of SOAT are:[2]

    • Delimiter changing
    • One to many output buffers or files
    • template inheritance (using python import)
    • compiles down to the optimal python code just in time
    • optional ahead-of-time template compilation
    • easy to debug. Line numbers of exceptions directly point to the correct line in the template.
    • configurable syntax

    Example[edit]

    Here is a small example of a template file 'example.cxx.soa'

    #include <iostream>
    
    int main(int argc, char *argv[]) {
        printf("{{name}}");
    }

    Given a python dict data={'name': 'Hello world'}, This produces the C++ string:

    #include <iostream>
    
    int main(int argc, char *argv[]) {
        printf("Hello world");
    }

    Sources[edit]

    1. "artometa/soat". GitHub.
    2. "artometa/soat". GitHub.

    External links[edit]


    This article "SOAT (template engine)" is from Wikipedia. The list of its authors can be seen in its historical and/or the page Edithistory:SOAT (template engine). Articles copied from Draft Namespace on Wikipedia could be seen on the Draft Namespace of Wikipedia and not main one.