octomachinery.app.config module

GitHub App/bot configuration.

class octomachinery.app.config.BotAppConfig(github=None, action=None, server=None, runtime=None)[source]

Bases: object

Bot app config.

Construct it as follows:: >>> from octomachinery.app.config import BotAppConfig >>> config = BotAppConfig.from_dotenv() # for dev env >>> config = BotAppConfig.from_env() # for pure env >>>

action
classmethod from_dotenv(*, app_name: Optional[str] = None, app_version: Optional[str] = None, app_url: Optional[str] = None)[source]

Return an initialized dev config instance.

Read .env into env vars before that.

classmethod from_env(*, app_name: Optional[str] = None, app_version: Optional[str] = None, app_url: Optional[str] = None)[source]

Return an initialized config instance.

classmethod from_environ(environ=environ({'HOSTNAME': 'build-11014522-project-386025-octomachinery', 'PYPY_VERSION_35': 'pypy3.5-7.0.0', 'APPDIR': '/app', 'HOME': '/home/docs', 'OLDPWD': '/', 'CONDA_VERSION': '4.7.12.1', 'READTHEDOCS': 'True', 'READTHEDOCS_PROJECT': 'octomachinery', 'PATH': '/home/docs/checkouts/readthedocs.org/user_builds/octomachinery/envs/latest/bin:/home/docs/.pyenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/docs/.conda/bin:/home/docs/.pyenv/bin', 'LANG': 'C.UTF-8', 'READTHEDOCS_LANGUAGE': 'en', 'DEBIAN_FRONTEND': 'noninteractive', 'PYTHON_VERSION_35': '3.5.7', 'PYTHON_VERSION_27': '2.7.16', 'PYTHON_VERSION_36': '3.6.8', 'READTHEDOCS_VERSION': 'latest', 'PWD': '/home/docs/checkouts/readthedocs.org/user_builds/octomachinery/checkouts/latest/docs', 'PYTHON_VERSION_37': '3.7.3', 'PYENV_ROOT': '/home/docs/.pyenv', 'PYTHON_VERSION_38': '3.8.0', 'DOCUTILSCONFIG': '/home/docs/checkouts/readthedocs.org/user_builds/octomachinery/checkouts/latest/docs/docutils.conf', 'READTHEDOCS_EXEC': 'True'}))
classmethod generate_help(**kwargs)
github
runtime
server