Skip to main content

A package to simplify the use of json as a way to store data in Python

Project description

Python Local Database

A python package made to simplify the use of json as a mean to organize and store data in python.

Installation

Use the package manager pip to install Python Local Database.

pip install pylocaldatabase

Usage

from pylocaldatabase import pylocaldatabase
# define database file and assign databasecontroller instance to var dbcontroll
dbcontroll = pylocaldatabase.databasecontroller(path="file.json")

# create database file 'file.json'
dbcontroll.makeDatabase()

# create document 
dbcontroll.insertDocument({}, "documentName")

# assign the document we created
document = dbcontroll.getDocument("documentName")

# insert Item to the document
document.insertItem("ItemName", {"Property":"Property Value"})

# read Item data
itemData = document.getItem("ItemName").get()

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

License

MIT

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

pylocaldatabase-1.0.0.tar.gz (4.0 kB view hashes)

Uploaded Source

Built Distribution

pylocaldatabase-1.0.0-py3-none-any.whl (4.4 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