Skip to main content

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.

Source Distribution

bluedb-0.3.0.5.tar.gz (4.7 kB view details)

Uploaded Source

File details

Details for the file bluedb-0.3.0.5.tar.gz.

File metadata

  • Download URL: bluedb-0.3.0.5.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: Python-urllib/3.7

File hashes

Hashes for bluedb-0.3.0.5.tar.gz
Algorithm Hash digest
SHA256 a15fad8e5eb936dabde820e8dd33a8a93ac7647310d2f91a4b31f71fb4a260fd
MD5 fbe38d6bf9af267a389e0a957f04c7bc
BLAKE2b-256 f31995f76d1bfcb2c85cb2f721be8cccb3f134aa1faba0a54c0d62fd95c1f018

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page