Skip to main content

Redis-backed config for Flask applications

Project description

http://img.shields.io/pypi/v/Flask-RedisConfig.png

Redis-backed config for Flask applications based on the disqus/durabledict library

Usage

from flask import Flask
from flask.ext.redisconfig import RedisConfig

app = Flask(__name__)
config = RedisConfig('app:config')
config.init_app(app)

Command Line Interface

A CLI utility is provided for setting or reviewing config values easily.

config.cli()
Flask-RedisConfig
> help

Documented commands (type help <topic>):
========================================
exit  get  help  list  set  set_bool  set_int

> set SECRET_KEY oo5thuj4kaem2Pai0iviefahkaShah5iemae8Aev
> get SECRET_KEY
SECRET_KEY = 'oo5thuj4kaem2Pai0iviefahkaShah5iemae8Aev'
> set_bool PRESERVE_CONTEXT_ON_EXCEPTION False
> set_int SQLALCHEMY_POOL_SIZE 100
> list
PRESERVE_CONTEXT_ON_EXCEPTION = False
SECRET_KEY = 'oo5thuj4kaem2Pai0iviefahkaShah5iemae8Aev'
SQLALCHEMY_POOL_SIZE = 100
>

Example

$ python example.py config
$ python example.py

License

http://marksteve.mit-license.org

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

Flask-RedisConfig-0.3.0.tar.gz (2.5 kB view details)

Uploaded Source

File details

Details for the file Flask-RedisConfig-0.3.0.tar.gz.

File metadata

File hashes

Hashes for Flask-RedisConfig-0.3.0.tar.gz
Algorithm Hash digest
SHA256 691a7b71f15fdaeaae525d498d0280582cd491024f9d18a67a90ed33ebad1317
MD5 1f82bd4f7d6b15c1342920e81e874cdb
BLAKE2b-256 efe2fe99898dd41c9c07242c598c72e18af3a200e830994151d2222eb6797b2e

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page