PyFunceble.checker.availability package

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:
https://pyfunceble.github.io/#/special-thanks
Contributors:
https://pyfunceble.github.io/#/contributors
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/dev/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022 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

    http://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: Optional[str] = None, *, use_extra_rules: Optional[bool] = None, use_whois_lookup: Optional[bool] = None, use_dns_lookup: Optional[bool] = None, use_netinfo_lookup: Optional[bool] = None, use_http_code_lookup: Optional[bool] = None, use_reputation_lookup: Optional[bool] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_whois_db: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.base.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.
STD_USE_DNS_LOOKUP = True
STD_USE_EXTRA_RULES = True
STD_USE_HTTP_CODE_LOOKUP = True
STD_USE_NETINFO_LOOKUP = True
STD_USE_REPUTATION_LOOKUP = False
STD_USE_WHOIS_DB = True
STD_USE_WHOIS_LOOKUP = True
addressinfo_query_tool = None
dns_query_tool = None
domain_syntax_checker = None
extra_rules_handler = None
get_status() → Optional[PyFunceble.checker.availability.status.AvailabilityCheckerStatus][source]

Provides the current state of the status.

Note

This method will automatically query status using the PyFunceble.checker.base.CheckerBase.query_status() if the PyFunceble.checker.status_base.CheckerStatusBase.status attribute is not set.

guess_all_settings() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Try to guess all settings.

guess_and_set_dns_lookup() → PyFunceble.checker.availability.base.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() → PyFunceble.checker.availability.base.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() → PyFunceble.checker.availability.base.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() → PyFunceble.checker.availability.base.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() → PyFunceble.checker.availability.base.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() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Try to guess and set the value of the use_whois_db attribute.

guess_and_set_use_whois_lookup() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Try to guess and set the value of the use_whois attribute from the configuration file.

hostbyaddr_query_tool = None
http_status_code_query_tool = None
ip_syntax_checker = None
params = None
query_dns_record() → Optional[Dict[str, Optional[List[str]]]][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() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Queries the status and for for more action.

query_syntax_checker() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Queries the syntax checker.

set_use_dns_lookup(value: bool) → PyFunceble.checker.availability.base.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) → PyFunceble.checker.availability.base.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) → PyFunceble.checker.availability.base.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) → PyFunceble.checker.availability.base.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) → PyFunceble.checker.availability.base.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) → PyFunceble.checker.availability.base.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) → PyFunceble.checker.availability.base.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:
  1. No status available yet. Continue to next test method.
  2. Status is/still INVALID. Continue to next test method.
  3. Above are False. Not allowed to continue to next test method.
status = None
subject_propagator() → PyFunceble.checker.base.CheckerBase[source]

Propagate the currently set subject.

Warning

You are not invited to run this method directly.

try_to_query_status_from_collection() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to get and set the status from the Collection API.

try_to_query_status_from_dns() → PyFunceble.checker.availability.base.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_http_status_code() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to query the status from the HTTP status code.

try_to_query_status_from_netinfo() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to query the status from the network information.

try_to_query_status_from_reputation() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to query the status from the reputation lookup.

try_to_query_status_from_syntax_lookup() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to query the status from the syntax.

try_to_query_status_from_whois() → PyFunceble.checker.availability.base.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).

url_syntax_checker = None
use_dns_lookup

Provides the current value of the _use_dns_lookup attribute.

use_extra_rules

Provides the current value of the _use_extra_rules attribute.

use_http_code_lookup

Provides the current value of the _use_http_code_lookup attribute.

use_netinfo_lookup

Provides the current value of the _use_netinfo_lookup attribute.

use_reputation_lookup

Provides the current value of the _use_reputation_lookup attribute.

use_whois_db

Provides the current value of the _use_whois_db attribute.

use_whois_lookup

Provides the current value of the _use_whois_lookup attribute.

