MCPcopy Create free account
hub / github.com/requests-cache/requests-cache / __init__

Method __init__

requests_cache/backends/sqlite.py:52–68  ·  view source on GitHub ↗
(
        self,
        db_path: StrOrPath = 'http_cache',
        serializer: Optional[SerializerType] = None,
        **kwargs,
    )

Source from the content-addressed store, hash-verified

50 """
51
52 def __init__(
53 self,
54 db_path: StrOrPath = 'http_cache',
55 serializer: Optional[SerializerType] = None,
56 **kwargs,
57 ):
58 super().__init__(cache_name=str(db_path), **kwargs)
59 # Only override serializer if a non-None value is specified
60 skwargs = {'serializer': serializer, **kwargs} if serializer else kwargs
61 self.responses: SQLiteDict = SQLiteDict(db_path, table_name='responses', **skwargs)
62 self.redirects: SQLiteDict = SQLiteDict(
63 db_path,
64 table_name='redirects',
65 lock=self.responses._lock,
66 serializer=None,
67 **kwargs,
68 )
69
70 @property
71 def db_path(self) -> StrOrPath:

Callers

nothing calls this directly

Calls 2

SQLiteDictClass · 0.85
__init__Method · 0.45

Tested by

no test coverage detected