gen_coap_service.pro.write_template module

Module

write_template.py

Copyright

Copyright (C) 2020 - 2024 Vladimir Roncevic <elektron.ronca@gmail.com> gen_coap_service 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_coap_service 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

Defines class WriteTemplate with attribute(s) and method(s). Writes a templates with parameters.

class gen_coap_service.pro.write_template.WriteTemplate(verbose: bool = False)[source]

Bases: FileCheck

Defines class WriteTemplate with attribute(s) and method(s). Writes a templates with parameters.

It Definess:

attributes:
_GEN_VERBOSE - Console text indicator for process-phase.
methods:
__init__ - Initials WriteTemplate constructor
write - Write a template content with parameters to a file
_GEN_VERBOSE: str = 'GEN_AUTOCONF::PRO::WRITE_TEMPLATE'
write(config: Dict[Any, Any], verbose: bool = False) bool[source]

Write a template content with parameters to a file.

Parameters:
  • config (<Dict[Any, Any]>) – Template content

  • verbose (<bool>) – Enable/disable verbose option

Returns:

True (success operation) | False

Return type:

<bool>

Exceptions:

ATSTypeError | ATSValueError