Introduction
Persistent Pineapple provides a simple interface to save settings for applications or other modules. The settings file is in the JSON format for simplicty. A slightly modified JSON format is used to allow for comments and other creature features. Please read the _json.py file for more details.
Documentation
Documentation is hosted on persistetpineapple.readthedocs.org
Install
Download the tarball and install with pip install <package>.
Usage
See the unit tests for more in-depth examples. Here are the basics:
Example code
settings = PersistentPineapple('/etc/myapp.json')
print settings.program_name
if settings.debug:
print "we're in debug mode"
settings.debug = False
Example settings file (/etc/myapp.json)
{
// App settings ///////////////////////////////////////////////////////////
// Name of the program
"program_name": "myapp",
// HTTP POST listener port
"port": 8009,
// Debugging stuff
"debug": true,
// Logging settings
"console_log_level": "INFO",
}
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 persistent_pineapple-1.0.0.tar.gz.
File metadata
- Download URL: persistent_pineapple-1.0.0.tar.gz
- Upload date:
- Size: 10.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
62b1db30fae1a5ae72aef2d829b196715b09c4ea235cec85768b1969ff850315
|
|
| MD5 |
e2979e4346685bad5308fbe1338d157d
|
|
| BLAKE2b-256 |
0d5abbd334446e9ddbdd1794147c006807e674aa8c387b41e585419a57066e7e
|