JSON flat file database system
Project description
NoSQLite
A JSON based flat file NoSQL database.
Usage
from nosqlite.nosqlite import NoSQLite
ns = NoSQLite('file.json')
# Create a new table
ns.create_table('users')
# Insert a new record into the table
ns.insert({'username':'blah', 'password':'blah'}, 'users')
# Find a record in a table
ns.find({'username':'blah'}, 'users')
# Update a record in a table
ns.update({'username':'blah'}, {'username':'changed', 'password':'changed'}, 'users')
# Delete a record from a table
ns.delete({'username':'blah', 'password':'blah'}, 'users')
Documentation
# filename: name of local file/path to json data file
class NoSQLite(filename)
# reload the json file (used by the class to update the jsonData after writing)
reload()
# write json data to file and reload
writeOut()
# creates a new table in the json data
# tableName: name of table to be created
create_table(tableName)
# inserts data into table
# data: json data to be inserted
# table: name of table to insert into
insert(data, table)
# deletes data from table, deletes first found
# data: json data to search table for
# table: table to search and delete from
delete(data, table)
# deletes data from table, deletes all found
# data: json data to search table for
# table: table to search and delete from
deleteMany(data, table)
# updates data in table with newData, updates first found
# data: json data to search table for
# newData: new json data to change record to
# table: table to search and update from
update(data, newData, table)
# updates data in table with newData, updates all found
# data: json data to search table for
# newData: new json data to change record to
# table: table to search and update from
updateMany(data, newData, table)
# find all data in table
# table: table to search
findAll(table)
# find data in table, returns all matching records
# data: json data to search table for
# table: table to search
find(data, table)
# find data in table, returns first matching record
# data: json data to search table for
# table: table to search
findOne(data, table)
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
json-nosqlite-0.0.6.tar.gz
(3.5 kB
view details)
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 json-nosqlite-0.0.6.tar.gz.
File metadata
- Download URL: json-nosqlite-0.0.6.tar.gz
- Upload date:
- Size: 3.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57eccd55e2d8ac329871f45db6e0abe59f56a26046426ecb943efa134031ba5a
|
|
| MD5 |
6d40672ae2b66a4753d7a50b61e7ce9d
|
|
| BLAKE2b-256 |
d1de9b2da25e05354aea36a64ab173ef7de1645cbd21759b6c1e49c6a6a63ce0
|
File details
Details for the file json_nosqlite-0.0.6-py3-none-any.whl.
File metadata
- Download URL: json_nosqlite-0.0.6-py3-none-any.whl
- Upload date:
- Size: 3.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.26.0 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.11.2 keyring/18.0.1 rfc3986/2.0.0 colorama/0.4.4 CPython/3.8.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6ebc6c019f5351d3a217601d5c4cc31da546cac865c09acba86c9d0a3fc2689a
|
|
| MD5 |
9c00451ca899baab6ace3a9ca15936c6
|
|
| BLAKE2b-256 |
f4ae16ef0ee79228db141e7d43e787f205dade8b3c0929dfef57296e848a183b
|