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

Logo Python Local Database

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

Installation

Use the package manager pip to install Python Local Database.

Linux/macOS:

pip install pylocaldatabase

Windows:

py -m pip install pylocaldatabase

Release history and file downloads can be found on the project's pypi page.


Usage

# import library
from pylocaldatabase import pylocaldatabase

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

# load data from file
dbcontroll.load()

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

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

# assigning document to a var
document = dbcontroll.getDocument("documentName")

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

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

# assigning item to var
item = document.getItem("ItemName")

# inserting new property in Item
item.insertProperty("Property Name", "Property Value")

# removing property from item
item.removeProperty("Property Name")

# removing item from document 

document.removeItem("ItemName")

# save data 
dbcontroll.save()

Examples

Examples can be found here.

Cryptography

An example on how to use the built-in Cryptography functions, you can refer to Example 2.

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.2.4.tar.gz (5.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pylocaldatabase-1.2.4-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file pylocaldatabase-1.2.4.tar.gz.

File metadata

  • Download URL: pylocaldatabase-1.2.4.tar.gz
  • Upload date:
  • Size: 5.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.18

File hashes

Hashes for pylocaldatabase-1.2.4.tar.gz
Algorithm Hash digest
SHA256 9e42d5d93cb7cd6568c4f24d0b6c0edcce338c8ea1e873b2fcc3cf1407e0718e
MD5 1b2264889d385aa754a965f46273422e
BLAKE2b-256 e3d190a2b453c876da7dcfaa637b126370026772dc1a6cb2fd0f2d4f62abb768

See more details on using hashes here.

File details

Details for the file pylocaldatabase-1.2.4-py3-none-any.whl.

File metadata

File hashes

Hashes for pylocaldatabase-1.2.4-py3-none-any.whl
Algorithm Hash digest
SHA256 03eb03d8550edad942bf7731f98a0c4ff9c4176e2cdef305f19622740317b0d9
MD5 d28e7ac7692d33069219e35906741080
BLAKE2b-256 00014545cbfec19b3159a7a47487986034e2ee90e27e3ae36715f09d5b44c531

See more details on using hashes here.

Supported by

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