CheetahTemplate

Last updated
CheetahTemplate
Original author(s) Tavis Rudd
Developer(s) Oleg Broytman
Initial releaseJune 2001;23 years ago (2001-06) [1]
Stable release
3.3.3 / October 22, 2023;12 months ago (2023-10-22)
Preview release
3.3.4a0 / October 22, 2023;12 months ago (2023-10-22)
Written in Python
Operating system Cross-platform
Type Template processor
License MIT License
Website cheetahtemplate.org

Cheetah (or CheetahTemplate) is a template engine that uses the Python programming language. It can be used standalone or combined with other tools and frameworks. It is often used for server-side scripting and dynamic web content by generating HTML, but can also be used to generate source code. Cheetah is free open-source software licensed under the MIT License.

Contents

Templating engines encourage clean separation of content, graphic design, and program code. This leads to more modular, flexible, and reusable site architectures, shorter development time, and code that is easier to understand and maintain. Cheetah compiles templates into optimized, yet readable, Python code. It gives template authors full access to any Python data, and functionality, while providing a way for administrators to selectively restrict access to Python when needed.

Cheetah is included in the FreeBSD Ports collection and several Linux distributions: Gentoo, Fedora, Debian, and Ubuntu among others.

Example of Cheetah code

#fromCheetah.TemplateimportTemplate#extendsTemplate#set$people=[{'name':'Tom','mood':'Happy'},{'name':'Dick',                         'mood' : 'Sad'}, {'name' : 'Harry', 'mood' : 'Hairy'}]  <strong>How are you feeling?</strong><ul>#for$personin$people<li>$person['name'] is $person['mood']         </li>#end for</ul>

[2]

Related Research Articles

In object-oriented programming, a class defines the shared aspects of objects created from the class. The capabilities of a class differ between programming languages, but generally the shared aspects consist of state (variables) and behavior (methods) that are each either associated with an particular object or with all objects of that class.

Dynamic HTML, or DHTML, is a term which was used by some browser vendors to describe the combination of HTML, style sheets and client-side scripts that enabled the creation of interactive and animated documents. The application of DHTML was introduced by Microsoft with the release of Internet Explorer 4 in 1997.

In software development, obfuscation is the act of creating source or machine code that is difficult for humans or computers to understand. Like obfuscation in natural language, it may use needlessly roundabout expressions to compose statements. Programmers may deliberately obfuscate code to conceal its purpose or its logic or implicit values embedded in it, primarily, in order to prevent tampering, deter reverse engineering, or even to create a puzzle or recreational challenge for someone reading the source code. This can be done manually or by using an automated tool, the latter being the preferred technique in industry.

XSLT is a language originally designed for transforming XML documents into other XML documents, or other formats such as HTML for web pages, plain text or XSL Formatting Objects, which may subsequently be converted to other formats, such as PDF, PostScript and PNG. Support for JSON and plain-text transformation was added in later updates to the XSLT 1.0 specification.

Zope is a family of free and open-source web application servers written in Python, and their associated online community. Zope stands for "Z Object Publishing Environment", and was the first system using the now common object publishing methodology for the Web. Zope has been called a Python killer app, an application that helped put Python in the spotlight.

Jakarta Server Pages is a collection of technologies that helps software developers create dynamically generated web pages based on HTML, XML, SOAP, or other document types. Released in 1999 by Sun Microsystems, JSP is similar to PHP and ASP, but uses the Java programming language.

JScript .NET is a .NET programming language developed by Microsoft.

<span class="mw-page-title-main">PyGTK</span> Set of Python wrappers for the GTK graphical user interface library

PyGTK is a set of Python wrappers for the GTK graphical user interface library. PyGTK is free software and licensed under the LGPL. It is analogous to PyQt/PySide and wxPython, the Python wrappers for Qt and wxWidgets, respectively. Its original author is GNOME developer James Henstridge. There are six people in the core development team, with various other people who have submitted patches and bug reports. PyGTK has been selected as the environment of choice for applications running on One Laptop Per Child systems.

CherryPy is an object-oriented web application framework using the Python programming language. It is designed for rapid development of web applications by wrapping the HTTP protocol but stays at a low level and does not offer much more than what is defined in RFC 7231.

Web scraping, web harvesting, or web data extraction is data scraping used for extracting data from websites. Web scraping software may directly access the World Wide Web using the Hypertext Transfer Protocol or a web browser. While web scraping can be done manually by a software user, the term typically refers to automated processes implemented using a bot or web crawler. It is a form of copying in which specific data is gathered and copied from the web, typically into a central local database or spreadsheet, for later retrieval or analysis.

<span class="mw-page-title-main">TurboGears</span>

TurboGears is a Python web application framework consisting of several WSGI components such as WebOb, SQLAlchemy, Kajiki template language and Repoze.

Embedded Ruby is a templating system that embeds Ruby into a text document. It is often used to embed Ruby code in an HTML document, similar to ASP and JSP, and PHP and other server-side scripting languages. The templating system of eRuby combines Ruby code and plain text to provide flow control and variable substitution, thus making the combined code easier to maintain.

Google Developers is Google's site for software development tools and platforms, application programming interfaces (APIs), and technical resources. The site contains documentation on using Google developer tools and APIs—including discussion groups and blogs for developers using Google's developer products.

<span class="mw-page-title-main">Web template system</span> System in web publishing

A web template system in web publishing allows web designers and developers to work with web templates to automatically generate custom web pages, such as the results from a search. This reuses static web page elements while defining dynamic elements based on web request parameters. Web templates support static content, providing basic structure and appearance. Developers can implement templates from content management systems, web application frameworks, and HTML editors.

Haml is a templating system that is designed to avoid writing inline code in a web document and make the HTML cleaner. Similar to other template systems like eRuby, Haml also embeds some code that gets executed during runtime and generates HTML code in order to provide some dynamic content. In order to run Haml code, files need to have a .haml extension. These files are similar to .erb or .eRuby files, which also help embed Ruby code while developing a web application.

Web2py is an open-source web application framework written in the Python programming language. Web2py allows web developers to program dynamic web content using Python. Web2py is designed to help reduce tedious web development tasks, such as developing web forms from scratch, although a web developer may build a form from scratch if required.

The following outline is provided as an overview of and topical guide to the Perl programming language:

ProcessWire is a free and open source content management system (CMS), content management framework (CMF) and web application framework (WAF) written in the PHP programming language. It is distributed under the Mozilla Public License 2.0. ProcessWire is built around an API with usage and naming conventions similar to the JavaScript framework jQuery. The stated goal behind the API is to provide the level of accessibility and control to pages in a website that jQuery provides to the DOM. Content is managed either via the API or the web-based admin control panel. ProcessWire is largely used for development of web sites, web applications, services, content feeds and related applications.

<span class="mw-page-title-main">Yesod (web framework)</span>

Yesod is a web framework based on the programming language Haskell for productive development of type-safe, representational state transfer (REST) model based, high performance web applications, developed by Michael Snoyman, et al. It is free and open-source software released under an MIT License.

References

  1. Rudd, Tavis (June 10, 2001). "0.9.5". CheetahTemplate.
  2. Cheetah in a nutshell