A dumb database, not for production
Project description
dumbee
Pretend it's a database
Installation
pip install dumbee
Getting started
import dumbee
# create an Engine
db = dumbee.Engine(
driver=dumbee.drivers.Filesystem("./data", extensions=[(".", "json")]),
middlewares=dumbee.Pipeline(
[
dumbee.ext.logging.Logger(),
dumbee.ext.jsonschema.Validator(
{
"schema": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"age":{
"type":"number"
}
},
"required":["name"]
},
"paths":[
"./users/[A-Za-z]+$"
]
}
),
dumbee.ext.json.Serializer(),
]
),
)
# write and read back a record
me = (
db
.collections["users"]
.get("me")
.write({"name":"David", "age":32})
.read()
)
# nested collection
repos = (
db
.collections["users"]
.get("me")
.collections["repositories"]
.get("OSS")
.write(["easychart","easytree","doubledate","dumbee"])
.read()
)
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
dumbee-0.1.0.tar.gz
(8.0 kB
view details)
Built Distribution
dumbee-0.1.0-py3-none-any.whl
(11.2 kB
view details)
File details
Details for the file dumbee-0.1.0.tar.gz
.
File metadata
- Download URL: dumbee-0.1.0.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 639d52624668dc0eae376f20226617098fc8fda5d8f0cc76a6fad53440b909f5 |
|
MD5 | 40f78b329b59187e5c09f76e39a1039e |
|
BLAKE2b-256 | 096b23ee9100dc48ca23f6e64498a0e31a4deeda79fa9d551230edf15b286749 |
File details
Details for the file dumbee-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: dumbee-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.10.9
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1f33bc420c9083d947aee4c31d4e79b36c81509fcb9a1a8448df2cc5365ff83 |
|
MD5 | 31af5e33272a213940b5c99c2438c20b |
|
BLAKE2b-256 | 9a65e1fe65639d17bf4fece187f56f4ca91db6049d8edf73364fb16a611d976b |