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.
=============
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
Release history Release notifications | RSS feed
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.2.tar.gz
(15.5 kB
view details)
File details
Details for the file EasySettings-1.0.2.tar.gz
.
File metadata
- Download URL: EasySettings-1.0.2.tar.gz
- Upload date:
- Size: 15.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f94cf6f8d64f59777f14714d185cd1c9fbe26aedea63594f77a0d0fe3dba145 |
|
MD5 | 9e4657cc5587ecc88c6903f54960b2b0 |
|
BLAKE2b-256 | cc197d631b81efe18d02c4e0bbd2d63b2b4b021b83fd61f29485db54407b2683 |