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 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.3.tar.gz
(3.4 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.3.tar.gz.
File metadata
- Download URL: json-nosqlite-0.0.3.tar.gz
- Upload date:
- Size: 3.4 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 |
41602c978eedc8fd413f121f49a77b012a0b6181c37cb596cf58147258a9384e
|
|
| MD5 |
334135635b30ab0de036556383b4d765
|
|
| BLAKE2b-256 |
6fbb42336e2648c59ce2aee5c287b293f8cae760e4f271b0a5e29ee75183f2f6
|
File details
Details for the file json_nosqlite-0.0.3-py3-none-any.whl.
File metadata
- Download URL: json_nosqlite-0.0.3-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 |
920b97b5a0fff43ca3370f7441cf3ce1e8a359a8ee8f7c6d44acec3cac59f116
|
|
| MD5 |
7f84741141982c9868ae9c11aee7b248
|
|
| BLAKE2b-256 |
84dfb2babf41b5eb853088204b74578d25f0a6f1dc43db105010dc20e0d9f727
|