Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

A flat file database for json objects.

Project description

# jsondb [![Build Status][travis-image]][travis-build]

This is a utility for managing content in a database which stores
content in JSON format.

## Usage

from jsondb.db import Database
db = Database("mydata.db")

The database has an attribute which works similar to
[jQuery's `data`][jquery-data] attribute.

# Getting all data
db = Database("mydata.db")

# Getting a stored value
db = Database("mydata.db")

**It is important to note that a key will be created regardless of whether it
exists as long as a value is provided.** The database has the same functionality
as a dictionary.

# Setting a value
db = Database("mydata.db")"user_count", value=241)

# Passing in a dictionary value
db = Database("mydata.db")
data = {
"user_id": 234565,
"user_name": "AwesomeUserName",
"is_moderator": True,

# Deleting a value
db = Database("mydata.db")

The database also supports a dictionary-like syntax for retrieving, setting, and
removing values.

db = Database("mydata.db")

# Retrieving a value
value = db["key"]

# Setting a value
db["key"] = value

# Removing a key
del db["key"]

# Checking if a key exists
"key" in db



`See release notes

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for jsondatabase, version 0.0.4
Filename, size File type Python version Upload date Hashes
Filename, size jsondatabase-0.0.4-py2.py3-none-any.whl (4.8 kB) File type Wheel Python version 2.7 Upload date Hashes View
Filename, size jsondatabase-0.0.4.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page