Skip to main content
Join the official Python Developers Survey 2018 and win valuable prizes: Start the survey!

Like shelves but better...

Project description

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

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

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

How is it different?

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.

How is it faster?

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](ttps://github.com/mrocklin/chest) from which I got the idea to spill to disk.

Is this the best version of BlueDB?

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](BlueDB/indev)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
bluedb-0.3.0.3.tar.gz (4.6 kB) Copy SHA256 hash SHA256 Source None Jul 16, 2018

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page