whois_query_tool = 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:
https://pyfunceble.github.io/#/special-thanks
Contributors:
https://pyfunceble.github.io/#/contributors
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/dev/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022 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

    http://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: Optional[str] = None, *, use_extra_rules: Optional[bool] = None, use_whois_lookup: Optional[bool] = None, use_dns_lookup: Optional[bool] = None, use_netinfo_lookup: Optional[bool] = None, use_http_code_lookup: Optional[bool] = None, use_reputation_lookup: Optional[bool] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_whois_db: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.availability.base.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.
static is_valid() → bool[source]

Provides the result of the validation.

query_status() → PyFunceble.checker.availability.domain.DomainAvailabilityChecker[source]

Queries the result without anything more.

try_to_query_status_from_reputation() → PyFunceble.checker.availability.domain.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:
https://pyfunceble.github.io/#/special-thanks
Contributors:
https://pyfunceble.github.io/#/contributors
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/dev/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022 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

    http://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: Optional[str] = None, *, use_extra_rules: Optional[bool] = None, use_whois_lookup: Optional[bool] = None, use_dns_lookup: Optional[bool] = None, use_netinfo_lookup: Optional[bool] = None, use_http_code_lookup: Optional[bool] = None, use_reputation_lookup: Optional[bool] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_whois_db: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.availability.base.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.
static is_valid() → bool[source]

Provides the result of the validation.

query_status() → PyFunceble.checker.availability.domain_and_ip.DomainAndIPAvailabilityChecker[source]

Queries the result without anything more.

PyFunceble.checker.availability.extra_rules 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:
https://pyfunceble.github.io/#/special-thanks
Contributors:
https://pyfunceble.github.io/#/contributors
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/dev/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022 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

    http://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.extra_rules.ExtraRulesHandler(status: Optional[PyFunceble.checker.availability.status.AvailabilityCheckerStatus] = None)[source]

Bases: object

Provides our very own extra rules handler.

Parameters:status (AvailabilityCheckerStatus) – The previously gathered status.
ensure_status_is_given()[source]

Ensures that the status is given before running the decorated method.

Raises:TypeError – If the subject is not a string.
http_codes_dataset = None
regex_active2inactive = {}
set_status(value: PyFunceble.checker.availability.status.AvailabilityCheckerStatus) → PyFunceble.checker.availability.extra_rules.ExtraRulesHandler[source]

Sets the status to work with.

Parameters:value – The status to work with.
start() → PyFunceble.checker.availability.extra_rules.ExtraRulesHandler[source]

Starts the process.

status

Provides the current state of the _status attribute.

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:
https://pyfunceble.github.io/#/special-thanks
Contributors:
https://pyfunceble.github.io/#/contributors
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/dev/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022 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

    http://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: Optional[str] = None, *, use_extra_rules: Optional[bool] = None, use_whois_lookup: Optional[bool] = None, use_dns_lookup: Optional[bool] = None, use_netinfo_lookup: Optional[bool] = None, use_http_code_lookup: Optional[bool] = None, use_reputation_lookup: Optional[bool] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_whois_db: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.availability.base.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.
static is_valid() → bool[source]

Provides the result of the validation.

query_status() → PyFunceble.checker.availability.ip.IPAvailabilityChecker[source]

Queries the result without anything more.

try_to_query_status_from_reputation() → PyFunceble.checker.availability.ip.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:
https://pyfunceble.github.io/#/special-thanks
Contributors:
https://pyfunceble.github.io/#/contributors
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/dev/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022 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

    http://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: Optional[bool] = None, use_collection: Optional[bool] = None, use_extra_rules: Optional[bool] = None, use_whois_lookup: Optional[bool] = None, use_dns_lookup: Optional[bool] = None, use_netinfo_lookup: Optional[bool] = None, use_http_code_lookup: Optional[bool] = None, use_reputation_lookup: Optional[bool] = None, use_whois_db: Optional[bool] = None)[source]

Bases: PyFunceble.checker.params_base.CheckerParamsBase

Provides the description of an availability checker paramaters.

