Skip to content

Commit 8c6c642

Browse files
committed
update readme
1 parent 0bf739f commit 8c6c642

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

README.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ MY_BOX_ID = str(uuid.uuid4()).replace("-", "_")
2121
# create instance
2222
jb = JsonBox()
2323

24-
data = [{"name": "David", "age": "25"}, {"name": "Alice", "age": "19"}]
24+
data = [{"name": "first", "age": 25}, {"name": "second", "age": 19}]
2525

2626
# write data
2727
result = jb.write(data, MY_BOX_ID)
@@ -38,6 +38,16 @@ print(jb.read(MY_BOX_ID))
3838
# read all records in box with sort
3939
print(jb.read(MY_BOX_ID, sort_by="age"))
4040

41+
# read records in box with sort matching query (see documentation for syntax)
42+
print(jb.read(MY_BOX_ID, query="name:firs*"))
43+
print(jb.read(MY_BOX_ID, query="age:=19"))
44+
45+
# read records with limit
46+
print(jb.read(MY_BOX_ID, limit=1))
47+
48+
# read records with skip
49+
print(jb.read(MY_BOX_ID, skip=1))
50+
4151
# update data
4252
data = {"name": "Bob", "age": "25"}
4353
jb.update(data, MY_BOX_ID, record_ids[0])

0 commit comments

Comments
 (0)