eyes.config

eyes config module

Eyes config

class eyes.config.EyesConfig(_env_file: Optional[Union[pathlib.Path, str]] = '<object object>', _env_file_encoding: Optional[str] = None, _secrets_dir: Optional[Union[pathlib.Path, str]] = None, *, tasks: Dict, wiki: Dict)

Eyes Config

classmethod from_yaml(file: str) eyes.config.EyesConfig

Create EyesConfig from yaml

Parameters

file (str) – config file path

class eyes.config.MySQLConfig(_env_file: Optional[Union[pathlib.Path, str]] = '<object object>', _env_file_encoding: Optional[str] = None, _secrets_dir: Optional[Union[pathlib.Path, str]] = None, *, host: str, port: int = 3306, user: str, password: str, database: str = 'eyes')

MySQL config

host

database host

Type

str

port

database port

Type

int

user

database username

Type

str

password

database password

Type

str

database

database name

Type

str

class eyes.config.CeleryConfig(_env_file: Optional[Union[pathlib.Path, str]] = '<object object>', _env_file_encoding: Optional[str] = None, _secrets_dir: Optional[Union[pathlib.Path, str]] = None, *, broker: str, backend: str, timezone: str = 'Asia/Taipei', task_serializer: str = 'json', result_backend_transport_options: Dict = {'visibility_timeout': 3600}, installed_apps: List = ['eyes.celery.crawler.tasks', 'eyes.celery.stats.tasks', 'eyes.celery.ml.tasks'])

Celery config

broker_url

celery broker url

Type

str

result_backend

celery result backend

Type

str

timezone

celery timezone

Type

str

task_serializer

celery task serializer

Type

str

result_backend_transport_options

result backend transport options

Type

Dict

installed_apps

celery installed apps

Type

List

class eyes.config.SpacyConfig(_env_file: Optional[Union[pathlib.Path, str]] = '<object object>', _env_file_encoding: Optional[str] = None, _secrets_dir: Optional[Union[pathlib.Path, str]] = None, *, name: Union[str, pathlib.Path] = 'zh_core_web_sm')

Spacy config

name

spacy model name or path

Type

Union[str, Path]