Secured Python Json Database
Project description
JXDB - JSON Database Library
You can find JXDB, a powerful JSON database library, on PyPI (Python Package Index) at pypi.org/project/jxdb. JXDB allows you to easily store and manipulate JSON data in your Python projects.
Features
- Simple and intuitive interface for working with JSON data.
- Supports data encryption using AES for secure storage.
- Provides efficient methods for data retrieval, modification, and deletion.
- Supports searching and filtering based on key-value pairs.
- Lightweight and easy to integrate into your projects.
License
JXDB is released under the OpenSociety license. You can find the license details at ccic.eu.org/opensociety.html. The OpenSociety license grants you the freedom to use, modify, and distribute JXDB according to the terms specified in the license.
Installation
You can install JsonDB using pip:
pip install jxdb
Usage
JsonDB
JsonDB is a simple JSON-based database that provides methods for managing key-value data and performing operations like encryption and decryption.
Methods
open(filename, password)
Opens the database from a file with the specified filename and password. It decrypts the data and loads it into memory.
save(filename, password)
Saves the database to a file with the specified filename and password. It encrypts the data and writes it to the file.
get(key)
Retrieves the value associated with the specified key from the database.
set(key, value)
Sets the value for the specified key in the database.
delete(key)
Deletes the value associated with the specified key from the database.
concept(data)
Searches for values that contain the specified data in their keys and returns a list of matching values.
keyconcept(data)
Searches for keys that contain the specified data and returns a list of matching keys.
keys()
Returns a list of all keys in the database.
values()
Returns a list of all values in the database.
items()
Returns a list of all items (key-value pairs) in the database.
clear()
Clears the entire database, removing all key-value pairs.
count()
Returns the number of items in the database.
delete_by_value(data)
Deletes values that contain the specified data from the database.
delete_by_key(key)
Deletes values associated with keys that contain the specified key from the database.
Usage
# Example usage of JsonDB
# Create an instance of JsonDB
db = JsonDB()
# Open the database from a file
db.open("data.json", "password")
# Perform operations on the database
value = db.get("key")
db.set("new_key", "new_value")
db.delete("key")
concept_results = db.concept("data")
keyconcept_results = db.keyconcept("key")
keys = db.keys()
values = db.values()
items = db.items()
db.clear()
count = db.count()
db.delete_by_value("data")
db.delete_by_key("key")
# Save the database to a file
db.save("new_data.json", "password")
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file jxdb-0.1.2.tar.gz
.
File metadata
- Download URL: jxdb-0.1.2.tar.gz
- Upload date:
- Size: 3.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62eaa173187fc1cb041df378b8412e1e7b7b80f212377c0bdd656a799430d227 |
|
MD5 | 864d8bf15c8e5c2a8d73a6fc09617e39 |
|
BLAKE2b-256 | 6ad80e91c2f41958164e68aeb2e5f5cf458611c10cd9190fd2c3e7dc9b967dc8 |