PyFunceble.query package

Subpackages

Submodules

PyFunceble.query.http_status_code module

PyFunceble.query.platform module

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

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

Provides ans interface which let us interact with the platform API.

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.platform.PlatformQueryTool(*, token: str | None = None, preferred_status_origin: str | None = None, timeout: float | None = None, checker_priority: List[str] | None = None, checker_exclude: List[str] | None = None)[source]

Bases: object

Provides the interface to interact with the platform.

Parameters:
  • token

    The token to use to communicate with the API.

    Warning

    If None is given, the class constructor will try to load the PYFUNCEBLE_COLLECTION_API_TOKEN or PYFUNCEBLE_PLATFORM_API_TOKEN environment variable.

  • url_base – The base of the URL to communicate with.

  • preferred_status_origin – The preferred data origin. It can be frequent, latest or recommended.

STD_CHECKER_EXCLUDE: str = ['none']
STD_CHECKER_PRIORITY: str = ['none']
STD_PREFERRED_STATUS_ORIGIN: str = 'frequent'
STD_TIMEOUT: float = 5.0
SUBJECT: str = '109272947111272947992729474627294711527294711627294711527294711127294710427294745272947100272947972729471012729471002729474627294797272947116272947101272947982729474627294710527294711227294797272947472729474727294758272947115272947112272947116272947116272947104'
SUPPORTED_CHECKERS: List[str] = ['syntax', 'reputation', 'availability']
SUPPORTED_STATUS_ORIGIN: List[str] = ['frequent', 'latest', 'recommended']
property checker_exclude: List[str] | None

Provides the value of the _checker_exclude attribute.

property checker_priority: List[str] | None

Provides the value of the _checker_priority attribute.

deliver_contract(*args, **kwargs)[source]
ensure_modern_api()[source]

Ensures that the is_modern_api attribute is set before running the decorated method.

guess_all_settings() PlatformQueryTool[source]

Try to guess all settings.

guess_and_set_checker_exclude() PlatformQueryTool[source]

Try to guess the checker to exclude.

guess_and_set_checker_priority() PlatformQueryTool[source]

Try to guess the checker priority to use.

guess_and_set_is_modern_api() PlatformQueryTool[source]

Try to guess if we are working with a legacy version.

guess_and_set_preferred_status_origin() PlatformQueryTool[source]

Try to guess the preferred status origin.

guess_and_set_timeout() PlatformQueryTool[source]

Try to guess the timeout to use.

property is_modern_api: bool

Provides the value of the _is_modern_api attribute.

property preferred_status_origin: str | None

Provides the value of the _preferred_status_origin attribute.

pull(*args, **kwargs)[source]
pull_contract(*args, **kwargs)[source]
push(*args, **kwargs)[source]
session: Session | None = None
set_checker_exclude(value: List[str]) PlatformQueryTool[source]

Sets the checker to exclude.

Parma value:

The value to set.

set_checker_priority(value: List[str]) PlatformQueryTool[source]

Sets the checker priority.

Parma value:

The value to set.

set_is_modern_api(value: bool) PlatformQueryTool[source]

Sets the value of the _is_modern_api attribute.

Parameters:

value – The value to set.

set_preferred_status_origin(value: str) PlatformQueryTool[source]

Sets the preferred status origin.

Parma value:

The value to set.

set_timeout(value: float) PlatformQueryTool[source]

Sets the value of the _timeout attribute.

Parameters:

value – The value to set.

set_token(value: str) PlatformQueryTool[source]

Sets the value of the _token attribute.

Parameters:

value – The value to set.

set_url_base(value: str) PlatformQueryTool[source]

Sets the base of the URL to work with.

Parma value:

The value to set.

property timeout: float

Provides the value of the _timeout attribute.

property token: str | None

Provides the currently set token.

property url_base: str | None

Provides the value of the _url_base attribute.

Module contents

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

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

Provides everything related queries and communication with target resources and information.

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.