PyFunceble.converter package

Submodules

PyFunceble.converter.adblock_input_line2subject module

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

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

Provides the conversion of an AdBlock input line into testable subjests.

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.converter.adblock_input_line2subject.AdblockInputLine2Subject(data_to_convert: Any | None = None, *, aggressive: bool = False, regex_helper: RegexHelper | None = None)[source]

Bases: ConverterBase

Provides an interface for the conversion or extraction of valuable subjects from an inputted AdBlock line.

convert(data: Any, *, aggressive: bool = False) List[str][source]

Converts the given dataset.

Parameters:
  • data – The data to convert.

  • aggressive – Whether we should aggressively extract datasets.

property data_to_convert: Any | None

Provides the current state of the _data_to_convert attribute.

static extract_base(subject: str | List[str]) str | List[str][source]

Extracts the base of the given subject (supposely URL).

Parameters:

subject – The subject to work with.

Example:

Giving "hello.world/?is=beautiful" returns "hello.world"

get_converted() List[str][source]

Provides the converted data.

static should_be_ignored(line: str) bool[source]

Checks if we should ignore the given line.

PyFunceble.converter.base module

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

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

Provides the base of all our converter class.

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.converter.base.ConverterBase(data_to_convert: Any | None = None, *, aggressive: bool = None)[source]

Bases: object

Provides the base of all converter class.

property aggressive: bool

Provides the state of the _aggressive attribute.

convert(data: Any, *, aggressive: bool = False) Any | None[source]

Converts the given dataset.

Parameters:

data – The data to convert.

:param aggressive.

Whether we should aggressively extract datasets.

property data_to_convert: Any | None

Provides the current state of the _data_to_convert attribute.

get_converted() Any | None[source]

Provides the converted data.

set_aggressive(value: bool) ConverterBase[source]

Provides a way to activate/deactivate the aggressive decoding.

set_data_to_convert(value: Any) ConverterBase[source]

Sets the data to convert / to work with.

Parameters:

value – The value to set.

PyFunceble.converter.cidr2subject module

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

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

Provides the converter of CIDR to subjects.

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.converter.cidr2subject.CIDR2Subject(data_to_convert: Any | None = None, *, ip_syntax_checker: IPSyntaxChecker | None = None)[source]

Bases: ConverterBase

Converts/Extracts the subjects of from the given CIDR.

convert(data: Any, *, aggressive: bool = False) List[str][source]

Converts the given dataset.

Parameters:

data – The data to convert.

property data_to_convert: Any | None

Provides the current state of the _data_to_convert attribute.

get_converted() List[str][source]

Provides the subject-s to test.

ip_syntax_checker: IPSyntaxChecker | None = None

PyFunceble.converter.input_line2subject module

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

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

Provides the default input line converter.

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.converter.input_line2subject.InputLine2Subject(data_to_convert: Any | None = None, *, aggressive: bool = None)[source]

Bases: ConverterBase

Converts/Extract the subjcts to test from an inputed line.

COMMENT: str = '#'
NSLOOKUP_SPACE: str = '\\032'
PARTICULAR_COMMENT: List[str] = ['!']
SPACE: str = ' '
TAB: str = '\t'
convert(data: Any, *, aggressive: bool = False) List[str][source]

Converts the given dataset.

Parameters:
  • data – The data to convert.

  • aggressive (bool) – Whether we should aggressively decode subjects.

property data_to_convert: Any | None

Provides the current state of the _data_to_convert attribute.

static extract_base(subject: str) str[source]

Extracts the base of the given subject - assuming that it may be a URL.

Parameters:

subject – The subject to work with.

get_converted() List[str][source]

Provides the subject to test.

PyFunceble.converter.internal_url module

PyFunceble.converter.rpz_input_line2subject module

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

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

Provides the conversion of the an RPZ input line into testable subjects.

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.converter.rpz_input_line2subject.RPZInputLine2Subject(data_to_convert: Any | None = None, *, aggressive: bool = None)[source]

Bases: InputLine2Subject

Converts/Extracts the subject from the given RPZ inputline.

