Core¶
Problematic¶
How can we get started?
Documentation¶
The tool to check the availability or syntax of domains, IPv4, IPv6 or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the core interfaces.
- Author:
- Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
- Special thanks:
- https://pyfunceble.github.io/special-thanks.html
- Contributors:
- https://pyfunceble.github.io/contributors.html
- Project link:
- https://github.com/funilrys/PyFunceble
- Project documentation:
- https://pyfunceble.readthedocs.io/en/master/
- Project homepage:
- https://pyfunceble.github.io/
License:
MIT License
Copyright (c) 2017, 2018, 2019, 2020 Nissar Chababy
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
APICore()
¶
-
class
PyFunceble.core.api.
APICore
(subject, complete=False, configuration=None, db_file_name='api_call', is_parent=True)[source]¶ Provides the logic and interface for the tests from the API.
Parameters: -
_APICore__inactive_database_management
(subject, status)¶ Given the subject and status, we add or remove the subject from the inactive database.
-
availability
(subject_type)[source]¶ Make an availability check.
Parameters: subject_type (str) – Should be one of the following.
domain
url
-
reputation
(subject_type)[source]¶ Make a reputation check.
Parameters: subject_type (str) – Should be one of the following.
domain
url
-
CLICore()
¶
-
class
PyFunceble.core.cli.
CLICore
[source]¶ Provides some methods which are dedicated for the CLI.
-
classmethod
_CLICore__check_deprecated
(upstream_version)¶ Checks if the local version is deprecated.
-
classmethod
_CLICore__check_force_update
(upstream_version)¶ Checks if we need to force the update.
If it’s the case, we will stop the tool.
-
classmethod
_CLICore__print_messages
(upstream_version)¶ Looks at the messages and prints the one that needs to be printed.
-
classmethod
colorify_logo
(home=False)[source]¶ Print the colored logo based on global results.
Parameters: home (bool) – Tell us if we have to print the initial coloration.
-
classmethod
compare_version_and_print_messages
()[source]¶ Compares the local with the upstream version.
-
classmethod
get_simple_coloration
(status)[source]¶ Given a status we give the coloration for the simple mode.
Parameters: status (str) – An official status output.
-
classmethod
logs_sharing
()[source]¶ Prints an information message when the logs sharing is activated.
-
classmethod
FileCore()
¶
-
class
PyFunceble.core.file.
FileCore
(file, file_content_type='domain')[source]¶ Brain of PyFunceble for file testing.
Parameters: -
_FileCore__run_single_test
(subject, ignore_inactive_db_check=False)¶ Run a test for a single subject.
-
_FileCore__test_line
(line, ignore_inactive_db_check=False)¶ Tests a given line.
-
cleanup
(auto_continue_db, auto_save, test_completed=False)[source]¶ Runs the logic to run at the end of all test.
-
download_link
(input_file)[source]¶ Downloads the file if it is an URL and return the name of the new file to test.
-
generate_files_of_status
(status, include_entries_without_changes=False)[source]¶ Generates the status file of all subjects of the given status.
Parameters:
-
post_test_treatment
(test_output, file_content_type, complements_test_started=False, auto_continue_db=None, inactive_db=None, mining=None, whois_db=None)[source]¶ Do the post test treatment.
-
OurProcessWrapper()
¶
-
class
PyFunceble.core.multiprocess.
OurProcessWrapper
(*args, **kwargs)[source]¶ Wrapper of Process. The object of this class is just to overwrite
Process.run()
in order to catch exceptions.Note
This class takes the same arguments as
Process
.-
exception
¶ Provides a way to check if an exception was send.
-
MultiprocessCore()
¶
-
class
PyFunceble.core.multiprocess.
MultiprocessCore
(file, file_content_type='domain')[source]¶ Brain of PyFunceble for file testing with multiple processes.s.
Parameters: -
_MultiprocessCore__check_exception
(processes, manager_data)¶ Checks if an exception is present into the given pool of processes.
:param list processes. A list of running processes.
-
_MultiprocessCore__merge_processes_data
(manager_data)¶ Reads all results and put them at the right location.
-
_MultiprocessCore__run_multiprocess_test
(stream, manager, ignore_inactive_db_check=False)¶ Tests the content of the given file.
-
_MultiprocessCore__start_process
(subject, manager_data, ignore_inactive_db_check=False)¶ Starts a new process.
-