-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.py
29 lines (23 loc) · 1.02 KB
/
settings.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
from pathlib import Path
from typing import List, Optional
from pydantic import Field
from pydantic_settings import BaseSettings
BASE_DIR = Path(__file__).resolve().parent
class Settings(BaseSettings):
captcha_solver_api_key: str = Field(default="", description="2captcha API key")
parallel: int = Field(default=3, description="Number of parallel browsers")
output_dir: Path = Field(
default=BASE_DIR / "output", description="Output directory"
)
search_terms_filepath: Path = Field(
default=BASE_DIR / "sample_data.csv",
description="Filepath of a CSV with first column as vessel names",
)
proxy: Optional[List[str] | str] = Field(default=None, description="Proxy as List")
headless: bool = Field(default=True, description="Run in headless mode")
logs_directory: Path = Field(default=BASE_DIR / "logs")
debug: bool = Field(default=False)
reuse_browser: bool = Field(default=False, description="Reuse driver")
class Config:
env_file = ".env"
settings = Settings()