Skip to content

coffee007/PyJSONUtilities

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PyJSONUtils

A Python library for using JSON files.

Usage

To open a file:

from pyjsonutils import pyjsonutils
pyjsonutils.open_file_as_dict("file_path.json")

To write to a file:

from pyjsonutils import pyjsonutils
pyjsonutils.write_dict_to_file(dictionary, "file_path.json")

To update a JSON file:

from pyjsonutils import pyjsonutils
pyjsonutils.update_json_file("file_path.json")

Find the first key having a given value:

from pyjsonutils import pyjsonutils
pyjsonutils.find_key_from_value(dictionary, value)

Create a default value for a key if the key does not exist:

from pyjsonutils import pyjsonutils
pyjsonutils.create_default_if_key_not_there(dictionary, key, default_value)

About

Some JSON utilities for Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages