Key-Value Model for Detabase
Project description
Key-Value Model for Detabase
API
constructor
class KVModel(dict)
example:
from kv_deta import KVModel
class Example(KVModel):
class Config:
deta_key = DETA_BASE_KEY
# or
deta = Deta(DETA_BASE_KEY)
table_name = "my_kv_table" # optional
kv = Example({"key":"value"})
update
like for dictionary
kv.update({"k2":42})
save
commit all data to detabase
kv.save()
get
mixed dict.get(key), deta.get(key), dict.setdefault(key, default)
kv.get(key:str="some key", default="newer data")
return value from deta.get(key)
or update it by default
if value is None
Updates
get
fixed- implemented
get(key, default)
- implemented
save()
License
- It's opensource and free software, see the LICENSE for more details
similar projects
TODO
-
query()
-
dec()
-
inc()
-
get(key)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
kv_deta-0.1.8a0-py3-none-any.whl
(15.4 kB
view hashes)
Close
Hashes for kv_deta-0.1.8a0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 549c26c9541e3e474edd735fde0372b731d58b0e4714e109be4b81a71d5916ba |
|
MD5 | 3e265a29fc8eef5b8db31a2d3ca94048 |
|
BLAKE2b-256 | 75abf67dd146b33a36f05fb81cb3638d1f21d8b234794f37f5e90f3b9b05b1bf |