FunDB for dictionary structured database for python
- Easy to use
- Offline
- python dictionary format
$ python3 -m pip install fundb
>>> from fundb import fdb
>>> db = fdb('nameOfDb', 'secret', rotate = 8000)
- It over write data
- (type) dict only
>>> Data = {'name': 'cat', 'age': 2}
>>> db.write(Data)
- (type) dict only
>>> db.read()
{'name': 'cat', 'age': 2}
>>> db.insert('key1', ['value1', 'value2'])
{'name': 'cat', 'age': 2, 'key1': ['value1', 'value2']}
>>> db.remove('key1')
{'name': 'cat', 'age': 2}
>>> db.iskey('age')
True
>>> db.getval('age')
2
>>> tmp = db.search('ca')
>>> list[tmp]
[{'name': 'cat'}]
>>> db.db_info()
{'Name': 'nameOfDb.dbf', 'Created': 'Fri Mar 12 07:52:32 2021', 'Modifyed': 'Fri Mar 12 07:52:32 2021', 'Size': 120, 'Mode': 33152, 'UId': 1000, 'GId': 1000}
- Insert Any format
>>> Data2 = 'String type'
>>> db.free_write(Data2)
>>> db.free_read()
'String type'