Skip to main content

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 and setdefault methods
# raise NotImplementedError
users.copy()
users.setdefault("Bob", {})

Installing:

pip install detadict

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

detadict-0.1.0.tar.gz (3.1 kB view hashes)

Uploaded Source

Built Distribution

detadict-0.1.0-py3-none-any.whl (3.2 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page