PyFunceble.query.requests package

Submodules

PyFunceble.query.requests.requester module

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

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

Provides our own requests handler

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 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.query.requests.requester.Requester(*, max_retries: Optional[int] = None, verify_certificate: Optional[bool] = None, timeout: Optional[float] = None)[source]

Bases: object

Provides our very own requests handler.

STD_TIMEOUT = 3.0
STD_VERIFY_CERTIFICATE = False
_max_retries = 3
_timeout = 5.0
_verify_certificate = True
delete(*args, **kwargs) → requests.models.Response[source]

Sends a DELETE request and get its response.

exceptions = <module 'requests.exceptions' from '/home/docs/checkouts/readthedocs.org/user_builds/pyfunceble/envs/4.0.0-dev/lib/python3.7/site-packages/requests/exceptions.py'>
get(*args, **kwargs) → requests.models.Response[source]

Sends a GET request and get its response.

get_max_retries() → int[source]

Provides the current value of max_retries.

get_session() → requests.sessions.Session[source]

Provides a new session.

get_timeout() → float[source]

Provides the currently set timetout.

get_verify_certificate() → bool[source]

Provides the current value of the certificate validation.

guess_all_settings() → PyFunceble.query.requests.requester.Requester[source]

Try to guess all settings.

guess_and_set_timeout() → PyFunceble.query.requests.requester.Requester[source]

Try to guess the value from the configuration and set it.

guess_and_set_verify_certificate() → PyFunceble.query.requests.requester.Requester[source]

Try to guess the value from the configuration and set it.

head(*args, **kwargs) → requests.models.Response[source]

Sends a HEAD request and get its response.

max_retries

Provides the current state of the _max_retries attribute.

options(*args, **kwargs) → requests.models.Response[source]

Sends am OPTIONS request and get its response.

patch(*args, **kwargs) → requests.models.Response[source]

Sends a PATCH request and get its response.

post(*args, **kwargs) → requests.models.Response[source]

Sends a POST request and get its response.

put(*args, **kwargs) → requests.models.Response[source]

Sends a PUT request and get its response.

recreate_session()[source]

Recreate a new session after executing the decorated method.

request_factory()[source]

Provides a universal request factory.

Parameters:verb – The HTTP Verb to apply.
session = None
set_max_retries(value: int) → PyFunceble.query.requests.requester.Requester[source]

Sets the max retries value to apply to all subsequent requests.

Parameters:value – The value to set.
set_timeout(value: Union[int, float]) → PyFunceble.query.requests.requester.Requester[source]

Enable or disables the certificate validation.

Parameters:value – The value to set.
set_verify_certificate(value: bool) → PyFunceble.query.requests.requester.Requester[source]

Enable or disables the certificate validation.

Parameters:value – The value to set.
timeout

Provides the current state of the _timeout attribute.

urllib3_exceptions = <module 'urllib3.exceptions' from '/home/docs/checkouts/readthedocs.org/user_builds/pyfunceble/envs/4.0.0-dev/lib/python3.7/site-packages/urllib3/exceptions.py'>
verify_certificate

Provides the current state of the _verify_certificate attribute.

Module contents

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

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

Provides everything related to our very own request handler.

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