PyFunceble.cli.filesystem.printer package
Submodules
PyFunceble.cli.filesystem.printer.base module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the base of all our printers.
- Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
- Special thanks:
- Contributors:
- Project link:
- Project documentation:
- Project homepage:
License:
Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024 Nissar Chababy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
- class PyFunceble.cli.filesystem.printer.base.PrinterBase(template_to_use: str | None = None, *, dataset: Dict[str, str] | None = None, skip_column: List[str] | None = None)[source]
Bases:
object
Provides the base of all printer class.
Printer classes are classes which derivate from this class. their objectives should be the same: Unify and simplify the way to print something to a given destination.
- HEADERS: Dict[str, str] = {'amount': 'Amount', 'checker_type': 'Checker', 'days': 'Days', 'expiration_date': 'Expiration Date', 'hours': 'Hours', 'http_status_code': 'HTTP Code', 'idna_subject': 'Subject', 'ip': 'IP', 'minutes': 'Minutes', 'percentage': 'Percentage', 'registrar': 'Registrar', 'seconds': 'Seconds', 'status': 'Status', 'status_source': 'Source'}
- STD_LENGTH: Dict[str, int] = {'amount': 12, 'checker_type': 13, 'days': 2, 'expiration_date': 17, 'hours': 2, 'http_status_code': 10, 'idna_subject': 100, 'minutes': 2, 'percentage': 12, 'registrar': 30, 'seconds': 6, 'status': 11, 'status_source': 10}
- TEMPLATES: Dict[str, Template] = {'all': <string.Template object>, 'execution_time': <string.Template object>, 'hosts': <string.Template object>, 'less': <string.Template object>, 'percentage': <string.Template object>, 'plain': <string.Template object>, 'registrar': <string.Template object>, 'simple': <string.Template object>}
- ensure_dataset_is_given()[source]
Ensures that the dataset to write is given before launching the decorated method.
- Raises:
TypeError – When the current
self.template_to_use
is not set.
- ensure_template_to_use_is_given()[source]
Ensures that the template to use is given before launching the decorated method.
- Raises:
TypeError – When the current
self.template_to_use
is not set.
- set_dataset(value: Dict[str, str]) PrinterBase [source]
Sets the dataset to apply to the template.
- Parameters:
value – The value to set.
- set_skip_column(value: List[str]) PrinterBase [source]
Sets the columns to skip.
- Parameters:
value – The value to set.
- set_template_to_use(value: str) PrinterBase [source]
Sets the template to use.
- Parameters:
value – The value to set.
PyFunceble.cli.filesystem.printer.file module
PyFunceble.cli.filesystem.printer.stdout module
Module contents
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides everything related to what we actually print (output) or to a file.
- Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
- Special thanks:
- Contributors:
- Project link:
- Project documentation:
- Project homepage:
License:
Copyright 2017, 2018, 2019, 2020, 2022, 2023, 2024 Nissar Chababy
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.