Skip to content

Commit 1f92cd1

Browse files
committed
Update README
1 parent 5bfa837 commit 1f92cd1

File tree

2 files changed

+6
-10
lines changed

2 files changed

+6
-10
lines changed

README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -70,16 +70,16 @@ pip install flaxkv
7070
### Usage
7171

7272
```python
73-
from flaxkv import dictdb
73+
from flaxkv import FlaxKV
7474
import numpy as np
7575

76-
db = dictdb('test_db')
76+
db = FlaxKV('test_db')
7777
"""
7878
Or start as a server
7979
>>> flaxkv run --port 8000
8080
8181
Client call:
82-
db = dictdb('test_db', root_path_or_url='http://localhost:8000')
82+
db = FlaxKV('test_db', root_path_or_url='http://localhost:8000')
8383
"""
8484

8585
db[1] = 1
@@ -109,8 +109,6 @@ print(len(db))
109109
### Tips
110110
- `flaxkv` provides performance close to native dictionary (in-memory) access as a persistent database! (See benchmark below)
111111
- You may have noticed that in the previous example code, `db.close()` was not used to release resources! Because all this will be automatically handled by `flaxkv`. Of course, you can also manually call db.close() to immediately release resources.
112-
- Since `flaxkv` saves data by buffered writing, this feature of delayed writing may not write data to the disk in time in some scenarios (such as in Jupyter),
113-
in this case, you can use `db.write_immediately()` to immediately trigger a write operation.
114112

115113
### Benchmark
116114
![benchmark](.github/img/benchmark.png)

README_ZH.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -73,17 +73,17 @@ pip install flaxkv
7373
### 使用
7474

7575
```python
76-
from flaxkv import dictdb
76+
from flaxkv import FlaxKV
7777
import numpy as np
7878

79-
db = dictdb('test_db')
79+
db = FlaxKV('test_db')
8080

8181
"""
8282
或者作为服务端启动
8383
>>> flaxkv run --port 8000
8484
8585
客户端调用:
86-
db = dictdb('test_db', root_path_or_url='http://localhost:8000')
86+
db = FlaxKV('test_db', root_path_or_url='http://localhost:8000')
8787
"""
8888

8989
db[1] = 1
@@ -115,8 +115,6 @@ print(len(db))
115115

116116
- `flaxkv`作为持久化数据库提供了接近原生字典(内存)存取的性能!(见下文benchmark)
117117
- 也许你注意到在前面的示例代码中并没有使用到`db.close()`来进行资源释放!因为这一切都将被`flaxkv`自动处理。 当然也可以手动调用 `db.close()` 来立即释放资源
118-
- 由于`flaxkv`通过缓冲写入的方式来保存数据,这种延迟写入的特性在一些场景(如jupyter中)下将不能及时将数据写入磁盘,
119-
此时可使用`db.write_immediately()`来立即触发写入操作。
120118

121119
### Benchmark
122120
![benchmark](.github/img/benchmark.png)

0 commit comments

Comments
 (0)