Skip to main content

A NoSQL database.

Project description

RockyDB

License CI codecov

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.

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

RockyDB-0.2.10.tar.gz (16.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

RockyDB-0.2.10-py3-none-any.whl (16.8 kB view details)

Uploaded Python 3

File details

Details for the file RockyDB-0.2.10.tar.gz.

File metadata

  • Download URL: RockyDB-0.2.10.tar.gz
  • Upload date:
  • Size: 16.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.5 Darwin/21.5.0

File hashes

Hashes for RockyDB-0.2.10.tar.gz
Algorithm Hash digest
SHA256 0f3f98c74e917a1aebf82ed54bc57a750016b9ae083617e06fbceea9f06cf96f
MD5 a78bdb856ce3fc57ec190f6effe4aad7
BLAKE2b-256 988fabc3a957041801fe43793570c0544e10757699d600283dbd23a655274c3e

See more details on using hashes here.

File details

Details for the file RockyDB-0.2.10-py3-none-any.whl.

File metadata

  • Download URL: RockyDB-0.2.10-py3-none-any.whl
  • Upload date:
  • Size: 16.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.13 CPython/3.8.5 Darwin/21.5.0

File hashes

Hashes for RockyDB-0.2.10-py3-none-any.whl
Algorithm Hash digest
SHA256 da61192d57fa4a19543cf4734823a6bf89347928235607e9709b8aebf3725000
MD5 75648c6881d6e5983361055340f1e554
BLAKE2b-256 1314d132f9dd20ec84636f085127a22e9e2240e81c13c3900841cf8ba6b931e9

See more details on using hashes here.

Supported by

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