JSON Data Management Module
Project description
JSON READER:
JSON Data Management Module
Common Terms:
key: file name to save/pull from (Stored as data_[key].json)
CLS: Reader(directory, ids: list)
create_file()
Creates a Key
Returns: Success(T/F)
ex.
reader.create_file("mutes", {}))
- key: File/Key to make
- default: Default value stored for each id
- wipe: Wipes the file if it exists
read_file()
Read a Key from a ID
Returns: JSON for that ID
ex.
data = reader.read_file(id, "mutes")
data[USER] = int(time.time+300)
- id: ID to read
- key: File/Key to read
write_file()
Write to a key
Returns: Success(T/F)
ex.
reader.write_file(id, "mutes", data)
- ID: ID to write to
- key: File/Key to write to
- value: Modified Value
remove()
Remove a id from a key
Returns: Success(T/F)
ex.
reader.remove(id, "mutes")
- id: ID to remove
- key: File/Key to remove id from
check_exist()
Checks if a Key exists
Returns: Success(T/F)
reader.check_exists("mutes")
- key: Check the existance of a key/file
dump()
Dumps the entire JSON
Returns: JSON of the Key
json = reader.dump("mutes")
- key: Key to dump json from
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
guildreader-2.0.1.tar.gz
(4.4 kB
view hashes)
Built Distributions
guildreader-2.0.1-py3.8.egg
(6.8 kB
view hashes)
Close
Hashes for guildreader-2.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59498209e92c9dd96b168f0bcdd550c37d7fadab8c9a22d2d2efbd9c5655dc6c |
|
MD5 | 06dca298149e77e2f1bcf50c7f27ed49 |
|
BLAKE2b-256 | 072dc184e301f1985933d198d5223bc9ef0d16f7c12388a260e05c71737186d4 |