Configuration

Appier configurations are simply a list of settings that are passed from outside the app, and made accessible to the application logic. They serve both as a single point of reference to variables that define the app's platform and behavior (eg: database server, logging level, etc.), and as a means to modify these when running the app in different environments (eg: having a different configuration for when it's running in a staging server than from when it's running in a production server).

Configuration can be specified through environment variables, local and/or environment file, with settings from the former overriding the latter.

Here's a local configuration file (appier.json in the application's root folder):

{
    "LEVEL" : "INFO"
}

That setting could also be configured through environment variables, which would override the very same setting defined in the local configuration file:

LEVEL=WARNING python hello.py

To retrieve configuration values from anywhere in the app do:

level = appier.conf("LEVEL")

You can also provide a default, so the app still works when that setting is missing:

level = appier.conf("LEVEL", "INFO")

Reference

The following are reserved configuration variables that modify Appier's behavior:

General

Database

Email

Logging

Cache

Preferences

Bus

Session

Scheduler

Supervisor

Debug

Other/Random