gen_py_module.module package

Module contents

Module
__init__.py
Copyright
Copyright (C) 2017 Vladimir Roncevic <elektron.ronca@gmail.com> gen_py_module is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. gen_py_module is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
Info
Defined class GenModule with attribute(s) and method(s). Generate python module by template and parameters.
class gen_py_module.module.GenModule(verbose=False)[source]

Bases: ats_utilities.config_io.base_check.FileChecking

Defined class GenModule with attribute(s) and method(s). Generate python module by template and parameters. It defines:

attributes:
GEN_VERBOSE - console text indicator for process-phase.
PRO_STRUCTURE - project setup (templates).
__reader - reader API.
__writer - writer API.
__config - project setup in dict format.
methods:
__init__ - initial constructor.
get_reader - getter for reader object.
get_writer - getter for writer object.
gen_module - generate file python module.
__str__ - dunder method for GenModule.
GEN_VERBOSE = 'GEN_PY_MODULE::MODULE::GEN_MODULE'
PRO_STRUCTURE = '/../conf/project.yaml'
VERBOSE = 'ATS_UTILITIES'
gen_module(module_name, verbose=False)[source]

Generate file python module.

Parameters:
  • module_name (<str>) – parameter module name.
  • verbose (<bool>) – enable/disable verbose option.
Returns:

boolean status, True (success) | False.

Return type:

<bool>

Exceptions:

ATSTypeError | ATSBadCallError

get_reader()[source]

Getter for reader object.

Returns:read template object.
Return type:<ReadTemplate>
Exceptions:None
get_writer()[source]

Getter for writer object.

Returns:write template object.
Return type:<WriteTemplate>
Exceptions:None