biothings.web.settings

biothings.web.settings.configs

class biothings.web.settings.configs.ConfigModule(config=None, parent=None, validators=(), **kwargs)[source]

Bases: object

A wrapper for the settings that configure the web API.

  • Environment variables can override settings of the same names.

  • Default values are defined in biothings.web.settings.default.

class biothings.web.settings.configs.ConfigPackage(root, modules)[source]

Bases: tuple

Create new instance of ConfigPackage(root, modules)

property modules

Alias for field number 1

property root

Alias for field number 0

biothings.web.settings.configs.load(config='config')[source]
biothings.web.settings.configs.load_module(config, default=None)[source]

Load a config module.

config:
  1. a module object

  2. a fully qualified module name

  3. a file path to a module

biothings.web.settings.default

Biothings Web Settings Default

biothings.web.settings.validators

class biothings.web.settings.validators.DBParamValidator[source]

Bases: object

validate(config)[source]
class biothings.web.settings.validators.MongoParamValidaor[source]

Bases: object

validate(config)[source]
class biothings.web.settings.validators.SubmoduleValidator[source]

Bases: object

validate(config)[source]
class biothings.web.settings.validators.WebAPIValidator[source]

Bases: object

validate(config)[source]