PyFunceble.query.requests package
Subpackages
- PyFunceble.query.requests.adapter package
- Submodules
- PyFunceble.query.requests.adapter.base module
RequestAdapterBase
RequestAdapterBase.extract_extension()
RequestAdapterBase.fake_response()
RequestAdapterBase.fetch_proxy_from_pattern()
RequestAdapterBase.proxy_pattern
RequestAdapterBase.resolve()
RequestAdapterBase.resolve_with_cache()
RequestAdapterBase.resolve_without_cache()
RequestAdapterBase.resolving_cache
RequestAdapterBase.resolving_use_cache
RequestAdapterBase.timeout
- PyFunceble.query.requests.adapter.http module
- PyFunceble.query.requests.adapter.https module
- Module contents
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:
- 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.query.requests.requester.Requester(*, max_retries: int | None = None, verify_certificate: bool | None = None, timeout: float | None = None, max_redirects: int | None = None, dns_query_tool: DNSQueryTool | None = None, proxy_pattern: dict | None = None)[source]
Bases:
object
Provides our very own requests handler.
- Parameters:
max_retries (int) – Optional, The maximum number of retries to perform.
verify_certificate (bool) – Optional, Should we verify and validate the SSL/TLS certificate ?
timeout (float) – Optional, The timeout to apply to the query.
max_redirects (int) – Optional, The maximum number of redirects to allow.
dns_query_tool – Optional, The DNS Query tool to use.
proxy_pattern –
Optional, The proxy pattern to apply to each query.
Expected format:
- ::
- {
- “global”: {
# Everything under global will be used as default if no # rule matched.
”http”: “str” ## HTTP_PROXY “https”: “str” ## HTTPS_PROXY
}, “rules”:[
# A set/list of rules to work with.
- {
“http”: “str” ## HTTP_PROXY when TLD is matched. “https”: “str” ## HTTPS_PROXY when TLD is matched. “tld”: [
”str”, “str”, str
]
}, {
”http”: “str” ## HTTP_PROXY when TLD is matched. “https”: “str” ## HTTPS_PROXY when TLD is matched. “tld”: [
”str”, “str”
]
},
]
}
- dns_query_tool: DNSQueryTool | None = None
- exceptions = <module 'requests.exceptions' from '/usr/lib/python3/dist-packages/requests/exceptions.py'>
- guess_and_set_max_retries() Requester [source]
Try to guess the value from the configuration and set it.
- guess_and_set_proxy_pattern() Requester [source]
Try to guess the value from the configuration and set it.
- guess_and_set_timeout() Requester [source]
Try to guess the value from the configuration and set it.
- guess_and_set_verify_certificate() Requester [source]
Try to guess the value from the configuration and set it.
- request_factory()[source]
Provides a universal request factory.
- Parameters:
verb – The HTTP Verb to apply.
- set_max_redirects(value: int) Requester [source]
Sets the max redirects value to apply to all subsequent requests.
- Parameters:
value – The value to set.
- set_max_retries(value: int) Requester [source]
Sets the max retries value to apply to all subsequent requests.
- Parameters:
value – The value to set.
- set_proxy_pattern(value: dict) Requester [source]
Overwrite the proxy pattern.
- Parameters:
value – The value to set.
- set_timeout(value: int | float) Requester [source]
Enable or disables the certificate validation.
- Parameters:
value – The value to set.
- set_verify_certificate(value: bool) Requester [source]
Enable or disables the certificate validation.
- Parameters:
value – The value to set.
- urllib3_exceptions = <module 'urllib3.exceptions' from '/usr/lib/python3/dist-packages/urllib3/exceptions.py'>
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:
- 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.