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
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ssjson-1.0.15.tar.gz.
File metadata
- Download URL: ssjson-1.0.15.tar.gz
- Upload date:
- Size: 5.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
656741dd797bca7fb0bc8d11e86b3c41e9744d041d3965b41681a3ad318d37ce
|
|
| MD5 |
e478831e362bf15f08f93982914f0668
|
|
| BLAKE2b-256 |
8c48607357f1aecb498ee02e08c2572c0b2f09aa4e8dc677fefbdcaf4fd85199
|
File details
Details for the file ssjson-1.0.15-py3-none-any.whl.
File metadata
- Download URL: ssjson-1.0.15-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.24.0 setuptools/47.1.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8606e23c4f6d0e079da9d809e12c1766efb8ab39b40088484db46ae8aa7e4fc
|
|
| MD5 |
6d713dda8720559f06f9f5598abd49a7
|
|
| BLAKE2b-256 |
9f639eaed99533d59d43f4cbdacf89f3505fc0b08f74e51d5226c3324cea482e
|