this project is no longer maintained, probably doesn't work... apologies.
Oopsy... Version 0.3.0.3 on PyPi had problems with the setup file and caused it to not download, very sorry, everything should be fixed now...
use my database, is good!
>>> from BlueDB import Blue
>>> database = Blue('database')
>>> database['key'] = {'nested key': 'nested value'}
>>> print(database['key']['nested key'])
nested value
>>> database['key']['nested key'] = 'new value'
>>> print(database)
{'key': {'nested key': 'new value'}}
py -m pip install BlueDB
to install it then import Blue
class and you're good to go!
Blue2 ~ A BlueDB subset
Blue2 uses JSON to make it faster and more human readable. Blue2 also sticks with the same framework and design as the original BlueDB.
>>> from BlueDB.blue2 import Blue
>>> database = Blue('database')
>>> database['key'] = {'nested key': 'nested value'}
#same functions and features as BlueDB...but more JSON!!!
>>> print(database['key']['nested key'])
nested value
#WOW very JSON!!!
>>> database['key']['nested key'] = 'new value'
>>> print(database)
{'key': {'nested key': 'new value'}}
Blue2 can use Builtin JSON, UltraJSON or RapidJSON
Blue3 ~ A BlueDB superset
>>> from BlueDB.blue3 import Blue
>>> database = Blue('database')
>>> database['key'] = {'nested key': 'nested value'}
>>> database2 = Blue('database')
>>> print(database); print(database2)
{'key': {'nested key': 'nested value'}} #database
{'key': {'nested key': 'nested value'}} #database2
>>> database['key']['nested key'] = 'new value'
>>> print(database); print(database2)
{'key': {'nested key': 'new value'}} #database
{'key': {'nested key': 'new value'}} #database2
Blue3 can also use Builtin JSON, UltraJSON or RapidJSON
What makes Blue3 different from both the original BlueDB and Blue2 is Blue3 has a special feature which lets you open and run multiple versions of the same database and have fluent consistent data flow across all of them. Meaning when you edit data in one version of the database it will automatically update that information into every other version.
Blue3 uses JSON, in-memory caches and memory monitoring to incrementally dump data from in-memory to disk, making key setting and getting faster and more efficient. The same principal is used in the library Chest from which I got the idea to spill to disk.
Currently yes. Will it be the best overall? no, BlueDB will have better and faster versions in the future. All of my any or up and coming work can be seen in Indev