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.0.tar.gz
(4.4 kB
view hashes)
Built Distributions
guildreader-2.0.0-py3.8.egg
(6.8 kB
view hashes)
Close
Hashes for guildreader-2.0.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6beaf43671feafb4fed068c9250349f6f11efe6de041a06dae9b865818915f7b |
|
MD5 | b14e507459f2d95f22b50ab639ca7779 |
|
BLAKE2b-256 | e42897612f58b6f4abb8fc3abbb3b8681e33cc43b99b084453fce0a13ba0a952 |