Shelf DB is a tiny document database for Python to stores documents or JSON-like data

Shelf DB

Introduction

Shelf DB is a tiny document database for Python to stores documents or JSON-like data.

Get it

$ pip install shelfdb shelfquery

Start asyncio server

$ shelfdb
Serving on ('127.0.0.1', 17000)
Database : db
pid : 12359

uvloop built-in already to make it faster. See uvloop.

Sync/Async query client through network.

import shelfquery

# Sync client point to 127.0.0.1:17000
db = shelfquery.db()

# Make it async client
db.asyncio()

# Make it sync client again
db.sync()

Store data

db.shelf('note').insert({
    'title': 'Shelf DB',
    'content': 'Simple note',
    'datetime': datetime.utcnow()})

Flexible query API with similar syntax

db.shelf('note')\
    .filter(lambda note:
        note['title'] == 'Shelf DB')\
    .sort(key=lambda note: note['datetime'])
    .run()

No need to learn more syntax. Let's just query using filter, slice, sort, map, reduce which almost the same to Python built-in functions.

Regular expression

Python reqular expression re can be use inside query function

import re
db.shelf('note')\
    .filter(lambda note:
        re.match(r'.*DB$', note['title']))\
    .run()

Tiny

shelfdb ~ 12kB shelfquery ~ 4kB

Runtime code is small, easy to install. Shelf DB also works on Raspberry Pi.

Similar Resources

securedb is a fast and lightweight Python framework to easily interact with JSON-based encrypted databases.

securedb securedb is a Python framework that lets you work with encrypted JSON databases. Features: newkey() to generate an encryption key write(key,

Nov 23, 2022

Oh-My-PickleDB is an open source key-value store using Python's json module.

Oh-My-PickleDB is an open source key-value store using Python's json module.

OH-MY-PICKLEDB oh-my-pickleDB is a lightweight, fast, and intuitive data manager written in python ๐Ÿ“ Table of Contents About Getting Started Deployme

Feb 20, 2022

Python object-oriented database

ZODB, a Python object-oriented database ZODB provides an object-oriented database for Python that provides a high-degree of transparency. ZODB runs on

Dec 2, 2022

Python function to extract all the rows from a SQLite database file while iterating over its bytes, such as while downloading it

Python function to extract all the rows from a SQLite database file while iterating over its bytes, such as while downloading it

Nov 9, 2022

A Persistent Embedded Graph Database for Python

A Persistent Embedded Graph Database for Python

Cog - Embedded Graph Database for Python cogdb.io New release: 2.0.5! Installing Cog pip install cogdb Cog is a persistent embedded graph database im

Nov 21, 2022

A Painless Simple Way To Create Schema and Do Database Operations Quickly In Python

A Painless Simple Way To Create Schema and Do Database Operations Quickly In Python

PainlessDB - Taking Your Pain away to the moon ๐Ÿš€ Contribute ยท Community ยท Documentation ๐ŸŽซ Introduction : PainlessDB is a Python-based free and open-

Jul 15, 2022

HTTP graph database built in Python 3

KiwiDB HTTP graph database built in Python 3. Reference Format References are strings in the format: {[email protected]} Authentication Currently, t

Dec 17, 2021

A NoSQL database made in python.

CookieDB A NoSQL database made in python.

Dec 23, 2021

This is a simple graph database in SQLite, inspired by

This is a simple graph database in SQLite, inspired by

This is a simple graph database in SQLite, inspired by "SQLite as a document database".

Nov 30, 2022
Comments
  • Implement 'uvloop' for better performance

    Implement 'uvloop' for better performance

    uvloop is a fast, drop-in replacement of the built-in asyncio event loop. uvloop is implemented in Cython and uses libuv under the hood. https://github.com/MagicStack/uvloop

  • Use XML-RPC instead of python pickle/dill

    Use XML-RPC instead of python pickle/dill

    Starting point : https://docs.python.org/3/library/xmlrpc.html

    Reasons

    • Standard for many programming languages
    • dill/pickle has limitation when import call function from modules, it dumps functions call as reference which can't be called on server.
  • shelfdb 'start' cmd to start server

    shelfdb 'start' cmd to start server

    In order to start shelfdb server

    $ shelfdb start
    

    for $ shelfdb, change behavior to show cmd help. https://github.com/nitipit/shelfdb/blob/master/shelfdb/server.py#L114

ClutterDB - Extremely simple JSON database made for infrequent changes which behaves like a dict

extremely simple JSON database made for infrequent changes which behaves like a dict this was made for ClutterBot

Jan 12, 2022
TinyDB is a lightweight document oriented database optimized for your happiness :)
TinyDB is a lightweight document oriented database optimized for your happiness :)

Quick Links Example Code Supported Python Versions Documentation Changelog Extensions Contributing Introduction TinyDB is a lightweight document orien

Nov 30, 2022
A very simple document database

DockieDb A simple in-memory document database. Installation Build the Wheel Fork or clone this repository and run python setup.py bdist_wheel in the r

Jan 16, 2022
LightDB is a lightweight JSON Database for Python

LightDB What is this? LightDB is a lightweight JSON Database for Python that allows you to quickly and easily write data to a file Installing pip3 ins

Oct 1, 2022
A Simple , โ˜๏ธ Lightweight , ๐Ÿ’ช Efficent JSON based database for ๐Ÿ Python.
A Simple , โ˜๏ธ Lightweight ,  ๐Ÿ’ช Efficent JSON based database for ๐Ÿ Python.

A Simple, Lightweight, Efficent JSON based DataBase for Python The current stable version is v1.6.1 pip install pysondb==1.6.1 Support the project her

Nov 27, 2022
Simpledb-py: Simple JSON database

Simpledb-py: Simple JSON database

Feb 9, 2022
Simple json type database for python3

What it is? Simple json type database for python3! What about speed? The speed is great! All data is stored in RAM until saved. How to install? pip in

Feb 11, 2022
AWS Tags As A Database is a Python library using AWS Tags as a Key-Value database.

AWS Tags As A Database is a Python library using AWS Tags as a Key-Value database. This database is completely free* ??

Nov 25, 2022
Manage your sqlite database very easy (like django) ...

Manage your sqlite database very easy (like django) ...

Feb 9, 2022
pickleDB is an open source key-value store using Python's json module.

pickleDB pickleDB is lightweight, fast, and simple database based on the json module. And it's BSD licensed! pickleDB is Fun >>> import pickledb >>>

Dec 1, 2022