Skip to content

A python library for easy manipulation with Json files!

Notifications You must be signed in to change notification settings

Lopastudio/JsonMan

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

JsonMan

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.

Features

  • 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.

Usage

Add Data

add(key, value)

Adds a key-value pair to the data store.

Remove Data

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 Data

view(key)

Displays the value associated with a specific key in the data store.

Edit Data

edit(key, new_value)

Edits the value associated with a specific key in the data store.

Save Data

save(filename)

Saves the current state of the data store to a JSON file.

Load Data

load(filename)

Loads data from a JSON file into the data store.

Example

# 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")

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A python library for easy manipulation with Json files!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages