trigger.core.io =============== .. py:module:: trigger.core.io .. autoapi-nested-parse:: I/O Class Module to handle all read/write operations :created: 19/04/2020 :author: Arda Kutlu Attributes ---------- .. autoapisummary:: trigger.core.io.FILELOG Classes ------- .. autoapisummary:: trigger.core.io.IO Module Contents --------------- .. py:class:: IO(file_name=None, folder_name=None, root_path=None, file_path=None) Bases: :py:obj:`dict` dict() -> new empty dictionary dict(mapping) -> new dictionary initialized from a mapping object's (key, value) pairs dict(iterable) -> new dictionary initialized as if via: d = {} for k, v in iterable: d[k] = v dict(**kwargs) -> new dictionary initialized with the name=value pairs in the keyword argument list. For example: dict(one=1, two=2) .. py:method:: folder_check(checkpath) :staticmethod: Check if the folder exists, create if it doesn't. .. py:method:: read(file_path=None) Read and returns the data stored in file path .. py:method:: write(data, file_path=None) Write data to file. Args: data: Data to be written to the json file file_path: (String) if not specified uses the one defined in the class instantiation. Returns: (String) Path of the file .. py:property:: file_path Return the file path. .. py:data:: FILELOG