import peewee as _peewee
from _typeshed import Incomplete

from .utils import get_yf_logger as get_yf_logger

class _TzCacheException(Exception): ...

class _TzCacheDummy:
    def lookup(self, tkr) -> None: ...
    def store(self, tkr, tz) -> None: ...
    @property
    def tz_db(self) -> None: ...

class _TzCacheManager:
    @classmethod
    def get_tz_cache(cls): ...

class _TzDBManager:
    @classmethod
    def get_database(cls): ...
    @classmethod
    def close_db(cls) -> None: ...
    @classmethod
    def set_location(cls, new_cache_dir) -> None: ...
    @classmethod
    def get_location(cls): ...

tz_db_proxy: Incomplete

class _TZ_KV(_peewee.Model):
    key: Incomplete
    value: Incomplete
    class Meta:
        database = tz_db_proxy
        without_rowid: bool

class _TzCache:
    initialised: int
    db: Incomplete
    dummy: bool
    def __init__(self) -> None: ...
    def get_db(self): ...
    def initialise(self) -> None: ...
    def lookup(self, key): ...
    def store(self, key, value) -> None: ...

def get_tz_cache(): ...

class _CookieCacheException(Exception): ...

class _CookieCacheDummy:
    def lookup(self, tkr) -> None: ...
    def store(self, tkr, Cookie) -> None: ...
    @property
    def Cookie_db(self) -> None: ...

class _CookieCacheManager:
    @classmethod
    def get_cookie_cache(cls): ...

class _CookieDBManager:
    @classmethod
    def get_database(cls): ...
    @classmethod
    def close_db(cls) -> None: ...
    @classmethod
    def set_location(cls, new_cache_dir) -> None: ...
    @classmethod
    def get_location(cls): ...

Cookie_db_proxy: Incomplete

class ISODateTimeField(_peewee.DateTimeField):
    def db_value(self, value): ...
    def python_value(self, value): ...

class _CookieSchema(_peewee.Model):
    strategy: Incomplete
    fetch_date: Incomplete
    cookie_bytes: Incomplete
    class Meta:
        database = Cookie_db_proxy
        without_rowid: bool

class _CookieCache:
    initialised: int
    db: Incomplete
    dummy: bool
    def __init__(self) -> None: ...
    def get_db(self): ...
    def initialise(self) -> None: ...
    def lookup(self, strategy): ...
    def store(self, strategy, cookie) -> None: ...

def get_cookie_cache(): ...

class _ISINCacheException(Exception): ...

class _ISINCacheDummy:
    def lookup(self, isin) -> None: ...
    def store(self, isin, tkr) -> None: ...
    @property
    def tz_db(self) -> None: ...

class _ISINCacheManager:
    @classmethod
    def get_isin_cache(cls): ...

class _ISINDBManager:
    @classmethod
    def get_database(cls): ...
    @classmethod
    def close_db(cls) -> None: ...
    @classmethod
    def set_location(cls, new_cache_dir) -> None: ...
    @classmethod
    def get_location(cls): ...

isin_db_proxy: Incomplete

class _ISIN_KV(_peewee.Model):
    key: Incomplete
    value: Incomplete
    created_at: Incomplete
    class Meta:
        database = isin_db_proxy
        without_rowid: bool

class _ISINCache:
    initialised: int
    db: Incomplete
    dummy: bool
    def __init__(self) -> None: ...
    def get_db(self): ...
    def initialise(self) -> None: ...
    def lookup(self, key): ...
    def store(self, key, value) -> None: ...

def get_isin_cache(): ...
def set_cache_location(cache_dir: str): ...
def set_tz_cache_location(cache_dir: str): ...
