Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(18)  |  Call(4)  |  Derive(2)  |  Import(12)
Works exactly like a dict but provides ways to fill it from files
or special dictionaries.  There are two common patterns to populate the
config.

Either you can fill the config from a config file::

    app.config.from_pyfile('yourconfig.cfg')

Or alternatively you can define the configuration options in the
module that calls :meth:`from_object` or provide an import path to(more...)

src/f/l/flask-social-example-HEAD/app/helpers.py   flask-social-example(Download)
import os
import yaml
 
from flask import Flask as BaseFlask, Config as BaseConfig
 
 
class Config(BaseConfig):

src/t/e/tentd-0.1.1/tentd/__init__.py   tentd(Download)
from argparse import ArgumentParser
 
from flask import Config, Flask
 
from tentd.flask import Request, JSONEncoder, jsonify
def make_config(filename=None):
    config = Config(getcwd())
    if filename is not None:
        config.from_pyfile(filename)
    return config

src/p/y/pytentd-HEAD/tentd/utils/__init__.py   pytentd(Download)
from warnings import warn
 
from flask import Config, current_app
 
 
def make_config(config):
    """Create a Config object from a filename or dictionary"""
    configuration = Config(getcwd())
    if isinstance(config, basestring):
        configuration.from_pyfile(config)

src/s/h/shiva-0.8.0/shiva/config/__init__.py   shiva(Download)
import os
 
from flask import Config as FlaskConfig
 
from shiva.config import project
    def __init__(self):
        self._config = FlaskConfig('')
 
        # project
        _project = self.load_project()

src/s/h/shiva-server-HEAD/shiva/config/__init__.py   shiva-server(Download)
import os
 
from flask import Config as FlaskConfig
 
from shiva.config import project
    def __init__(self):
        self._config = FlaskConfig('')
 
        # project
        _project = self.load_project()

src/f/l/flask-exceptional-HEAD/flask_exceptional.py   flask-exceptional(Download)
from Cookie import SimpleCookie
from datetime import datetime
from flask import _request_ctx_stack as stack, Config, Flask, g
from functools import wraps
from httplib import BadStatusLine

src/f/l/Flask-Exceptional-0.5.4/flask_exceptional.py   Flask-Exceptional(Download)
from Cookie import SimpleCookie
from datetime import datetime
from flask import _request_ctx_stack as stack, Config, Flask, g
from functools import wraps
from httplib import BadStatusLine

src/f/l/flask_injector-HEAD/flask_injector.py   flask_injector(Download)
import flask
from injector import Injector
from flask import Config, Request
from werkzeug.local import Local, LocalManager
from injector import Module, Scope, ScopeDecorator, singleton, InstanceProvider

src/f/l/Flask-Injector-0.3.1/flask_injector.py   Flask-Injector(Download)
import flask
from injector import Injector
from flask import Config, Request
from werkzeug.local import Local, LocalManager
from injector import Module, Scope, ScopeDecorator, singleton, InstanceProvider

src/m/l/Mlask-0.2/mlask/conf/__init__.py   Mlask(Download)
import os
 
from flask import Config
 
 

  1 | 2  Next