def get_engine_args(url: str | None = None) -> dict[str, Any]:
    """Get the database engine arguments.

    Args:
        url: The database url.

    Returns:
        The database engine arguments as a dict.
    """
    kwargs: dict[str, Any] = {
        # Print the SQL queries if the log level is INFO or lower.
        "echo": environment.SQLALCHEMY_ECHO.get(),
        # Check connections before returning them.
        "pool_pre_ping": environment.SQLALCHEMY_POOL_PRE_PING.get(),
    }
    conf = get_config()
    url = url or conf.db_url
    if url is not None and url.startswith("sqlite"):
        # Needed for the admin dash on sqlite.
        kwargs["connect_args"] = {"check_same_thread": False}
    return kwargs
Get the database engine arguments.

    Args:
        url: The database url.

    Returns:
        The database engine arguments as a dict.
    
reflex/model.py