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 of Easy Settings usage::

#!/usr/bin/env python

from easysettings import easysettings

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

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

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

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"

Be sure to visit 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.

Filename, size & hash SHA256 hash help File type Python version Upload date
EasySettings-1.0.1.tar.gz (15.5 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page