Skip to content

Latest commit

 

History

History
36 lines (24 loc) · 759 Bytes

USAGE.rst

File metadata and controls

36 lines (24 loc) · 759 Bytes

USAGE GUIDE

Files

Have classes for this down package: qautils.files

  • Methods for package
    • method path_format : TODO: fill up section
    • method read_file : TODO: fill up section
    • method read : TODO: fill up section
    • method settings : TODO: fill up section
from qautils.files import settings


# file_path = './' by default
SETTINGS = settings(
    file_path="/home/user/config/dir/",
    file_name="settings.json"
)
KEY_TO_CHECK = "some_json_key_name"


try:
    print(SETTINGS[KEY_TO_CHECK])
except Exception as err:
    print("ERROR: {}".format(err))
finally:
    bot.close()