Skip to main content

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

Release files for pylocaldatabase 1.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pylocaldatabase 1.2.4
File Size Uploaded
pylocaldatabase-1.2.4.tar.gz 5.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pylocaldatabase 1.2.4
File Interpreter ABI Platform
pylocaldatabase-1.2.4-py3-none-any.whl Python 3 none any Details

Total release size:10.8 kB

Release files / pylocaldatabase-1.2.4.tar.gz

Download URL pylocaldatabase-1.2.4.tar.gz
Size 5.2 kB
Tags Source
SHA-256 checksum
How to use checksums
9e42d5d93cb7cd6568c4f24d0b6c0edcce338c8ea1e873b2fcc3cf1407e0718e
BLAKE2b-256 checksum
How to use checksums
e3d190a2b453c876da7dcfaa637b126370026772dc1a6cb2fd0f2d4f62abb768
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18

Release files / pylocaldatabase-1.2.4-py3-none-any.whl

Download URL pylocaldatabase-1.2.4-py3-none-any.whl
Size 5.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
03eb03d8550edad942bf7731f98a0c4ff9c4176e2cdef305f19622740317b0d9
BLAKE2b-256 checksum
How to use checksums
00014545cbfec19b3159a7a47487986034e2ee90e27e3ae36715f09d5b44c531
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.18
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page