Simple database for Python user
Project description
FunDB
'FunDB for local dict structured database for python
- Easy to use
- Offline
- python dictnary 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}
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'
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
fundb-0.0.3.tar.gz
(3.7 kB
view hashes)
Built Distribution
fundb-0.0.3-py3-none-any.whl
(6.2 kB
view hashes)