Easy JSON Writer
Project description
JSON Writer
Easy package to write JSON files
About
jsonwriter
is an easy JSON writer, when i say easy i mean super easy
Made by Nawaf Alqari in 2021
Installation
PIP
pip install jsonwriter
Examples
names.json
{
"name": "Nawaf",
"age": 10
}
from jsonwriter import file
db = file('names.json')
print(db.get('name')) # Nawaf
print(db.get('age')) # 10
# Recommended indent is 3, to make it more readable
db.set('age', 30, indent=0) # {"name": "Nawaf", "age": 30}
db.set('age', 30, indent=3)
# {
# "name": "Nawaf",
# "age": 30
# }
print(db.hasKey('name')) # True
print(db.hasValue('Nawaf')) # True
print(db.hasAll('name')) # True
print(db.hasAll('Nawaf')) # True
print(db.keys) # ['name', 'age']
print(db.values) # ['Nawaf', 30]
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
jsonwriter-0.0.6.tar.gz
(3.1 kB
view hashes)