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.2.2.tar.gz
(8.0 kB
view hashes)
Built Distribution
dumbee-0.2.2-py3-none-any.whl
(11.4 kB
view hashes)