Skip to content
This repository was archived by the owner on Jun 30, 2025. It is now read-only.

Sadashii/EasyJSON

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Installation

pip install EasyJSON

Usage

EasyJSON is a package i made for people to ease the use of JSON files

from EasyJSON import JSON
db = JSON("JSON_FILE_LOCATION", indent=4)

You can now use it like any other db, but its a json!

Adding data

db.add('Water', 'Lava')
db.query.all()
#{"Water": "Lava"}

Editing data

db.edit('Water', 'Air')
db.query.all()
#{"Water": "Air"}

Removing data

db.delete('Water')
db.query.all()
#{}

Clear JSON

db.reset()
#{}

Getting all the data

db.add('Water', 'Lava')
db.add('Air', 'Soil')
db.query.all()
#{"Water": "Lava", "Air": "Soil"}

Getting specific data

db.query.filter_by('Water')
#'Lava'
db.query.filter_by('Lava')
#None

About

A python package to ease the usage of Json.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages