simple json data manager targeting model.JsonField in (djano framework)
Project description
JOM Django JsonField simple manager
JOM Object helps you to handle JsonField in django frame work so that you can (delete | edit | add ) values and gets the result from the function result() you can get two types of results (str -> json object | dict -> python object)
example
from jom import JOM
# or you can import it as JsonObjectManager
# asign the object you want to handle
# json format
data = '{"name":"Hussein Naim ","site":"https://iamhusseinnaim.github.io","age":22}'
# allowed fields to deal with
allowed = ['name','site','age']
# create the instance
instance = JOM(data,allowed=allowed)
# delete a certain item
instance.del_item("age")
# holding the result
result = instance.result()
# print out the result
print(result)
# output: default = return as json | str
# "{'name':"Hussein Naim ","site":"https://iamhusseinnaim.github.io"}
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
jom-0.0.6.tar.gz
(3.0 kB
view hashes)
Built Distribution
jom-0.0.6-py3-none-any.whl
(2.9 kB
view hashes)