PyFunceble.checker.availability package
Subpackages
- PyFunceble.checker.availability.extras package
- Submodules
- PyFunceble.checker.availability.extras.base module
ExtraRuleHandlerBase
ExtraRuleHandlerBase.dns_query_tool
ExtraRuleHandlerBase.do_dns_lookup()
ExtraRuleHandlerBase.do_on_body_match()
ExtraRuleHandlerBase.do_on_header_match()
ExtraRuleHandlerBase.do_request()
ExtraRuleHandlerBase.ensure_status_is_given()
ExtraRuleHandlerBase.regex_helper
ExtraRuleHandlerBase.req
ExtraRuleHandlerBase.req_url
ExtraRuleHandlerBase.req_url_https
ExtraRuleHandlerBase.set_status()
ExtraRuleHandlerBase.setup_status_after()
ExtraRuleHandlerBase.setup_status_before()
ExtraRuleHandlerBase.start()
ExtraRuleHandlerBase.status
ExtraRuleHandlerBase.switch_down_if_dns_match()
ExtraRuleHandlerBase.switch_to_down()
ExtraRuleHandlerBase.switch_to_down_if_status_code()
ExtraRuleHandlerBase.switch_to_up()
- PyFunceble.checker.availability.extras.dns module
- PyFunceble.checker.availability.extras.etoxic module
- PyFunceble.checker.availability.extras.parked module
- PyFunceble.checker.availability.extras.rules module
- PyFunceble.checker.availability.extras.subject_switch module
- Module contents
Submodules
PyFunceble.checker.availability.base module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the base of all availability checker classes.
- 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.checker.availability.base.AvailabilityCheckerBase(subject: str | None = None, *, use_extra_rules: bool | None = None, use_whois_lookup: bool | None = None, use_dns_lookup: bool | None = None, use_netinfo_lookup: bool | None = None, use_http_code_lookup: bool | None = None, use_reputation_lookup: bool | None = None, do_syntax_check_first: bool | None = None, db_session: Session | None = None, use_whois_db: bool | None = None, use_platform: bool | None = None)[source]
Bases:
CheckerBase
Provides the base of all our availability checker classes.
- Parameters:
subject (str) – Optional, The subject to work with.
use_extra_rules (bool) – Optional, Activates/Disables the usage of our own set of extra rules.
use_whois_lookup (bool) – Optional, Activates/Disables the usage of the WHOIS lookup to gather the status of the given
subject
.use_dns_lookup (bool) – Optional, Activates/Disables the usage of the DNS lookup to gather the status of the given
subject
.use_netinfo_lookup (bool) – Optional, Activates/Disables the usage of the network information lookup module to gather the status of the given
subject
.use_http_code_lookup (bool) – Optional, Activates/Disables the usage of the HTTP status code lookup to gather the status of the given
subject
.use_reputation_lookup (bool) – Optional, Activates/Disables the usage of the reputation dataset lookup to gather the status of the given
subject
.do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
use_whois_db (bool) – Optional, Activates/Disable the usage of a local database to store the WHOIS datasets.
- addressinfo_query_tool: AddressInfo | None = None
- dns_query_tool: DNSQueryTool | None = None
- domain_syntax_checker: DomainSyntaxChecker | None = None
- extra_rules_handlers: List[ExtraRuleHandlerBase] | None = None
- get_status() AvailabilityCheckerStatus | None [source]
Provides the current state of the status.
Note
This method will automatically query status using the
PyFunceble.checker.base.CheckerBase.query_status()
if thePyFunceble.checker.status_base.CheckerStatusBase.status
attribute is not set.
- guess_all_settings() AvailabilityCheckerBase [source]
Try to guess all settings.
- guess_and_set_dns_lookup() AvailabilityCheckerBase [source]
Try to guess and set the value of the
use_dns_lookup
attribute from the configuration file.
- guess_and_set_use_extra_rules() AvailabilityCheckerBase [source]
Try to guess and set the value of the
use_extra_rules
attribute from the configuration file.
- guess_and_set_use_http_code_lookup() AvailabilityCheckerBase [source]
Try to guess and set the value of the
use_http_code_lookup
attribute from the configuration file.
- guess_and_set_use_netinfo_lookup() AvailabilityCheckerBase [source]
Try to guess and set the value of the
use_netinfo_lookup
attribute from the configuration file.
- guess_and_set_use_reputation_lookup() AvailabilityCheckerBase [source]
Try to guess and set the value of the
use_reputation_lookup
attribute from the configuration file.
- guess_and_set_use_whois_db() AvailabilityCheckerBase [source]
Try to guess and set the value of the
use_whois_db
attribute.
- guess_and_set_use_whois_lookup() AvailabilityCheckerBase [source]
Try to guess and set the value of the
use_whois
attribute from the configuration file.
- hostbyaddr_query_tool: HostByAddrInfo | None = None
- http_status_code_query_tool: HTTPStatusCode | None = None
- ip_syntax_checker: IPSyntaxChecker | None = None
- params: AvailabilityCheckerParams | None = None
- query_common_checker() AvailabilityCheckerBase [source]
Queries the syntax checker.
- query_dns_record() Dict[str, List[str] | None] | None [source]
Tries to query the DNS record(s) of the given subject.
Changed in version 4.1.0b8.dev: Lookup order relative to actual subject.
- query_status() AvailabilityCheckerBase [source]
Queries the status and for for more action.
- set_use_dns_lookup(value: bool) AvailabilityCheckerBase [source]
Sets the value which authorizes the usage of the DNS Lookup.
- Parameters:
value – The value to set.
- set_use_extra_rules(value: bool) AvailabilityCheckerBase [source]
Sets the value which authorizes the usage of the special rule.
- Parameters:
value – The value to set.
- set_use_http_code_lookup(value: bool) AvailabilityCheckerBase [source]
Sets the value which authorizes the usage of the HTTP status code lookup.
- Parameters:
value – The value to set.
- set_use_netinfo_lookup(value: bool) AvailabilityCheckerBase [source]
Sets the value which authorizes the usage of the network information lookup.
- Parameters:
value – The value to set.
- set_use_reputation_lookup(value: bool) AvailabilityCheckerBase [source]
Sets the value which authorizes the usage of the reputation lookup.
- Parameters:
value – The value to set.
- set_use_whois_db(value: bool) AvailabilityCheckerBase [source]
Sets the value which authorizes the usage of the WHOIS DB.
- Parameters:
value – The value to set.
- set_use_whois_lookup(value: bool) AvailabilityCheckerBase [source]
Sets the value which authorizes the usage of the WHOIS lookup.
- Parameters:
value – The value to set.
- should_we_continue_test(status_post_syntax_checker: str) bool [source]
Checks if we are allowed to continue a standard testing.
- Rules:
No status available yet. Continue to next test method.
Status is/still INVALID. Continue to next test method.
Above are False. Not allowed to continue to next test method.
- status: AvailabilityCheckerStatus | None = None
- subject_propagator() CheckerBase [source]
Propagate the currently set subject.
Warning
You are not invited to run this method directly.
- try_to_query_status_from_dns() AvailabilityCheckerBase [source]
Tries to query the status from the DNS lookup.
Changed in version 4.1.0b7.dev: Logging return the correct subject.
- try_to_query_status_from_extra_rules() AvailabilityCheckerBase [source]
Tries to query the status from the extra rules.
- try_to_query_status_from_http_status_code(*, from_domain_test: bool = False) AvailabilityCheckerBase [source]
Tries to query the status from the HTTP status code.
- Parameters:
from_domain_test (bool) –
Whether we wanted to test a test - actually.
Setting this argument to
True
will exit the http_status_code test if the given subject is already a URL.
- try_to_query_status_from_netinfo() AvailabilityCheckerBase [source]
Tries to query the status from the network information.
- try_to_query_status_from_platform() AvailabilityCheckerBase [source]
Tries to get and set the status from the platform API.
- try_to_query_status_from_reputation() AvailabilityCheckerBase [source]
Tries to query the status from the reputation lookup.
- try_to_query_status_from_syntax_lookup(from_domain_test: bool = False, from_url_test: bool = False) AvailabilityCheckerBase [source]
Tries to query the status from the syntax.
- Parameters:
from_domain_test (bool) –
Whether we wanted to test a domain - actually.
Setting this argument to
True
will assume that we are exclusively checking the syntax of domain/ip.from_url_test (bool) –
Whether we wanted to test a url - actually.
Setting this argument to
True
will assume that we are exclusively checking the syntax of url.
- try_to_query_status_from_whois() AvailabilityCheckerBase [source]
Tries to get and the status from the WHOIS record.
Warning
If the configuration is loaded, this method try to query from the best database first.
If it’s not found it will try to query it from the best WHOIS server then add it into the database (if the expiration date extraction is successful).
Note
The addition into the WHOIS database is only done if this method is running in a process with a name that does not starts with
PyFunceble
(case sensitive).
- url2netloc: Url2Netloc | None = None
- url_syntax_checker: URLSyntaxChecker | None = None
- property use_http_code_lookup: None
Provides the current value of the
_use_http_code_lookup
attribute.
- property use_reputation_lookup: bool
Provides the current value of the
_use_reputation_lookup
attribute.
- whois_query_tool: WhoisQueryTool | None = None
PyFunceble.checker.availability.domain module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the domains availability checker.
- 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.checker.availability.domain.DomainAvailabilityChecker(subject: str | None = None, *, use_extra_rules: bool | None = None, use_whois_lookup: bool | None = None, use_dns_lookup: bool | None = None, use_netinfo_lookup: bool | None = None, use_http_code_lookup: bool | None = None, use_reputation_lookup: bool | None = None, do_syntax_check_first: bool | None = None, db_session: Session | None = None, use_whois_db: bool | None = None, use_platform: bool | None = None)[source]
Bases:
AvailabilityCheckerBase
Provides the interface for checking the availability of a given domain.
- Parameters:
subject (str) – Optional, The subject to work with.
use_extra_rules (bool) – Optional, Activates/Disables the usage of our own set of extra rules.
use_whois_lookup (bool) – Optional, Activates/Disables the usage of the WHOIS lookup to gather the status of the given
subject
.use_dns_lookup (bool) – Optional, Activates/Disables the usage of the DNS lookup to gather the status of the given
subject
.use_netinfo_lookup (bool) – Optional, Activates/Disables the usage of the network information lookup module to gather the status of the given
subject
.use_http_code_lookup (bool) – Optional, Activates/Disables the usage of the HTTP status code lookup to gather the status of the given
subject
.use_reputation_lookup (bool) – Optional, Activates/Disables the usage of the reputation dataset lookup to gather the status of the given
subject
.do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
use_whois_db (bool) – Optional, Activates/Disable the usage of a local database to store the WHOIS datasets.
- query_status() DomainAvailabilityChecker [source]
Queries the result without anything more.
- try_to_query_status_from_reputation() DomainAvailabilityChecker [source]
Tries to query the status from the reputation lookup.
PyFunceble.checker.availability.domain_and_ip module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the domains and IP availability checker.
- 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.checker.availability.domain_and_ip.DomainAndIPAvailabilityChecker(subject: str | None = None, *, use_extra_rules: bool | None = None, use_whois_lookup: bool | None = None, use_dns_lookup: bool | None = None, use_netinfo_lookup: bool | None = None, use_http_code_lookup: bool | None = None, use_reputation_lookup: bool | None = None, do_syntax_check_first: bool | None = None, db_session: Session | None = None, use_whois_db: bool | None = None, use_platform: bool | None = None)[source]
Bases:
AvailabilityCheckerBase
Provides the interface for checking the availability of a IP or domain.
- Parameters:
subject (str) – Optional, The subject to work with.
use_extra_rules (bool) – Optional, Activates/Disables the usage of our own set of extra rules.
use_whois_lookup (bool) – Optional, Activates/Disables the usage of the WHOIS lookup to gather the status of the given
subject
.use_dns_lookup (bool) – Optional, Activates/Disables the usage of the DNS lookup to gather the status of the given
subject
.use_netinfo_lookup (bool) – Optional, Activates/Disables the usage of the network information lookup module to gather the status of the given
subject
.use_http_code_lookup (bool) – Optional, Activates/Disables the usage of the HTTP status code lookup to gather the status of the given
subject
.use_reputation_lookup (bool) – Optional, Activates/Disables the usage of the reputation dataset lookup to gather the status of the given
subject
.do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
use_whois_db (bool) – Optional, Activates/Disable the usage of a local database to store the WHOIS datasets.
- query_status() DomainAndIPAvailabilityChecker [source]
Queries the result without anything more.
PyFunceble.checker.availability.ip module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the IP availability checker.
- 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.checker.availability.ip.IPAvailabilityChecker(subject: str | None = None, *, use_extra_rules: bool | None = None, use_whois_lookup: bool | None = None, use_dns_lookup: bool | None = None, use_netinfo_lookup: bool | None = None, use_http_code_lookup: bool | None = None, use_reputation_lookup: bool | None = None, do_syntax_check_first: bool | None = None, db_session: Session | None = None, use_whois_db: bool | None = None, use_platform: bool | None = None)[source]
Bases:
AvailabilityCheckerBase
Provides the interface for checking the availability of a given IP.
- Parameters:
subject (str) – Optional, The subject to work with.
use_extra_rules (bool) – Optional, Activates/Disables the usage of our own set of extra rules.
use_whois_lookup (bool) – Optional, Activates/Disables the usage of the WHOIS lookup to gather the status of the given
subject
.use_dns_lookup (bool) – Optional, Activates/Disables the usage of the DNS lookup to gather the status of the given
subject
.use_netinfo_lookup (bool) – Optional, Activates/Disables the usage of the network information lookup module to gather the status of the given
subject
.use_http_code_lookup (bool) – Optional, Activates/Disables the usage of the HTTP status code lookup to gather the status of the given
subject
.use_reputation_lookup (bool) – Optional, Activates/Disables the usage of the reputation dataset lookup to gather the status of the given
subject
.do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
use_whois_db (bool) – Optional, Activates/Disable the usage of a local database to store the WHOIS datasets.
- query_status() IPAvailabilityChecker [source]
Queries the result without anything more.
- try_to_query_status_from_reputation() IPAvailabilityChecker [source]
Tries to query the status from the reputation lookup.
PyFunceble.checker.availability.params module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides our parameter class. The parameter class is the class that will be provided to end-user. It is only a placeholder and should only be taken as informative.
- 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.checker.availability.params.AvailabilityCheckerParams(do_syntax_check_first: bool | None = None, use_platform: bool | None = None, use_extra_rules: bool | None = None, use_whois_lookup: bool | None = None, use_dns_lookup: bool | None = None, use_netinfo_lookup: bool | None = None, use_http_code_lookup: bool | None = None, use_reputation_lookup: bool | None = None, use_whois_db: bool | None = None)[source]
Bases:
CheckerParamsBase
Provides the description of an availability checker paramaters.
PyFunceble.checker.availability.status module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides our status class. The status class is the class that will be provided to end-user.
- 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.checker.availability.status.AvailabilityCheckerStatus(subject_kind: str | None = None, subject: str | None = None, idna_subject: str | None = None, netloc: str | None = None, status: str | None = None, status_source: str | None = None, tested_at: datetime | None = None, params: CheckerParamsBase | None = None, checker_type: str | None = 'AVAILABILITY', dns_lookup_record: DNSQueryToolRecord | None = None, whois_lookup_record: WhoisQueryToolRecord | None = None, domain_syntax: bool | None = None, second_level_domain_syntax: bool | None = None, subdomain_syntax: bool | None = None, ip_syntax: bool | None = None, ipv4_syntax: bool | None = None, ipv6_syntax: bool | None = None, ipv4_range_syntax: bool | None = None, ipv6_range_syntax: bool | None = None, url_syntax: bool | None = None, expiration_date: str | None = None, registrar: str | None = None, whois_record: str | None = None, status_before_extra_rules: str | None = None, status_after_extra_rules: str | None = None, status_source_before_extra_rules: str | None = None, status_source_after_extra_rules: str | None = None, dns_lookup: Dict[str, List[str] | None] | None = None, netinfo: Dict[str, List[str] | None] | None = None, http_status_code: int | None = None)[source]
Bases:
CheckerStatusBase
Provides the description of an availablity status.
- dns_lookup_record: DNSQueryToolRecord | None = None
- is_special() bool [source]
Checks if the current status is a SPECIAL one. Meaning that we applied some of our own rules.
- whois_lookup_record: WhoisQueryToolRecord | None = None
PyFunceble.checker.availability.url module
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides the URL availability checker.
- 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.checker.availability.url.URLAvailabilityChecker(subject: str | None = None, *, use_extra_rules: bool | None = None, use_whois_lookup: bool | None = None, use_dns_lookup: bool | None = None, use_netinfo_lookup: bool | None = None, use_http_code_lookup: bool | None = None, use_reputation_lookup: bool | None = None, do_syntax_check_first: bool | None = None, db_session: Session | None = None, use_whois_db: bool | None = None, use_platform: bool | None = None)[source]
Bases:
AvailabilityCheckerBase
Provides the interface for checking the availability of a given URL.
- Parameters:
subject (str) – Optional, The subject to work with.
use_extra_rules (bool) – Optional, Activates/Disables the usage of our own set of extra rules.
use_whois_lookup (bool) – Optional, Activates/Disables the usage of the WHOIS lookup to gather the status of the given
subject
.use_dns_lookup (bool) – Optional, Activates/Disables the usage of the DNS lookup to gather the status of the given
subject
.use_netinfo_lookup (bool) – Optional, Activates/Disables the usage of the network information lookup module to gather the status of the given
subject
.use_http_code_lookup (bool) – Optional, Activates/Disables the usage of the HTTP status code lookup to gather the status of the given
subject
.use_reputation_lookup (bool) – Optional, Activates/Disables the usage of the reputation dataset lookup to gather the status of the given
subject
.do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
use_whois_db (bool) – Optional, Activates/Disable the usage of a local database to store the WHOIS datasets.
- query_status() URLAvailabilityChecker [source]
Queries the result without anything more.
Changed in version 4.1.0b7.dev: DNS Query - first.
- subject_propagator() URLAvailabilityChecker [source]
Propagate the currently set subject.
Warning
You are not invited to run this method directly.
Changed in version 4.1.0b7.dev: DNS Lookup capability.
- try_to_query_status_from_dns() AvailabilityCheckerBase [source]
Tries to query the status from the DNS lookup after switching the idna subject to the url base.
Warning
This method does not answer as you may expect.
Indeed, if a DNS lookup failed, this method will overwrite the standard response by setting the status to
INACTIVE
and the status source toDNSLOOKUP
.Added in version 4.1.0b7: DNS Lookup as a “down” switcher.
- try_to_query_status_from_http_status_code(*, from_domain_test: bool = False) URLAvailabilityChecker [source]
Tries to query the status from the network information.
- Parameters:
from_domain_test (bool) –
Whether we wanted to test a test - actually.
Setting this argument to
True
will exit the http_status_code test if the given subject is already a URL.
- try_to_query_status_from_reputation() URLAvailabilityChecker [source]
Tries to query the status from the reputation lookup.
Module contents
The tool to check the availability or syntax of domain, IP or URL.
██████╗ ██╗ ██╗███████╗██╗ ██╗███╗ ██╗ ██████╗███████╗██████╗ ██╗ ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║ ██║████╗ ██║██╔════╝██╔════╝██╔══██╗██║ ██╔════╝
██████╔╝ ╚████╔╝ █████╗ ██║ ██║██╔██╗ ██║██║ █████╗ ██████╔╝██║ █████╗
██╔═══╝ ╚██╔╝ ██╔══╝ ██║ ██║██║╚██╗██║██║ ██╔══╝ ██╔══██╗██║ ██╔══╝
██║ ██║ ██║ ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝ ╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝
Provides everything related to the core of the availablity checker.
- 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.