Skip to main content

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 ','website':'https://iamhusseinnaim.github.io','age':22}"

# allowed fields to deal with 
allowed = ['name','website','age']
# create the instance 
instance = JSOM(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 ","website":"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.1.tar.gz (2.8 kB view hashes)

Uploaded Source

Built Distribution

jom-0.0.1-py3-none-any.whl (2.8 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page