COMMENT: list = [';', '//', '#']
SPECIAL: list = ['$', '@']
convert(data: Any, *, aggressive: bool = False) List[str][source]

Converts the given dataset.

Parameters:

data – The data to convert.

get_converted() List[str][source]

Provides the converted data.

PyFunceble.converter.rpz_policy2subject module

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

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

Provides the conversion of the an RPZ POlicy into testable subjects.

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.converter.rpz_policy2subject.RPZPolicy2Subject(data_to_convert: Any | None = None, soas: List[str] | None = None, soa: str | None = None, *, wildcard2subject: Wildcard2Subject | None = None)[source]

Bases: RPZInputLine2Subject

Converts/Extracts the subject from the given RPZ Policy into a subject.

CLEANUP_MARKERS: list = ['.rpz-nsdname']
IP_MARKERS: list = ['.rpz-client-ip', '.rpz-ip', '.rpz-nsip']
convert(data: Any, *, aggressive: bool = False) str | None[source]

Converts the given dataset.

Parameters:

data – The data to convert.

get_converted() str | None[source]

Provides the converted data.

classmethod get_matching_cleanup_marker(subject: str) str | None[source]

Checks if the given subject has a cleanup marker and provides it if found.

classmethod get_matching_ip_marker(subject: str) str | None[source]

Checks if the given subject has an IP marker and provides it if found.

classmethod get_subject_from_ip_marker(subject: str, marker: str) str[source]

Removes the ip marker and converts the IP into a testable subject.

static remove_marker(subject: str, marker: str) str[source]

Removes the given marker from the given subject.

set_soa(value: str) RPZPolicy2Subject[source]

Sets the current SOA.

Parameters:

value – The value to set.

set_soas(value: List[str]) RPZPolicy2Subject[source]

Sets the current SOAs.

Parameters:

value – The value to set.

property soa: str | None

Provides the currently set SOA.

property soas: str | None

Provides the currently set SOAs.

wilcard2subject: Wildcard2Subject | None = None

PyFunceble.converter.subject2complements module

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

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

Provides an easy way to convert and get the complements of a 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.converter.subject2complements.Subject2Complements(data_to_convert: Any | None = None, *, include_given: bool | None = False)[source]

Bases: ConverterBase

Converts a given wildcard into a testable subject.

convert(data: Any, *, aggressive: bool = False) List[str][source]

Converts the given dataset.

Parameters:

data – The data to convert.

property data_to_convert: Any | None

Provides the current state of the _data_to_convert attribute.

get_converted() List[str][source]

Provides the converted data.

property include_given: bool

Provides the state of the _include_given attribute.

set_include_given(value: bool) Subject2Complements[source]

Provides a way to activate/deactivate the inclusion of the given subject into the result.

PyFunceble.converter.url2netloc module

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

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

Provides a way to convert/extract the network location of a given URL.

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.converter.url2netloc.Url2Netloc(data_to_convert: Any | None = None, *, aggressive: bool = None)[source]

Bases: ConverterBase

Provides the interface for the conversion/extration of the network location of a given URL.

convert(data: Any, *, aggressive: bool = False) str[source]

Converts the given dataset.

Parameters:

data – The data to convert.

property data_to_convert: Any | None

Provides the current state of the _data_to_convert attribute.

get_converted() str[source]

Provides the converted data (after conversion)

static parse_single_url(data) ParseResult | None[source]

Parses the URL.

parse_url() Url2Netloc[source]

Parses the URL.

parsed_url: ParseResult | None = None

Expose the parsed URL.

PyFunceble.converter.wildcard2subject module

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

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

Provides an easy way to convert wildcard subject into a testable 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.converter.wildcard2subject.Wildcard2Subject(data_to_convert: Any | None = None, *, aggressive: bool = None)[source]

Bases: ConverterBase

Converts a given wildcard into a testable subject.

WILDCARD: str = '*.'
convert(data: Any, *, aggressive: bool = False) str[source]

Converts the given dataset.

Parameters:

data – The data to convert.

property data_to_convert: Any | None

Provides the current state of the _data_to_convert attribute.

get_converted() str[source]

Provides the converted data.

Module contents

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

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

Provides all the converters.

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.