Skip to content

Latest commit

 

History

History
91 lines (66 loc) · 1.27 KB

README.md

File metadata and controls

91 lines (66 loc) · 1.27 KB

FunDB

FunDB for dictionary structured database for python

  • Easy to use
  • Offline
  • python dictionary format

INSTALLATION:

$ python3 -m pip install fundb

IMPORT AND INTI:

>>> from fundb import fdb
>>> db = fdb('nameOfDb',  'secret',  rotate = 8000)

CREATE DB:

  • It over write data
  • (type) dict only
>>> Data = {'name': 'cat', 'age': 2}
>>> db.write(Data)

READ DATA:

  • (type) dict only
>>> db.read()
{'name': 'cat', 'age': 2}

NSERT PARRENT KEY:

>>> db.insert('key1', ['value1', 'value2'])
{'name': 'cat', 'age': 2, 'key1': ['value1', 'value2']}

REMOVE PARRENT KEY:

>>> db.remove('key1')
{'name': 'cat', 'age': 2}

CHECK PARRENT KEY:

>>> db.iskey('age')
True

GET VALUE FROM PARRENT KEY:

>>> db.getval('age')
2

SEARCH VALUE:

>>> tmp = db.search('ca')
>>> list[tmp]
[{'name': 'cat'}]

DB INFO:

>>> 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}

FREE READ AND WRITE:

  • Insert Any format
>>> Data2 = 'String type'
>>> db.free_write(Data2)
>>> db.free_read()
'String type'