INNER CODE UNIT · Python
initialize
BlessedRebuS/Krawl · src/database/core.py:161
def initialize(
self,
database_path: str = "data/krawl.db",
mode: str = "standalone",
postgres_config: dict = None,
) -> None:
"""
Initialize the database connection and create tables.
Args:
database_path: Path to the SQLite database file (standalone mode)
mode: "standalone" for SQLite, "scalable" for PostgreSQL
postgres_config: PostgreSQL connection settings (host, port, user, password, database)
"""
if self._initialized:
return
self._mode = mode