Global Settings

SERVICE_ALIAS: str = ''

Not required but give your service an alias

ADMINS: Tuple[tuple] = (('David', 'david@example.com'),)

A list of the maintainers of your service.

DEBUG: bool = False

Whether to run in debug mode or not

ENVIRONMENT: str = 'development'

Current environment application is deployed to

APPLICATION_VERSION: Optional[str] = None

The application version is set here.

ENFORCE_APPLICATION_VERSION: bool = True

Whether to enforce application versioning

KEEP_ALIVE_TIMEOUT: int = 60

Replace Sanic’s default value to 60

GRACEFUL_SHUTDOWN_TIMEOUT: float = 29.0

Replace Sanic’s default value of 15s to 29s

SERVICE_CONNECTIONS: List[str] = []

List is connections this application will have connections to.

REQUIRED_SERVICE_CONNECTIONS: List[str] = []

A list of required connections.

SERVICE_GLOBAL_SCHEMA: str = 'http'

Schema for constructing the url for intra service communications.

SERVICE_GLOBAL_HOST_TEMPLATE: str = '{}'

Host template for constructing the url for intra service communications

SERVICE_GLOBAL_PORT: str = '8000'

Port for constructing the url for intra service communications

SERVICE_CONNECTOR_MAX: int = 100

httpx config for number of connections

SERVICE_CONNECTOR_MAX_KEEPALIVE: int = 20

httpx config for keep alive

SERVICE_TIMEOUT_TOTAL: float = 5.0

httpx config for timeout

SERVICE_CONNECTION_DEFAULT_RETRY_COUNT: int = 2

number of retries the Service object will attempt the GET request

SERVICE_CONNECTION_MAX_RETRY_COUNT: int = 4

the hard maximum for retries

INSANIC_CACHES: Dict[str, dict] = {'insanic': {'DATABASE': 1, 'HOST': 'localhost', 'PORT': 6379}, 'throttle': {'DATABASE': 2, 'HOST': 'localhost', 'PORT': 6379}}

Redis host, port, and db cache settings

CACHES: Dict[str, dict] = {'default': {'DATABASE': 0, 'HOST': 'localhost', 'PORT': 6379}}

Any other host, port and db redis connections

TASK_CONTEXT_REQUEST_USER: str = 'request_user'

the key for the asyncio task context that hold user information.

TASK_CONTEXT_CORRELATION_ID: str = 'correlation_id'

the key for the asyncio task context that holds the correlation id

THROTTLES_DEFAULT_THROTTLE_RATES: Dict[str, Optional[str]] = {'anon': None, 'user': None}

Throttle values for setting throttles in views.

REQUEST_ID_HEADER_FIELD: str = 'X-Insanic-Request-ID'

Header key for setting the request id during intra service requests

INTERNAL_REQUEST_USER_HEADER: str = 'x-insanic-request-user'

Header key for setting request user context in intra service requests

INTERNAL_REQUEST_SERVICE_HEADER: str = 'x-insanic-request-service'

Header key for setting request service context during intra service requests

REQUIRED_PLUGINS: Tuple[str] = ()

if there should be any required plugins when running Insanic