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
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
File details
Details for the file EasySettings-1.0.4.tar.gz
.
File metadata
- Download URL: EasySettings-1.0.4.tar.gz
- Upload date:
- Size: 16.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 82433d017c0113c84159f5c72776cced2de39d84c74b0f8446649f23d4debd86 |
|
MD5 | c024a58b01d4389a884274c6c0d4a0ce |
|
BLAKE2b-256 | 8f664fb10c8a5c5468f6c659c18984b42f7662fcd00a79c71f378fe7f3c86f30 |