Skip to main content

A tiny documents database for Python

Project description

Shelf DB


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 ('', 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
db = shelfquery.db()

# Make it async client

# Make it sync client again

Store data

    'title': 'Shelf DB',
    'content': 'Simple note',
    'datetime': datetime.utcnow()})

Flexible query API with similar syntax

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

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
    .filter(lambda note:
        re.match(r'.*DB$', note['title']))\


shelfdb ~ 12kB shelfquery ~ 4kB

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

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

shelfdb-1.0.0.tar.gz (9.5 kB view hashes)

Uploaded Source

Built Distribution

shelfdb-1.0.0-py3-none-any.whl (9.9 kB view hashes)

Uploaded Python 3

Supported by

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