Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/avinassh/py-caskdb
/ functions
Functions
43 in github.com/avinassh/py-caskdb
⨍
Functions
43
◇
Types & classes
12
↓ 13 callers
Method
get
get retrieves the value from the disk and returns. If the key does not exist then it returns an empty string Args:
src/caskdb/disk_store.py:127
↓ 12 callers
Method
close
(self)
src/caskdb/disk_store.py:193
↓ 9 callers
Method
set
set stores the key and value on the disk Args: key (str): the key value (str): the value
src/caskdb/disk_store.py:104
↓ 4 callers
Method
get
(self, key: str)
src/caskdb/memory_store.py:8
↓ 2 callers
Method
clean_up
(self)
tests/test_disk_store.py:34
↓ 2 callers
Function
decode_header
decode_header decodes the bytes into header using the `HEADER_FORMAT` format string Args: data (bytes): byte object containing t
src/caskdb/format.py:168
↓ 2 callers
Function
decode_kv
decode_kv decodes the data bytes into appropriate KV pair Args: data (bytes): byte object containing the encoded KV data Return
src/caskdb/format.py:141
↓ 2 callers
Function
encode_header
encode_header encodes the data into bytes using the `HEADER_FORMAT` format string Args: timestamp (int): Timestamp at which we w
src/caskdb/format.py:100
↓ 2 callers
Function
encode_kv
encode_kv encodes the KV pair into bytes Args: timestamp (int): Timestamp at which we wrote the KV pair to the disk. The value
src/caskdb/format.py:120
↓ 2 callers
Method
header_test
(self, tt: Header)
tests/test_format.py:49
↓ 2 callers
Method
kv_test
(self, tt: KeyValue)
tests/test_format.py:76
↓ 2 callers
Method
set
(self, key: str, value: str)
src/caskdb/memory_store.py:5
↓ 1 callers
Method
_init_key_dir
(self)
src/caskdb/disk_store.py:167
↓ 1 callers
Method
_write
(self, data: bytes)
src/caskdb/disk_store.py:153
↓ 1 callers
Method
close
(self)
src/caskdb/memory_store.py:11
↓ 1 callers
Function
get_random_header
()
tests/test_format.py:18
↓ 1 callers
Function
get_random_kv
()
tests/test_format.py:26
↓ 1 callers
Function
store_books
()
src/caskdb/example.py:22
↓ 1 callers
Function
store_db
()
src/caskdb/example.py:12
Method
__getitem__
(self, item: str)
src/caskdb/disk_store.py:204
Method
__init__
(self)
src/caskdb/memory_store.py:2
Method
__init__
(self, timestamp: int, position: int, total_size: int)
src/caskdb/format.py:94
Method
__init__
(self, file_name: str = "data.db")
src/caskdb/disk_store.py:91
Method
__init__
(self, path: typing.Optional[str] = None)
tests/test_disk_store.py:26
Method
__setitem__
(self, key: str, value: str)
src/caskdb/disk_store.py:201
Function
memory_db
()
src/caskdb/example.py:5
Method
setUp
(self)
tests/test_disk_store.py:43
Method
tearDown
(self)
tests/test_disk_store.py:46
Method
test_KV_serialisation
(self)
tests/test_format.py:84
Method
test_bad
(self)
tests/test_format.py:70
Method
test_close
(self)
tests/test_memory_store.py:16
Method
test_deletion
(self)
tests/test_disk_store.py:88
Method
test_dict_api
(self)
tests/test_disk_store.py:60
Method
test_get
(self)
tests/test_disk_store.py:49
Method
test_get
(self)
tests/test_memory_store.py:7
Method
test_get_new_file
(self)
tests/test_disk_store.py:115
Method
test_header_serialisation
(self)
tests/test_format.py:56
Method
test_init
(self)
tests/test_format.py:100
Method
test_invalid_key
(self)
tests/test_disk_store.py:55
Method
test_invalid_key
(self)
tests/test_memory_store.py:12
Method
test_persistence
(self)
tests/test_disk_store.py:66
Method
test_random
(self)
tests/test_format.py:65
Method
test_random
(self)
tests/test_format.py:92