Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Tag: v1.0-rc6

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


cyclone-based project

Info:This is the source code of $project_name
Author: $name <$email>


This file has been created automatically by cyclone-tool for $project_name. It contains the following files:

  • simple shell script to start the server
  • $modname.conf: configuration file for the web server
  • $modname/ information such as author and version of this package
  • $modname/ map of url handlers and main class of the web server
  • $modname/ configuration parser for $modname.conf
  • $modname/ code of url handlers for the web server
  • scripts/debian-init.d: generic debian start/stop init script
  • scripts/debian-multicore-init.d: run one instance per core on debian
  • scripts/ script to fix html text before running xgettext
  • scripts/ script for generating new secret key for the web server


For development and testing:

twistd -n cyclone --help
twistd -n cyclone -r $modname.web.Application [--help]

For production:

twistd cyclone \
       --logfile=/var/log/$project.log \
       --pidfile=/var/run/$ \
       -r $modname.web.Application

Convert this document to HTML

Well, since this is a web server, it might be a good idea to convert this document to HTML before getting into customization details.

Because not everybody has DocUtils installed, I recommend using the rst2a web service API:

curl -F "rst=@README.rst" > frontend/static/readme.html

And point your browser to http://localhost:8888/static/readme.html after this server is running.

For more information on the API, please check


This section is dedicated to explaining how to customize your brand new package.


cyclone provides built-in support for SQLite and Redis databases. It also supports any RDBM supported by the twisted.enterprise.adbapi module, like MySQL or PostgreSQL.

The default configuration file $modname.conf ships with pre-configured settings for SQLite, Redis and MySQL.

The code for loading all the database settings is in $modname/ Feel free to comment or even remove such code, and configuration entries. It shouldn't break the web server.

Take a look at $modname/, which is where persistent database connections are initialized.


cyclone uses the standard gettext library for dealing with string translation.

Make sure you have the gettext package installed. If you don't, you won't be able to translate your software.

For installing the gettext package on Debian and Ubuntu systems, do this:

apt-get install gettext

For Mac OS X, I'd suggest using HomeBrew. If you already use HomeBrew, run:

brew install gettext brew link gettext

For generating translatable files for HTML and Python code of your software, run this:

cat frontend/template/*.html $modname/*.py | python scripts/ | \
    xgettext - --language=Python --from-code=utf-8 --keyword=_:1,2 -d $modname

Then translate $modname.po, compile and copy to the appropriate locale directory:

(pt_BR is used as example here)
vi $modname.po
mkdir -p frontend/locale/pt_BR/LC_MESSAGES/
msgfmt $modname.po -o frontend/locale/pt_BR/LC_MESSAGES/$

There are sample translations for both Spanish and Portuguese in this package, already compiled.

Cookie Secret

The current cookie secret key in $modname.conf was generated during the creation of this package. However, if you need a new one, you may run the scripts/ script to generate a random key.


Something went wrong with that request. Please try again.