Python dict with Deta backend
Project description
detadict
Goal: create dictionary that fully compatible with native python dictionary interface.
Example:
from detadict import detadict
users = detadict()
users["John"] = {
"id": 1,
"sex": "male"
}
users["Katy"] = {
"id": 2,
"sex": "female"
}
Requirements:
🤦♂️ All you need to do is set the environment variable DETA_PROJECT_KEY
with the Deta project key.
Currently not supported:
- Update of mutable values
users["John"]["sex"] = "female"
print(users["John"]) # {"id": 1, "sex": "male"}
copy
andsetdefault
methods
# raise NotImplementedError
users.copy()
users.setdefault("Bob", {})
Installing:
pip install detadict
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 Distribution
detadict-0.1.0.tar.gz
(3.1 kB
view hashes)