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 details)
Built Distribution
dumbee-0.2.2-py3-none-any.whl
(11.4 kB
view details)
File details
Details for the file dumbee-0.2.2.tar.gz
.
File metadata
- Download URL: dumbee-0.2.2.tar.gz
- Upload date:
- Size: 8.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbb31e97a0bb75f00ebfbc43c2ebbd2490ac4a0610a251f7e2983da7b536eee4 |
|
MD5 | e552cd0ce62cf9489c825d54e3289b40 |
|
BLAKE2b-256 | 77074c5dc57fe7da882853c1a6db45d87cab45374227157338840c3969fe8a15 |
File details
Details for the file dumbee-0.2.2-py3-none-any.whl
.
File metadata
- Download URL: dumbee-0.2.2-py3-none-any.whl
- Upload date:
- Size: 11.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.9.19
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1309507e56d2becbd7e02a27d1238c1cbd860c456d8f88ad49bcb014ed4c69d8 |
|
MD5 | 863c18fc86b8ecaad7e787ff2c28b319 |
|
BLAKE2b-256 | 0a4ec71892313490965e223c831f1b9acedc1b07e23bc223233c47f052d6dd11 |