Skip to main content

CLI Application Framework for Python

Project description

Cement is an advanced CLI Application Framework for Python. It promotes code
re-use by way of plugins and helper libraries that can be shared between
any application built on Cement. The MVC and overall framework design is
very much inspired by the TurboGears2 web framework. Its goal is to introduce
a standard, and feature-full platform for both simple and complex command
line applications as well as support rapid development needs without sacrificing

At a minimum, Cement configures the following features for every application:
* Multiple Configuration file parsing (default: /etc, ~/)
* Command line argument and option parsing
* Dual Console/File Logging Support
* Internal and External (3rd Party) Plugin support
* Basic "hook" support
* MVC support for advanced application design
* Text output rendering with Genshi templates
* Json output rendering allows other programs to access your CLI-API

The above provides any level developer with a solid, and fully functional
cli application from the very start with more or less a single command via
the paster utility. Cement brings an end to the 'hack it out, and [maybe]
clean it up later' routine that we all find ourselves in under deadlines.

Any application can utilize existing plugins from The Rosendale Project, or
from other 3rd party resources to extend functionality. The plugin system is
designed to allow portability of re-usable code, and it is encouraged to
contribute any plugins back to the project to extend the functionality of
Cement. When creating plugins specifically for re-use within the community,
please be sure to follow the standard naming convention 'HelloWorld Plugin for
Cement' as an example. The actual module name should be something like:

The Cement CLI Application Framework is Open Source and is distributed under
The MIT License.


Stable versions of Cement can be installed via the cheeze shop. Install cement.devtools (which pulls in cement):
$ easy_install cement.devtools

Development versions of Cement can be checked out of Git:
$ git clone git://

$ cd cement

$ python install

$ git clone git://

$ cd cement.devtools

$ python install

Additionally, Cement applications, and plugins can be created via
PasteScript. Once Cement is installed, the following command will create a
command line application built on top of the Cement Framework:
$ paster cement-app helloworld

The following command will create an external plugin for your application:
$ paster cement-plugin helloworld myplugin

Project details

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page