sqlalchemyseed.json =================== .. py:module:: sqlalchemyseed.json Module Contents --------------- .. py:class:: JsonWalker(json: Union[list, dict] = None) JsonWalker class .. py:method:: backward() Revert current json to its parent. Returns reverted current json .. py:method:: exec_func_iter(func: Callable) Executes function when iterating .. py:method:: find_from_current(keys: List[Union[int, str]]) Find item from current json that correlates list of keys .. py:method:: find_from_root(keys: List[Union[int, str]]) Find item from the root json that correlates list of keys .. py:method:: forward(keys: List[Union[int, str]]) Move and replace current json forward. Returns current json. .. py:method:: iter_as_dict_items() Iterates current as dict. Yields key and value. Raises TypeError if current json is not dict .. py:method:: iter_as_list() Iterates current as list. Yields index and value. Raises TypeError if current json is not list .. py:method:: keys() Returns list of keys either str or int .. py:method:: reset(root=None) Resets to initial state. If root argument is supplied, self.root will be replaced. .. py:property:: current_key :type: Union[int, str] Returns the key of the current json .. py:property:: json Returns current json .. py:property:: json_is_dict Returns true if current json is dict .. py:property:: json_is_list Returns true if current json is list .. py:attribute:: path :value: [] .. py:attribute:: root :value: None .. py:function:: sort_json(json: Union[list, dict], reverse=False) Sort json function