PyFunceble.query.whois package

Subpackages

Submodules

PyFunceble.query.whois.query_tool module

The tool to check the availability or syntax of domain, IP or URL.

██████╗ ██╗   ██╗███████╗██╗   ██╗███╗   ██╗ ██████╗███████╗██████╗ ██╗     ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║   ██║████╗  ██║██╔════╝██╔════╝██╔══██╗██║     ██╔════╝
██████╔╝ ╚████╔╝ █████╗  ██║   ██║██╔██╗ ██║██║     █████╗  ██████╔╝██║     █████╗
██╔═══╝   ╚██╔╝  ██╔══╝  ██║   ██║██║╚██╗██║██║     ██╔══╝  ██╔══██╗██║     ██╔══╝
██║        ██║   ██║     ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝        ╚═╝   ╚═╝      ╚═════╝ ╚═╝  ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝

Provides our interface for quering the WHOIS Record of a given subject.

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, 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.query.whois.query_tool.WhoisQueryTool(subject: str | None = None, *, server: str | None = None, query_timeout: float | None = None)[source]

Bases: object

Provides the interface to get the WHOIS record of a given subject.

BUFFER_SIZE: int = 4096
STD_PORT: int = 43
ensure_subject_is_given()[source]

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

Raises:

TypeError – If the subject is not a string.

property expiration_date: str | None

Provides the current state of the _expiration_date attribute.

expiration_date_extractor: ExpirationDateExtractor | None = None
get_lookup_record() WhoisQueryToolRecord | None[source]

Provides the current query record.

get_record() str | None[source]

Provides the current record.

Side Effect:

The record will be queried if it is non existent.

get_whois_server() str | None[source]

Provides the whois server to work with.

iana_dataset: IanaDataset | None = None
lookup_record: WhoisQueryToolRecord | None = None
query() str[source]

Queries the WHOIS record and return the current object.

query_record()[source]

Queries the record before executing the decorated method.

property query_timeout: float

Provides the current state of the _query_timeout attribute.

property record: str | None

Provides the current state of the _record attribute.

property registrar: str | None

Provides the current state of the _registrar attribute.

registrar_extractor: RegistarExtractor | None = None
reset_record()[source]

Resets the record before executing the decorated method.

property server: str | None

Provides the current state of the _server attribute.

set_query_timeout(value: float | int) WhoisQueryTool[source]

Sets the query_timeout to apply.

Parameters:

value – The query_timeout to apply.

set_server(value: str) WhoisQueryTool[source]

Sets the server to communicate with.

Parameters:

value – The server to work with.

set_subject(value: str) WhoisQueryTool[source]

Sets the subject to work with.

Parameters:

value – The subject to set.

property subject: str | None

Provides the current state of the _subject attribute.

update_lookup_record()[source]

Ensures that a clean record is generated after the execution of the decorated method.

Module contents

The tool to check the availability or syntax of domain, IP or URL.

██████╗ ██╗   ██╗███████╗██╗   ██╗███╗   ██╗ ██████╗███████╗██████╗ ██╗     ███████╗
██╔══██╗╚██╗ ██╔╝██╔════╝██║   ██║████╗  ██║██╔════╝██╔════╝██╔══██╗██║     ██╔════╝
██████╔╝ ╚████╔╝ █████╗  ██║   ██║██╔██╗ ██║██║     █████╗  ██████╔╝██║     █████╗
██╔═══╝   ╚██╔╝  ██╔══╝  ██║   ██║██║╚██╗██║██║     ██╔══╝  ██╔══██╗██║     ██╔══╝
██║        ██║   ██║     ╚██████╔╝██║ ╚████║╚██████╗███████╗██████╔╝███████╗███████╗
╚═╝        ╚═╝   ╚═╝      ╚═════╝ ╚═╝  ╚═══╝ ╚═════╝╚══════╝╚═════╝ ╚══════╝╚══════╝

Provides everything related to the way we get or manipulate WHOIS record.

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, 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.