octomachinery.app.config module#

GitHub App/bot configuration.

class octomachinery.app.config.BotAppConfig(github=Raise(), action=Raise(), server=Raise(), runtime=Raise())[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({'READTHEDOCS_VIRTUALENV_PATH': '/home/docs/checkouts/readthedocs.org/user_builds/octomachinery/envs/stable', 'READTHEDOCS_CANONICAL_URL': 'https://docs.octomachinery.dev/en/stable/', 'RTD_PYTHON_VERSION_35': '3.5.10', 'HOSTNAME': 'build-21044562-project-386025-octomachinery', 'RTD_PYTHON_VERSION_27': '2.7.18', 'RTD_PYTHON_VERSION_36': '3.6.12', 'RTD_PYTHON_VERSION_37': '3.7.9', 'APPDIR': '/app', 'RTD_PYTHON_VERSION_38': '3.8.6', 'READTHEDOCS_GIT_CLONE_URL': 'https://github.com/sanitizers/octomachinery.git', 'HOME': '/home/docs', 'RTD_SETUPTOOLS_VERSION': '45.1.0', 'NO_COLOR': '1', 'READTHEDOCS': 'True', 'RTD_PYPY_VERSION_35': 'pypy3.5-7.0.0', 'READTHEDOCS_PROJECT': 'octomachinery', 'READTHEDOCS_OUTPUT': '/home/docs/checkouts/readthedocs.org/user_builds/octomachinery/checkouts/stable/_readthedocs/', 'PATH': '/home/docs/checkouts/readthedocs.org/user_builds/octomachinery/envs/stable/bin:/home/docs/.pyenv/shims:/home/docs/.pyenv/shims:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/home/docs/.conda/bin:/home/docs/.pyenv/bin:/home/docs/.conda/bin:/home/docs/.pyenv/bin', 'READTHEDOCS_VERSION_TYPE': 'tag', 'RTD_PIP_VERSION': '20.0.1', 'LANG': 'C.UTF-8', 'READTHEDOCS_LANGUAGE': 'en', 'DEBIAN_FRONTEND': 'noninteractive', 'READTHEDOCS_GIT_COMMIT_HASH': '20838c112cf5312e414e18672de7638b791ac9f0', 'READTHEDOCS_VERSION_NAME': 'stable', 'RTD_VIRTUALENV_VERSION': '16.7.9', 'RTD_CONDA_VERSION': '4.6.14', 'READTHEDOCS_VERSION': 'stable', 'PWD': '/home/docs/checkouts/readthedocs.org/user_builds/octomachinery/checkouts/stable/docs', 'PYENV_ROOT': '/home/docs/.pyenv', 'READTHEDOCS_GIT_IDENTIFIER': '20838c112cf5312e414e18672de7638b791ac9f0', 'DOCUTILSCONFIG': '/home/docs/checkouts/readthedocs.org/user_builds/octomachinery/checkouts/stable/docs/docutils.conf'}))#
classmethod generate_help(**kwargs)#
github#
runtime#
server#