Skip to main content
Python Software Foundation 20th Year Anniversary Fundraiser  Donate today!

ssjson is JSON based python library with various json operation

Project description

SSJSON

ssjson is JSON based python library with various json operation

USAGE

#creating file
conn = ssjson.connect("testing")

#creating json
conn.create([{'name':'','age':''}])

#inserting data into json
conn.insert({'name':'abcd','age':'2345'})

#renaming data in json
conn.alter_rename_column('name','full_name')

#adding key in json
conn.alter_add_column('height')

#removing a key
conn.delete('height')

#updating key with value
conn.update_with_where({'full_name':'hello world','age':'22'},{'age':'2345'})

#select and print multiple keys
conn.select_multiple(['full_name','age'])

#selecting multiple keyc with condition
conn.select_multiple_with_where(['full_name','age'],{'age':'22','full_name':'hello world'})

#selecting all data with condition
conn.select_all_with_where({'full_name':'hello'})

##printing all data
conn.select_all()

USAGE Using SQL

Below is the SQL query for all the operation happened above

conn = ssjson.connect("testfile")

query="create table tablename(id text , name text , dob text)"
conn.execute(query)

query="INSERT INTO tablename (full_name,dob) valuesss(Bud,22);"
conn.execute(query)

query="ALTER TABLE table_name RENAME COLUMN full_name TO name;"
conn.execute(query)

query="ALTER TABLE table_name ADD COLUMN code;"
conn.execute(query)

query="ALTER TABLE table_name DROP COLUMN code;"
conn.execute(query)

query="UPDATE tablename set dob=23,name=sand where name=Bud"
conn.execute(query)

query="select id,name,dob from tablename"
conn.execute(query)

query="select id,name from tablename where name=sand"
conn.execute(query)

query="select * from tablename where name=sand"
conn.execute(query)

query="select * from tablename"
conn.execute(query)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for ssjson, version 1.0.15
Filename, size File type Python version Upload date Hashes
Filename, size ssjson-1.0.15-py3-none-any.whl (5.1 kB) File type Wheel Python version py3 Upload date Hashes View
Filename, size ssjson-1.0.15.tar.gz (5.4 kB) File type Source Python version None Upload date Hashes View

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring DigiCert DigiCert EV certificate Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page