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

Overview

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.

You might also like...
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,

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

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

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

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

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-

HTTP graph database built in Python 3

KiwiDB HTTP graph database built in Python 3. Reference Format References are strings in the format: {refIDENTIFIER@GROUP} Authentication Currently, t

A NoSQL database made in python.

CookieDB A NoSQL database made in python.

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".

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

    opened by nitipit 2
  • 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.
    opened by nitipit 1
  • 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

    opened by nitipit 0
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

Clutter Development 1 Jan 12, 2022
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

Markus Siemens 5.6k Dec 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

null 1 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

Stanislaw 14 Oct 1, 2022
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

PysonDB 282 Jan 7, 2023
Simpledb-py: Simple JSON database

Simpledb-py: Simple JSON database

тейлс 2 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

null 3 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* ??

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

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

aWolver 1 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 >>>

Harrison Erd 738 Jan 4, 2023