PyFunceble.cli package
Subpackages
- PyFunceble.cli.continuous_integration package
- Submodules
- PyFunceble.cli.continuous_integration.base module
ContinuousIntegrationBaseContinuousIntegrationBase.COMMON_CI_SKIP_MARKERContinuousIntegrationBase.STD_AUTHORIZEDContinuousIntegrationBase.STD_COMMANDContinuousIntegrationBase.STD_COMMIT_MESSAGEContinuousIntegrationBase.STD_END_COMMANDContinuousIntegrationBase.STD_END_COMMIT_MESSAGEContinuousIntegrationBase.STD_GIT_BRANCHContinuousIntegrationBase.STD_GIT_DISTRIBUTION_BRANCHContinuousIntegrationBase.STD_GIT_EMAILContinuousIntegrationBase.STD_GIT_NAMEContinuousIntegrationBase.STD_MAX_EXEC_MINUTESContinuousIntegrationBase.apply_commit()ContinuousIntegrationBase.apply_end_commit()ContinuousIntegrationBase.authorizedContinuousIntegrationBase.bypass()ContinuousIntegrationBase.bypass_bypassContinuousIntegrationBase.commandContinuousIntegrationBase.commit_messageContinuousIntegrationBase.end_commandContinuousIntegrationBase.end_commit_markerContinuousIntegrationBase.end_commit_messageContinuousIntegrationBase.ensure_git_branch_is_given()ContinuousIntegrationBase.ensure_git_distribution_branch_is_given()ContinuousIntegrationBase.ensure_git_email_is_given()ContinuousIntegrationBase.ensure_git_name_is_given()ContinuousIntegrationBase.ensure_start_time_is_given()ContinuousIntegrationBase.ensure_token_is_given()ContinuousIntegrationBase.exec_command()ContinuousIntegrationBase.execute_if_authorized()ContinuousIntegrationBase.expected_end_timeContinuousIntegrationBase.fix_permissions()ContinuousIntegrationBase.get_remote_destination()ContinuousIntegrationBase.git_branchContinuousIntegrationBase.git_distribution_branchContinuousIntegrationBase.git_emailContinuousIntegrationBase.git_initializedContinuousIntegrationBase.git_nameContinuousIntegrationBase.guess_all_settings()ContinuousIntegrationBase.guess_and_set_authorized()ContinuousIntegrationBase.guess_and_set_command()ContinuousIntegrationBase.guess_and_set_commit_message()ContinuousIntegrationBase.guess_and_set_end_command()ContinuousIntegrationBase.guess_and_set_end_commit_message()ContinuousIntegrationBase.guess_and_set_git_branch()ContinuousIntegrationBase.guess_and_set_git_distribution_branch()ContinuousIntegrationBase.guess_and_set_git_email()ContinuousIntegrationBase.guess_and_set_git_name()ContinuousIntegrationBase.guess_and_set_max_exec_minutes()ContinuousIntegrationBase.guess_and_set_token()ContinuousIntegrationBase.init()ContinuousIntegrationBase.init_git()ContinuousIntegrationBase.init_git_remote_with_token()ContinuousIntegrationBase.is_authorized()ContinuousIntegrationBase.is_time_exceeded()ContinuousIntegrationBase.max_exec_minutesContinuousIntegrationBase.push_changes()ContinuousIntegrationBase.set_authorized()ContinuousIntegrationBase.set_command()ContinuousIntegrationBase.set_commit_message()ContinuousIntegrationBase.set_end_command()ContinuousIntegrationBase.set_end_commit_message()ContinuousIntegrationBase.set_git_branch()ContinuousIntegrationBase.set_git_distribution_branch()ContinuousIntegrationBase.set_git_email()ContinuousIntegrationBase.set_git_name()ContinuousIntegrationBase.set_max_exec_minutes()ContinuousIntegrationBase.set_start_time()ContinuousIntegrationBase.set_token()ContinuousIntegrationBase.start_timeContinuousIntegrationBase.token
- PyFunceble.cli.continuous_integration.exceptions module
- PyFunceble.cli.continuous_integration.github_actions module
- PyFunceble.cli.continuous_integration.gitlab_ci module
- PyFunceble.cli.continuous_integration.jenkins module
- PyFunceble.cli.continuous_integration.standalone module
- PyFunceble.cli.continuous_integration.travis_ci module
- PyFunceble.cli.continuous_integration.utils module
- Module contents
- PyFunceble.cli.entry_points package
- Subpackages
- PyFunceble.cli.entry_points.pyfunceble package
- Submodules
- PyFunceble.cli.entry_points.pyfunceble.argsparser module
- PyFunceble.cli.entry_points.pyfunceble.cli module
add_arguments_to_parser()ask_authorization_to_merge_config()get_ci_group_data()get_configured_value()get_database_control_group_data()get_default_group_data()get_dns_control_group_data()get_filtering_group_data()get_multiprocessing_group_data()get_output_control_group_data()get_proxy_control_group_data()get_source_group_data()get_test_control_group_data()platform_parser()tool()
- Module contents
- PyFunceble.cli.entry_points.pyfunceble package
- Submodules
- PyFunceble.cli.entry_points.clean module
- PyFunceble.cli.entry_points.iana module
- PyFunceble.cli.entry_points.production module
- PyFunceble.cli.entry_points.public_suffix module
- Module contents
- Subpackages
- PyFunceble.cli.filesystem package
- Subpackages
- Submodules
- PyFunceble.cli.filesystem.cleanup module
- PyFunceble.cli.filesystem.counter module
- PyFunceble.cli.filesystem.dir_base module
- PyFunceble.cli.filesystem.json_base module
FilesystemJSONBaseFilesystemJSONBase.SOURCE_FILEFilesystemJSONBase.STD_DATASETFilesystemJSONBase.datasetFilesystemJSONBase.fetch_dataset()FilesystemJSONBase.fetch_dataset_beforehand()FilesystemJSONBase.save_dataset()FilesystemJSONBase.save_dataset_afterwards()FilesystemJSONBase.source_file_pathFilesystemJSONBase.update_source_file_path_beforehand()
- PyFunceble.cli.filesystem.registrar_counter module
- PyFunceble.cli.filesystem.status_file module
StatusFileGeneratorStatusFileGenerator.STD_ALLOW_ANALYTIC_FILESStatusFileGenerator.STD_ALLOW_HOSTS_FILESStatusFileGenerator.STD_ALLOW_PLAIN_FILESStatusFileGenerator.STD_ALLOW_UNIFIED_FILEStatusFileGenerator.STD_HOSTS_IPStatusFileGenerator.allow_analytic_filesStatusFileGenerator.allow_hosts_filesStatusFileGenerator.allow_plain_filesStatusFileGenerator.allow_unified_fileStatusFileGenerator.ensure_status_is_given()StatusFileGenerator.file_printerStatusFileGenerator.generate_analytic_file()StatusFileGenerator.generate_hosts_file()StatusFileGenerator.generate_plain_file()StatusFileGenerator.generate_splitted_status_file()StatusFileGenerator.generate_unified_status_file()StatusFileGenerator.get_output_basedir()StatusFileGenerator.guess_all_settings()StatusFileGenerator.guess_and_set_allow_analytic_files()StatusFileGenerator.guess_and_set_allow_hosts_files()StatusFileGenerator.guess_and_set_allow_plain_files()StatusFileGenerator.guess_and_set_allow_unified_file()StatusFileGenerator.guess_and_set_hosts_ip()StatusFileGenerator.hosts_ipStatusFileGenerator.set_allow_analytic_files()StatusFileGenerator.set_allow_hosts_files()StatusFileGenerator.set_allow_plain_files()StatusFileGenerator.set_allow_unified_file()StatusFileGenerator.set_hosts_ip()StatusFileGenerator.set_status()StatusFileGenerator.set_test_dataset()StatusFileGenerator.start()StatusFileGenerator.statusStatusFileGenerator.test_dataset
- Module contents
- PyFunceble.cli.migrators package
- Subpackages
- PyFunceble.cli.migrators.csv_file package
- PyFunceble.cli.migrators.file_cleanup package
- PyFunceble.cli.migrators.json2csv package
- PyFunceble.cli.migrators.mariadb package
- Submodules
- PyFunceble.cli.migrators.alembic module
- PyFunceble.cli.migrators.base module
- PyFunceble.cli.migrators.db_base module
- Module contents
- Subpackages
- PyFunceble.cli.processes package
- Subpackages
- PyFunceble.cli.processes.workers package
- Submodules
- PyFunceble.cli.processes.workers.base module
- PyFunceble.cli.processes.workers.chancy_producer module
- PyFunceble.cli.processes.workers.chancy_tester module
- PyFunceble.cli.processes.workers.dir_files_sorter module
- PyFunceble.cli.processes.workers.file_sorter module
- PyFunceble.cli.processes.workers.file_sorter_base module
- PyFunceble.cli.processes.workers.migrator module
- PyFunceble.cli.processes.workers.miner module
- PyFunceble.cli.processes.workers.producer module
- PyFunceble.cli.processes.workers.tester module
- Module contents
- PyFunceble.cli.processes.workers package
- Submodules
- PyFunceble.cli.processes.base module
ProcessesManagerBaseProcessesManagerBase.CPU_COUNTProcessesManagerBase.STD_MAX_WORKERProcessesManagerBase.WORKER_OBJProcessesManagerBase.add_to_all_input_queues()ProcessesManagerBase.add_to_all_output_queues()ProcessesManagerBase.add_to_input_queue()ProcessesManagerBase.add_to_output_queue()ProcessesManagerBase.continuous_integrationProcessesManagerBase.create()ProcessesManagerBase.create_workers_if_missing()ProcessesManagerBase.daemonProcessesManagerBase.ensure_worker_obj_is_given()ProcessesManagerBase.global_exit_eventProcessesManagerBase.ignore_if_running()ProcessesManagerBase.input_datasetsProcessesManagerBase.input_queueProcessesManagerBase.is_running()ProcessesManagerBase.managerProcessesManagerBase.max_workerProcessesManagerBase.output_datasetsProcessesManagerBase.output_queueProcessesManagerBase.send_stop_signal()ProcessesManagerBase.set_max_worker()ProcessesManagerBase.start()ProcessesManagerBase.terminate()ProcessesManagerBase.wait()
- PyFunceble.cli.processes.chancy_producer module
- PyFunceble.cli.processes.chancy_tester module
- PyFunceble.cli.processes.dir_files_sorter module
- PyFunceble.cli.processes.file_sorter module
- PyFunceble.cli.processes.migrator module
MigratorProcessesManagerMigratorProcessesManager.WORKER_OBJMigratorProcessesManager.create()MigratorProcessesManager.csv_file_add_registrar_column_target()MigratorProcessesManager.csv_file_delete_source_column_target()MigratorProcessesManager.hashes_file_cleanup_target()MigratorProcessesManager.json2csv_inactive_target()MigratorProcessesManager.json2csv_whois_target()MigratorProcessesManager.mariadb_file_and_status_target()MigratorProcessesManager.mariadb_whois_record_idna_subject_target()MigratorProcessesManager.mining_file_cleanup_target()MigratorProcessesManager.production_config_file_cleanup_target()MigratorProcessesManager.start()
- PyFunceble.cli.processes.miner module
- PyFunceble.cli.processes.producer module
- PyFunceble.cli.processes.tester module
- Module contents
- Subpackages
- PyFunceble.cli.scripts package
- Submodules
- PyFunceble.cli.scripts.iana module
IanaDBGeneratorIanaDBGenerator.IANA_WHOIS_SERVERIanaDBGenerator.MANUAL_SERVERIanaDBGenerator.UPSTREAM_LINKIanaDBGenerator.databaseIanaDBGenerator.destinationIanaDBGenerator.get_extension_and_referrer_from_block()IanaDBGenerator.get_referrer_from_extension()IanaDBGenerator.set_destination()IanaDBGenerator.start()
- PyFunceble.cli.scripts.production module
ProductionPrepProductionPrep.AVAILABLE_BRANCHESProductionPrep.branchProductionPrep.dict_helperProductionPrep.ensure_branch_is_given()ProductionPrep.file_helperProductionPrep.previous_versionProductionPrep.regex_helperProductionPrep.set_branch()ProductionPrep.should_be_deprecated()ProductionPrep.start()ProductionPrep.update_code_format()ProductionPrep.update_code_urls()ProductionPrep.update_dir_structure_file()ProductionPrep.update_docs_urls()ProductionPrep.update_documentation()ProductionPrep.update_setup_py()ProductionPrep.update_urls()ProductionPrep.update_version_file()ProductionPrep.version_file_contentProductionPrep.version_utility
- PyFunceble.cli.scripts.public_suffix module
- Module contents
- PyFunceble.cli.system package
- Submodules
- PyFunceble.cli.system.base module
- PyFunceble.cli.system.integrator module
- PyFunceble.cli.system.launcher module
SystemLauncherSystemLauncher.adblock_inputline2subjectSystemLauncher.checker_typeSystemLauncher.ci_stop_in_the_middle_if_time_exceeded()SystemLauncher.cidr2subjectSystemLauncher.continue_datasetSystemLauncher.continuous_integrationSystemLauncher.counterSystemLauncher.db_sessionSystemLauncher.dir_files_sorter_process_managerSystemLauncher.execution_time_holderSystemLauncher.file_preloaderSystemLauncher.file_printerSystemLauncher.fill_protocol()SystemLauncher.fill_to_test_queue_from_protocol()SystemLauncher.generate_waiting_files()SystemLauncher.inactive_datasetSystemLauncher.inputline2subjectSystemLauncher.managerSystemLauncher.migrator_process_managerSystemLauncher.miner_process_managerSystemLauncher.print_home_ascii()SystemLauncher.producer_process_managerSystemLauncher.registrar_counterSystemLauncher.remove_unwanted_files()SystemLauncher.rpz_inputline2subjectSystemLauncher.rpz_policy2subjectSystemLauncher.run_ci_end_saving_instructions()SystemLauncher.run_ci_saving_instructions()SystemLauncher.run_standard_end_instructions()SystemLauncher.sessions_idSystemLauncher.start()SystemLauncher.stdout_printerSystemLauncher.stop_and_wait_for_all_manager()SystemLauncher.subject2complementsSystemLauncher.tester_process_managerSystemLauncher.testing_protocolSystemLauncher.url2netlocSystemLauncher.wildcard2subject
- Module contents
- PyFunceble.cli.utils package
Submodules
PyFunceble.cli.credential_loader module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides our credential loader.
- 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.credential_loader.CredentialLoader(db_type: str | None = None)[source]
Bases:
objectProvides our creadential loader.
The idea is to have an interface which provides the credential to use but at the same time load and initiate the credential interface after loading it from the user input or the environment variables.
- Parameters:
db_type – The database type to load the credential for.
- DB_TYPE2OBJ: dict = {'csv': None, 'mariadb': <class 'PyFunceble.database.credential.mariadb.MariaDBCredential'>, 'mysql': <class 'PyFunceble.database.credential.mysql.MySQLCredential'>, 'postgresql': <class 'PyFunceble.database.credential.postgresql.PostgreSQLCredential'>}
- ask_for_info(var_name: str, default: Any) str[source]
Asks the credential to the end-user.
- Parameters:
var_name – The name of the part to ask for example
hostorpassword.default – The default value to return if the user don’t give us anything.
- credential: CredentialBase | None = None
The credential (itself).
- ensure_db_type_is_given()[source]
Ensure that the db type is given before launching the decorated method.
- Raises:
TypeError – When the db type is not given.
- execute_if_authorized()[source]
Executes the decorated method only if we are authorized to process. Otherwise, apply the given
default.
- set_credential_var(var_name: str, value: Any) CredentialLoader[source]
Sets the given
var_nameof the credential object with the givenvalue.- Parameters:
var_name – The name of the variable to set.
value – The value of to set.
- set_db_type(value: str) CredentialLoader[source]
Sets the database type to work with.
- Parameters:
value – The value to set.
- start(*, ignore_cli: bool = True) CredentialLoader[source]
Starts the loading of the credential.
- Parameters:
ignore_cli – Ignore questions to end-user.
PyFunceble.cli.execution_time module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the interface for the generation of the execution time.
- 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.execution_time.ExecutionTime(authorized: bool | None = None)[source]
Bases:
objectProvides the interface for the execution time.
- Parameters:
authorized – The authorization to run.
- execute_if_authorized()[source]
Executes the decorated method only if we are authorized to process. Otherwise, apply the given
default.
- guess_and_set_authorized() ExecutionTime[source]
Try to guess and set the authorization from the configuration file.
- set_authorized(value: bool) ExecutionTime[source]
Sets the value of the
authorizedattribute.- Parameters:
value – The value to set.
- set_end_time() ExecutionTime[source]
Sets the starting time to now.
- set_start_time() ExecutionTime[source]
Sets the starting time to now.
PyFunceble.cli.facility module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides some loader that we may need later.
- 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.
PyFunceble.cli.factory module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides everything which doesn’t get through the door of the facility.
- 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.
PyFunceble.cli.file_preloader module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the interface for the preloading of a given 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.
- class PyFunceble.cli.file_preloader.FilePreloader(*, authorized: bool | None = None, protocol: dict | None = None, continuous_integration: ContinuousIntegrationBase | None = None, checker_type: str | None = None, adblock_inputline2subject: AdblockInputLine2Subject | None = None, wildcard2subject: Wildcard2Subject | None = None, rpz_policy2subject: RPZPolicy2Subject | None = None, rpz_inputline2subject: RPZInputLine2Subject | None = None, inputline2subject: InputLine2Subject | None = None, subject2complements: Subject2Complements | None = None, url2netloc: Url2Netloc | None = None, continue_dataset: ContinueDatasetBase | None = None, inactive_dataset: InactiveDatasetBase | None = None, cidr2subject: CIDR2Subject | None = None)[source]
Bases:
objectProvides an interface for the file preloading. The main idea behind this interface is to read all lines of the given file parse each lines into something our autocontinue dataset understand.
Once everything preloaded in the autocontinue dataset, one can use the
PyFunceble.dataset.autocontinue.base.ContinueDataset.get_to_test()to get the next subject to test.By doing this, we don’t have to re-read a file completely once we are sure that the hash of the file didn’t changed.
- Parameters:
authorized – The authorization to launch. If
Noneis given, we will try to guess the best value.protocol – The protocol describing the file to test.
- adblock_inputline2subject: AdblockInputLine2Subject | None = None
- cidr2subject: CIDR2Subject | None = None
- continue_dataset: ContinueDatasetBase | None = None
- continuous_integration: ContinuousIntegrationBase | None = None
- ensure_protocol_is_given()[source]
Ensures that the protocol is given before launching the decorated method.
- Raises:
RuntimeError – When the protocol is not declared yet.
- execute_if_authorized()[source]
Executes the decorated method only if we are authorized to process. Otherwise, apply the given
default.Warning
If
Noneis given as default value, this method will return theselfobject.
- guess_and_set_authorized() FilePreloader[source]
Try to guess and set the value of the
_authorizedattribute.
- inputline2subject: InputLine2Subject | None = None
- rpz_inputline2subject: RPZInputLine2Subject | None = None
- rpz_policy2subject: RPZPolicy2Subject | None = None
- set_authorized(value: bool) FilePreloader[source]
Sets the value of the
_authorizedattribute.- Parameters:
value – The value to set.
- set_protocol(value: dict) FilePreloader[source]
Sets the value of the
_protocolattribute.- Parameters:
value – The value to set.
- start(print_dots: bool = False) FilePreloader[source]
Starts the pre-loading of the currently set file path.
- subject2complements: Subject2Complements | None = None
- url2netloc: Url2Netloc | None = None
- wildcard2subject: Wildcard2Subject | None = None
PyFunceble.cli.storage module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the common storage location for all entry points.
- 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.
PyFunceble.cli.storage_facility module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides some facilities for the storage module.
- 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.
Module contents
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides everything related to the CLI usage.
- 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.