Extra — IoC 0.0.4 documentation

### Navigation

- index
- previous |
- IoC 0.0.4 documentation »

# Extra

The ioc package include some integration with python lib, just edit the `config.yml` file and add the different following `yaml` sections.

## Flask

Flask is a web micro framework

    ioc.extra.flask:
        app:
            port:               8080
            name:               ''
            static_path:        ''
            static_url_path:    ''
            static_folder:      'static'
            template_folder:    'templates'
            instance_path:      ''
            instance_relative_config: false

        config: # use to populate the instance_relative_config kwargs
            DEBUG:                         False
            TESTING:                       False
            PROPAGATE_EXCEPTIONS:
            PRESERVE_CONTEXT_ON_EXCEPTION:
            SECRET_KEY:
            USE_X_SENDFILE:                False
            LOGGER_NAME:
            SERVER_NAME:
            APPLICATION_ROOT:
            SESSION_COOKIE_NAME:           'session'
            SESSION_COOKIE_DOMAIN:
            SESSION_COOKIE_PATH:
            SESSION_COOKIE_HTTPONLY:       True
            SESSION_COOKIE_SECURE:         False
            MAX_CONTENT_LENGTH:
            SEND_FILE_MAX_AGE_DEFAULT:     43200
            TRAP_BAD_REQUEST_ERRORS:       False
            TRAP_HTTP_EXCEPTIONS:          False
            PREFERRED_URL_SCHEME:          'http'
            JSON_AS_ASCII:                 True

        blueprints:
            - element.flask.blueprint

Services available:

- ioc.extra.flask.app : the Flask app

## Redis-Py

Redis-Py is an interface to the Redis key-value store.

    ioc.extra.redis:
        clients:
            default:
                connection: default

        connections:
            default:
                host:               'localhost'
                port:               6379
                db:                 0
                password:
                socket_timeout:
                encoding:           'utf-8'
                encoding_errors:    'strict'
                decode_responses:   false

Services available:

- ioc.extra.redis.manager: the Redis manager to retrieve client and connection
- ioc.extra.redis.connection.default: the `default` connection
- ioc.extra.redis.client.default: the `default` client

## redis_wrap

redis-wrap_ implements a wrapper for Redis datatypes so they mimic the datatypes found in Python

    ioc.extra.redis_wrap:
        clients:
            default: ioc.extra.redis.client.default

## Twisted

Twisted is an event-driven networking engine written.

    ioc.extra.twisted:

Services available:

- ioc.extra.twisted.reactor: the reactor instance
- ioc.extra.twisted.reactor.thread_pool: the reactor thread pool

### Navigation

- index
- previous |
- IoC 0.0.4 documentation »