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 ~ 4kBRuntime code is small, easy to install. Shelf DB also works on Raspberry Pi.
Metadata
Release files for shelfdb 1.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shelfdb-1.1.1.tar.gz | 9.7 kB | Without provenance | Details for shelfdb-1.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| shelfdb-1.1.1-py3-none-any.whl | Python 3 | none | any | Details for shelfdb-1.1.1-py3-none-any.whl |
Total release size: 19.8 kB
Release files / shelfdb-1.1.1.tar.gz
| Download URL | shelfdb-1.1.1.tar.gz |
|---|---|
| Size | 9.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
84b2c0ce252ee9f6df0f9af3f53d406c7743127fc9f26f41bb218403fae9f55a
|
|
BLAKE2b-256 checksum How to use checksums |
83457936ea18339cf5250b9ff0e4930278b68923110d80ddd111a4785647d734
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / shelfdb-1.1.1-py3-none-any.whl
| Download URL | shelfdb-1.1.1-py3-none-any.whl |
|---|---|
| Size | 10.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
99ab06fb4750c78514f8c73a4bea45d9117d5a5a281580bd3b166f1eb5b681a3
|
|
BLAKE2b-256 checksum How to use checksums |
bb55c75858df26e7f114e036acca6f4239c41841597e546d77de9909cddb53b9
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for shelfdb 1.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.