Skip to main content

Easily save & retrieve your applications settings.

Project description

===========
Easy Settings
===========

Easy Settings allows you to easily save and retrieve simple application settings.

Example
=========
Example of Easy Settings usage::

#!/usr/bin/env python

from easysettings import easysettings

settings = easysettings.easysettings("myconfigfile.conf")
settings.configfile_create()

settings.set("username", "cjw")

print settings.get("username")
# this results in "cjw"
settings.save()
# you may also set & save in one line...
settings.setsave("username", "otheruser")

Features
=========
Easy Settings has the basic features you would expect out of a settings module,
and it's very easy to use. If your project needs to save simple string settings without
the overhead and complication of other modules then this is for you.

Easy Settings uses a dictionary to store settings before writing to disk, so you can
also access settings like a dictionary object using ``easysettings.settings``. This
allows you to do things like this (where ``mysettings`` is an EasySettings instance)::
for s_opt in mysettings.settings.iterkeys():
print "Setting '" + s_opt + "' is set to '" + mysettings.settings[s_opt] + "'"
# this results in: "Setting 'username' is set to 'otheruser'"

You can also retrieve a list of options & values strings::
lst_settings = mysettings.list_settings()
for itm in lst_settings:
print itm
# this results in "username=otheruser"


Website
=========
Be sure to visit http://welbornproductions.net for more projects and information from Welborn Productions.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

EasySettings-1.0.0.tar.gz (15.5 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page