KelDB is a simple node-based database for asyncio applications.
Project description
KelDB
KelDB is a simple node-based database for asyncio applications.
Dynamics
KelDB is organised into nodes. A node is a container that can hold a value and/or other subnodes. The database itself is the root node, and every piece of data is a subnode of it.
Usage
KelDB is quite flexible. There's only a few commands to learn.
import asyncio
import keldb
# Create a default KelDB database (or load an existing database)
database = keldb.KelDB(keldb.FileStoreHook("./testdb/"))
async def main():
# Create subnodes (lazy creation - no actual subnodes are created yet)
foo = await database.get_subnode("foo")
bar = await database.get_subnode("bar")
baz = await database.get_subnode("baz")
await bar.set_value("This can be any json-serializable object.") # Set a value (now "bar" is actually created)
await baz.set_value({"type": "user", "name": "Gabe Newell"}) # Now "baz" is actually created
text_subnode = await foo.get_subnode("text")
await text_subnode.set_value("If you are reading this, this data saved correctly!") # Write text in a subnode's subnode. (now both "foo" and "foo/text" are created)
print(await text_subnode.get_value()) # Read a value from the database
await foo.delete() # Delete a subnode (do note that this also recursively deletes any subnodes under it)
async for subnode in database.list_subnodes(): # Iterate over subnodes
print(subnode.path)
await database.set_value("Even the database itself is technically a node!")
asyncio.run(main())
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file keldb-0.1.2.tar.gz.
File metadata
- Download URL: keldb-0.1.2.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a63a994733a248112e12047a9dce35441a7ab3f20e26dc7ee25f34a6f80051c8
|
|
| MD5 |
0caede3baf31087bc6605f501334b311
|
|
| BLAKE2b-256 |
03e44d5e264f980457eae3592bd6c08049f5ca68a64b76c20f79ce135ed723d9
|
Provenance
The following attestation bundles were made for keldb-0.1.2.tar.gz:
Publisher:
python-publish.yml on TriangularDev/keldb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keldb-0.1.2.tar.gz -
Subject digest:
a63a994733a248112e12047a9dce35441a7ab3f20e26dc7ee25f34a6f80051c8 - Sigstore transparency entry: 1690605003
- Sigstore integration time:
-
Permalink:
TriangularDev/keldb@d08903a1b6fcb4ec5219ba7091e9374d74fc7a7f -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/TriangularDev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d08903a1b6fcb4ec5219ba7091e9374d74fc7a7f -
Trigger Event:
release
-
Statement type:
File details
Details for the file keldb-0.1.2-py3-none-any.whl.
File metadata
- Download URL: keldb-0.1.2-py3-none-any.whl
- Upload date:
- Size: 5.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7ad3080a7d6a8aee921d42b1c394eba5a61dd37c34dedbf2084b5e2ad268f860
|
|
| MD5 |
44bdddf4802f83ac7ef20f571e58dc27
|
|
| BLAKE2b-256 |
67514fc86f4890c751e17636564ce20f08239cc9427d5c4dbc5c52bb650a0680
|
Provenance
The following attestation bundles were made for keldb-0.1.2-py3-none-any.whl:
Publisher:
python-publish.yml on TriangularDev/keldb
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
keldb-0.1.2-py3-none-any.whl -
Subject digest:
7ad3080a7d6a8aee921d42b1c394eba5a61dd37c34dedbf2084b5e2ad268f860 - Sigstore transparency entry: 1690605024
- Sigstore integration time:
-
Permalink:
TriangularDev/keldb@d08903a1b6fcb4ec5219ba7091e9374d74fc7a7f -
Branch / Tag:
refs/tags/0.1.2 - Owner: https://github.com/TriangularDev
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@d08903a1b6fcb4ec5219ba7091e9374d74fc7a7f -
Trigger Event:
release
-
Statement type: