Project

General

Profile

Actions

Configuring Simpycity

Settings

Configuring Simpycity is designed to be very quick, to get and stay out of your way.

As in AQuickTutorial, configuration of Simpycity is very fast:

>>> from simpycity import config
>>> config.host = 'localhost'
>>> config.port = 5432
>>> config.user = 'user'
>>> config.password = 'password'
>>> config.database = 'dbname'

All parameters are named as you'd expect, and all settings are effectively global for all future Simpycity constructs.

Debugging

Simpycity also supports outputting some debugging information, which can be useful in figuring out exactly why things aren't working properly.

Debugging is turned on via

>>> config.debug = True

Unfortunately, it's not using Python logging systems yet, so everything is just printed to stdout and there's no concept of logging levels.

Updated by Aurynn Shaw almost 16 years ago ยท 2 revisions