RockyDB
Simple NoSQL database written in Python. It relies on rocksdb as its storage engine. This is more of a Proof-of-concept than a production-ready database.
Installation
pip install rockydb
Contents
Features
Currently under active development, however here is the feature list so far:
- Create collections
- Insert, get and delete documents
- REST API
- Query language
- Indexes
- Full-text Search [IN-DEVELOPMENT]
Performance
Dataset: NBA Players Dataset. Computer: MacBook Pro (13-inch, 2019). RockyDB is still in its early days, these results will likely get better in the future.
| Database | Insert | Get | Query | Delete |
|---|---|---|---|---|
| RockyDB | 0.00074 | 0.00038 | 0.00014 | 0.00023 |
| MongoDB | 0.04436 | 0.04518 | 0.00004 | 0.04264 |
Documentation
Full Documentation. Below are the basics:
Create collection
from rockydb import RockyDB
db = RockyDB(path="database/")
news = db.collection("news")
Insert document
Supported data types: str, int, float, bool and list. Will support more later.
doc_id = news.insert({
"title": "Can store strings",
"year": 2022,
"people": ["lists", "are", "fine", "too"],
"pi": 3.14,
"real": True
})
The insert method will return a unique document _id. _id will be created if document does not contain it.
Get document
news.get(doc_id)
Delete document
news.delete(doc_id)
Query
news.find({"pi?lt": 3.14, "real": True}, limit=10)
The limit arg is optional, default is 10. Supports exact, lte, lt, gt and gte queries.
Metadata
Release files for rockydb 0.2.10
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| RockyDB-0.2.10.tar.gz | 16.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| RockyDB-0.2.10-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 32.9 kB
Release files / RockyDB-0.2.10.tar.gz
| Download URL | RockyDB-0.2.10.tar.gz |
|---|---|
| Size | 16.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f3f98c74e917a1aebf82ed54bc57a750016b9ae083617e06fbceea9f06cf96f
|
|
BLAKE2b-256 checksum How to use checksums |
988fabc3a957041801fe43793570c0544e10757699d600283dbd23a655274c3e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.5 Darwin/21.5.0
|
Release files / RockyDB-0.2.10-py3-none-any.whl
| Download URL | RockyDB-0.2.10-py3-none-any.whl |
|---|---|
| Size | 16.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
da61192d57fa4a19543cf4734823a6bf89347928235607e9709b8aebf3725000
|
|
BLAKE2b-256 checksum How to use checksums |
1314d132f9dd20ec84636f085127a22e9e2240e81c13c3900841cf8ba6b931e9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.8.5 Darwin/21.5.0
|