Skip to main content
Help us improve PyPI by participating in user testing. All experience levels needed!

JSON Settings

Project description

travis ci build state rtd state Coverage Status Version Downloads

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",
}

Project details


Release history Release notifications

This version
History Node

1.0.0

History Node

0.0.0.2

History Node

0.0.0.1

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
persistent_pineapple-1.0.0.tar.gz (10.1 kB) Copy SHA256 hash SHA256 Source None Dec 2, 2014

Supported by

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