do_syntax_check_first = None
use_dns_lookup = None
use_extra_rules = None
use_http_code_lookup = None
use_netinfo_lookup = None
use_reputation_lookup = None
use_whois_db = None
use_whois_lookup = None

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:
https://pyfunceble.github.io/#/special-thanks
Contributors:
https://pyfunceble.github.io/#/contributors
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/dev/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022 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

    http://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: Optional[str] = None, idna_subject: Optional[str] = None, status: Optional[str] = None, status_source: Optional[str] = None, tested_at: Optional[datetime.datetime] = None, params: Optional[PyFunceble.checker.params_base.CheckerParamsBase] = None, checker_type: Optional[str] = 'AVAILABILITY', dns_lookup_record: Optional[PyFunceble.query.record.dns.DNSQueryToolRecord] = None, whois_lookup_record: Optional[PyFunceble.query.record.whois.WhoisQueryToolRecord] = None, domain_syntax: Optional[bool] = None, second_level_domain_syntax: Optional[bool] = None, subdomain_syntax: Optional[bool] = None, ip_syntax: Optional[bool] = None, ipv4_syntax: Optional[bool] = None, ipv6_syntax: Optional[bool] = None, ipv4_range_syntax: Optional[bool] = None, ipv6_range_syntax: Optional[bool] = None, url_syntax: Optional[bool] = None, expiration_date: Optional[str] = None, registrar: Optional[str] = None, whois_record: Optional[str] = None, status_before_extra_rules: Optional[str] = None, status_after_extra_rules: Optional[str] = None, status_source_before_extra_rules: Optional[str] = None, status_source_after_extra_rules: Optional[str] = None, dns_lookup: Optional[Dict[str, Optional[List[str]]]] = None, netinfo: Optional[Dict[str, Optional[List[str]]]] = None, http_status_code: Optional[int] = None)[source]

Bases: PyFunceble.checker.status_base.CheckerStatusBase

Provides the description of an availablity status.

checker_type = 'AVAILABILITY'
dns_lookup = None
dns_lookup_record = None
domain_syntax = None
expiration_date = None
http_status_code = None
ip_syntax = None
ipv4_range_syntax = None
ipv4_syntax = None
ipv6_range_syntax = None
ipv6_syntax = None
is_active() → bool[source]

Checks if the current status is an ACTIVE one.

is_available() → bool[source]

Checks if the current status represent an available subject.

is_inactive() → bool[source]

Checks if the current status is an INACTIVE one.

is_invalid() → bool[source]

Checks if the current status is an INVALID one.

is_special() → bool[source]

Checks if the current status is a SPECIAL one. Meaning that we applied some of our own rules.

netinfo = None
registrar = None
second_level_domain_syntax = None
status_after_extra_rules = None
status_before_extra_rules = None
status_source_after_extra_rules = None
status_source_before_extra_rules = None
subdomain_syntax = None
url_syntax = None
whois_lookup_record = None
whois_record = 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:
https://pyfunceble.github.io/#/special-thanks
Contributors:
https://pyfunceble.github.io/#/contributors
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/dev/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022 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

    http://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: Optional[str] = None, *, use_extra_rules: Optional[bool] = None, use_whois_lookup: Optional[bool] = None, use_dns_lookup: Optional[bool] = None, use_netinfo_lookup: Optional[bool] = None, use_http_code_lookup: Optional[bool] = None, use_reputation_lookup: Optional[bool] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_whois_db: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.availability.base.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.
static is_valid() → bool[source]

Provides the result of the validation.

query_status() → PyFunceble.checker.availability.url.URLAvailabilityChecker[source]

Queries the result without anything more.

Changed in version 4.1.0b7.dev: DNS Query - first.

subject_propagator() → PyFunceble.checker.availability.url.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() → PyFunceble.checker.availability.base.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 to DNSLOOKUP.

New in version 4.1.0b7: DNS Lookup as a “down” switcher.

try_to_query_status_from_http_status_code() → PyFunceble.checker.availability.url.URLAvailabilityChecker[source]

Tries to query the status from the network information.

try_to_query_status_from_reputation() → PyFunceble.checker.availability.url.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:
https://pyfunceble.github.io/#/special-thanks
Contributors:
https://pyfunceble.github.io/#/contributors
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/dev/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022 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

    http://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.