JsonMan is a simple Python script for managing a key-value data store with JSON file persistence. Written by Patrik Nagy [thats me :)]on 2.11.2023.
- Add: Add key-value pairs to the data store.
- Remove: Remove either a key or a value associated with a key from the data store.
- View: View the value associated with a specific key.
- Edit: Edit the value associated with a specific key.
- Save: Save the current state of the data store to a JSON file.
- Load: Load data from a JSON file into the data store.
add(key, value)
Adds a key-value pair to the data store.
remove(key, value)
Removes either a key or the value associated with a key from the data store. The user is prompted to confirm the removal.
view(key)
Displays the value associated with a specific key in the data store.
edit(key, new_value)
Edits the value associated with a specific key in the data store.
save(filename)
Saves the current state of the data store to a JSON file.
load(filename)
Loads data from a JSON file into the data store.
# Adding data
add("name", "John Doe")
# Viewing data
view("name")
# Editing data
edit("name", "Jane Doe")
# Saving data to a file
save("data.json")
# Loading data from a file
load("data.json")
This project is licensed under the MIT License - see the LICENSE file for details.