Skip to main content

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)

Release files for bluedb 0.3.0.5

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for bluedb 0.3.0.5
File Size Uploaded
bluedb-0.3.0.5.tar.gz 4.7 kB Details

Release files / bluedb-0.3.0.5.tar.gz

Download URL bluedb-0.3.0.5.tar.gz
Size 4.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a15fad8e5eb936dabde820e8dd33a8a93ac7647310d2f91a4b31f71fb4a260fd
BLAKE2b-256 checksum
How to use checksums
f31995f76d1bfcb2c85cb2f721be8cccb3f134aa1faba0a54c0d62fd95c1f018
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.7

Release history Release notifications | RSS feed

This release

0.3.0.5 This release

1 release file

0.3.0.4

1 release file

0.3.0.3

1 release file

0.2.4

1 release file

0.2.3

1 release file

0.2.2

1 release file

0.2.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page