PyFunceble logo

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

https://img.shields.io/badge/code%20style-black-000000.png https://coveralls.io/repos/github/funilrys/PyFunceble/badge.png?branch=master https://img.shields.io/github/license/funilrys/PyFunceble.png https://img.shields.io/pypi/v/pyfunceble.png https://img.shields.io/github/issues/funilrys/PyFunceble.png https://pepy.tech/badge/pyfunceble https://pepy.tech/badge/pyfunceble/month https://pepy.tech/badge/pyfunceble/week

Welcome to PyFunceble!

PyFunceble is a tool that aims to provide an accurate availability check through the usage of multiple sources which are for example - to only list a few:

  • the WHOIS record(s).
  • the DNS record(s).
  • the HTTP status code.

PyFunceble can be included in your existing project through:

  • its standard built-in CLI implementation.
  • its Python API.
  • the PyFunceble web-worker project that provides the core functionalities of PyFunceble behind a web API.

The PyFunceble CLI can test from a hosts file, a plain list of subjects, an AdBlock filter list or even an RPZ record.

As of today, PyFunceble is running actively - if not daily - within several servers, laptops, PCs, and Raspberry Pis. It is even used - thanks to our auto continue mechanism - with CI engines like GitHub Action, Travis CI, or GitLab CI.

Happy testing with PyFunceble!

History of the project

PyFunceble is the little sister of Funceble which was archived on 13th March 2018. In March 2018, because Funceble was starting to become a huge unmanageable script, I - Nissar Chababy aka @funilrys - decided to make it a Python tool while extending my Python knowledge. It was meant for my own use case.

Back then, my problem was that I didn’t want to download a huge hosts file knowing that most of the entries do not exist or are not reachable - anymore. That’s how Py-Funceble started.

My objective - now - through this tool is to provide a tool and a Python API which helps the world test the availability of domains, IPs and URL through the gathering and interpretation of information from existing tools or protocols like WHOIS records, DNS lookup, or even HTTP status codes.

The base of this tool was my idea. But as with many Open Source projects, communities, or individuals, we evolve with the people we meet, exchange with or just discuss with privately. PyFunceble was and is still not an exception to that.

My main idea was to check the availability of domains in a hosts files. But 3 years later, PyFunceble is now capable of a lot including:

  • The testing of domains, IPs, and URLs.
  • The checking of the syntax or reputation of a domain, IP, and URL.
  • The decoding of AdBlock filters, RPZ records, hosts or plain files before a test from the CLI.

PyFunceble evolved and will probably continue to evolve with the time and the people using it.

In June 2020, the PyFunceble-dev PyPI package - which gets everything as soon as possible compared to the PyFunceble (stable) package - reached 1 million total downloads. I never noticed it until I was reached by someone informing me of it. But, I was shocked.

I never thought that something I built from A to Z in my free time will ever reach that point. I was thankful to that nice person for informing me of it. But at the same time concerned about PyFunceble and how it will evolve. That’s why I started the development of PyFunceble 4.0.0. My idea as I was refactoring it was to provide a better Python API and implementation of my core ideas along with a better incorporation and extension capability. Indeed, in the last few years, I was so much obsessed with the CLI that I really never wrote each component individually. They were all dependent - if not part of - the CLI. With 4.0.0, you can now import one of the components of PyFunceble and start straight away. No real need to play with the configuration unless you want something very specific. That’s how I see the future of PyFunceble.

As of today, PyFunceble is running actively - if not daily - within several servers, laptops, PCs, and Raspberry Pis. It is even used - thanks to our auto continue dataset and component - with CI engines like GitHub Action, Travis CI, and GitLab CI.

PyFunceble is my tool. But it is indirectly also become yours. Therefore, I invite you to let me know how you use PyFunceble or simply open a discussion - or join an existing one - about anything you do with PyFunceble. But also anything that you - would - like - or dislike - in PyFunceble.

Happy testing with PyFunceble!

What can PyFunceble do?

  • Test the availability of a domain.
  • Test the availability of an IPv4.
  • Test the availability of an IPv6.
  • Test the availability of a URL.
  • Test the availability of a domain/DNS name in a private or local network.
  • Test the availability of an IPv4 in a private or local network.
  • Test the availability of an IPv6 in a private or local network.
  • Test the availability of a URL in a private or local network.
  • Test the syntax of a domain.
  • Test the syntax of an IPv4.
  • Test the syntax of an IPv6.
  • Test the syntax of a URL.
  • Test against the AlienVault’s reputation of an IPv4.
  • Test of domain or IP which are present into an Adblock formatted file.
  • Test from a given raw link.
  • Test using multiprocessing (from CLI only).
  • Save test result(s) in file(s) (hosts file, plain text and/or JSON format).
  • Save test result(s) in a PostgreSQL, MySQL or MariaDB database.
  • Show test result(s) on screen.
  • Show percentage of each status (ACTIVE, INACTIVE, INVALID)
  • Sort outputs hierarchically.
  • “Mining” of domain or IP which are related to the tested element.
  • Auto-continuation of tests in case of system crash or script stop.
  • Filtering of a file content.
    • This feature will let us for example test all blogspot domain of the given file no matter the content of the file.
  • Set the user-agent to use for the tests.
  • Give some analytic depending of the HTTP status code (ACTIVE, POTENTIALLY_ACTIVE, POTENTIALLY_INACTIVE, SUSPICIOUS).
  • Retest overtime of INACTIVE and INVALID domains.
  • Print the execution time on screen and file.
  • Customisation of the different option via command-line arguments or configuration file.
  • Continuous tests under Travis CI or GitLab CI/CI
    • … with the help of an auto saving and database system.
    • Set the branch to push the result to. For the autosaving system.
    • Set the minimal time before we autosave in order to avoid CI/CD limitation.
    • Set a command to execute at the end of the test.
    • Set the commit message for the autosaving system.
  • … and a lot more!

Contributors

Thanks to those awesome peoples for their awesome and crazy idea(s), contribution(s) and or issue report which made or make PyFunceble a better tool.

 _______ _                 _          _                              _
|__   __| |               | |        | |                            | |
   | |  | |__   __ _ _ __ | | _____  | |_ ___    _   _  ___  _   _  | |
   | |  | '_ \ / _` | '_ \| |/ / __| | __/ _ \  | | | |/ _ \| | | | | |
   | |  | | | | (_| | | | |   <\__ \ | || (_) | | |_| | (_) | |_| | |_|
   |_|  |_| |_|\__,_|_| |_|_|\_\___/  \__\___/   \__, |\___/ \__,_| (_)
                                                  __/ |
                                                 |___/

Special Thanks

Thanks to those awesome organization(s), tool(s) and or people(s) for

  • Their awesome documentation
  • Their awesome repository
  • Their awesome tool/software/source code
  • Their breaking reports
  • Their contributions
  • Their current work/purpose
  • Their promotion of Py-Funceble
  • Their support
  • Their testings reports

which helped and/or still help me build, test and or make PyFunceble a better tool.

 _______ _                 _          _                              _
|__   __| |               | |        | |                            | |
   | |  | |__   __ _ _ __ | | _____  | |_ ___    _   _  ___  _   _  | |
   | |  | '_ \ / _` | '_ \| |/ / __| | __/ _ \  | | | |/ _ \| | | | | |
   | |  | | | | (_| | | | |   <\__ \ | || (_) | | |_| | (_) | |_| | |_|
   |_|  |_| |_|\__,_|_| |_|_|\_\___/  \__\___/   \__, |\___/ \__,_| (_)
                                                  __/ |
                                                 |___/

Supporting the project

PyFunceble, Dead-Hosts, and all other analog projects are powered by free time and a lot of coffee!

This project helps you and/or you like it?

GitHub Sponsor

@funilrys is part of the GitHub Sponsor program!

https://github.com/PyFunceble/logo/raw/master/pyfunceble_github.png

Sponsor me!

Ko-Fi

Don’t want to use the GitHub Sponsor program ? Single donations are welcome too!

https://az743702.vo.msecnd.net/cdn/kofi3.png

Buy me a coffee!

License

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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

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.

Code of Conduct

Our Pledge

In the interest of fostering an open and welcoming environment, we as contributors and maintainers pledge to making participation in our project and our community a harassment-free experience for everyone, regardless of age, body size, disability, ethnicity, gender identity and expression, level of e xperience, nationality, personal appearance, race, religion, or sexual identity and orientation.

Our Standards

Examples of behavior that contributes to creating a positive environment i nclude:

  • Using welcoming and inclusive language
  • Being respectful of differing viewpoints and experiences
  • Gracefully accepting constructive criticism
  • Focusing on what is best for the community
  • Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

  • The use of sexualized language or imagery and unwelcome sexual attention or advances
  • Trolling, insulting/derogatory comments, and personal or political attacks
  • Public or private harassment
  • Publishing others’ private information, such as a physical or electronic address, without explicit permission
  • Other conduct which could reasonably be considered inappropriate in a professional setting

Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable behavior and are expected to take appropriate and fair corrective action in response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, or to ban temporarily or permanently any contributor for other behaviors that they deem inappropriate, threatening, offensive, or harmful.

Scope

This Code of Conduct applies both within project spaces and in public spaces when an individual is representing the project or its community. Examples of representing a project or community include using an official project e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event. Representation of a project may be further defined and clarified by project maintainers.

Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by contacting the project team at contact@funilrys.com. The project team will review and investigate all complaints, and will respond in a way that it deems appropriate to the circumstances. The project team is obligated to maintain confidentiality with regard to the reporter of an incident. Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good faith may face temporary or permanent repercussions as determined by other members of the project’s leadership.

Attribution

This Code of Conduct is adapted from the Contributor Covenant, version 1.4, available at http://contributor-covenant.org/version/1/4.

Installation

Requirements

Here is the list of requirements:

  • Python 3.8.0+
  • alembic
  • colorama
  • cryptography
  • dnspython
  • domain2idna
  • inflection
  • packaging
  • psycopg2 (optional)
  • PyMySQL
  • python-box
  • python-dotenv
  • PyYAML
  • requests
  • setuptools
  • sqlalchemy

Python 3.8.0+

The specification 3.8.0+ is because we test PyFunceble (daily) in all (3.x) versions from 3.8.0. Otherwise, more semantically, PyFunceble is written for all Python 3.8+ version.

alembic

As we want to automate database (MySQL/MariaDB) schema migration, we chose alembic for the job.

colorama

As we use some coloration, colorama is required.

cryptography

As we use some cryptography algorithm for message hashing as example, cryptography is required.

dnspython

As we use it to do the DNS lookups, dnspython is required.

domain2idna

As we propose the conversion of domains to IDNA, domain2idna is required.

Note

domain2idna is maintained and developed by Nissar Chababy (@funilrys), the developer of PyFunceble. The source code can be found on GitHub.

inflection

We don’t necessarily want to reinvent the wheel while generating the (database) tables name from our schema descriptions. This tool is a relief!

packaging

we don’t necessarily want to reinvent the wheel to compare the current with the latest (upstream) version. This module is a relief - too !

psycopg2 (optopnal)

As we propose the PostgreSQL database types, psycopg2 is required.

Warning

This is an optional dependency. If you want to work with psql, you are required to install the development headers then execute the following.

pip3 install --user pyfunceble[-dev][psql]

PyMySQL

As we propose the MariaDB or MySQL database types, PyMySQL is required.

python-box

As we use python-box for a better code access to the configuration, it is required.

python-dotenv

As we are able to load dotenv files, python-dotenv is required.

PyYAML

As our configuration file is written in .yaml, PyYAML is required.

requests

As we use requests multiple times to communicate with webservices, requests is required.

setuptools

As we use install_requires=xx inside our setup.py, setuptools is required.

sqlalchemy

As we don’t want to maintain several RAW SQL files, we use sqlalchemy for the database communication and manipulation.

Stable version

Using pip

From PyPi
$ pip3 install --user PyFunceble

Note

We recommend the --user flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.

Warning

We do not recommend the --user flag when using PyFunceble into containers or CI engines.

From GitHub
$ pip3 install --user git+https://github.com/funilrys/PyFunceble.git@master#egg=PyFunceble

Note

We recommend the --user flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.

Warning

We do not recommend the --user flag when using PyFunceble into containers or CI engines.

Using the AUR (for Arch Linux users)

The package can be found at https://aur.archlinux.org/packages/pyfunceble/.

With makepkg
$ curl https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=pyfunceble -o PKGBUILD
$ makepkg
$ sudo pacman -U pyfunceble*.tar.xz
With your favorite AUR helper

Warning

We do not recommend any AUR helper but keep in mind that some AUR helpers are “better” than other. For more information about your current (or any other) AUR helper please report to the ArchWiki page.

$ yourFavoriteAurHelper -S pyfunceble

Using docker (hub)

The image description can be found at https://hub.docker.com/r/pyfunceble/pyfunceble

$ docker pull pyfunceble/pyfunceble

Pure Python method

Execute the following and enjoy PyFunceble!

$ git clone https://github.com/funilrys/PyFunceble.git
$ cd PyFunceble
$ python3 setup.py test
$ python3 setup.py install # Avoid this if you want to uninstall or update one day.
$ pip3 install --user -e . # Prefer this method.

Note

We recommend the --user flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.

Warning

We do not recommend the --user flag when using PyFunceble into containers or CI engines.

Development version

The development version of PyFunceble represents the dev branch. It’s intended for the development of next features but is always at a usable state.

Indeed, We should not push to the dev branch until we are sure that the new commit does not break or introduce critical issue under PyFunceble.

For development

Execute the following and let’s hack PyFunceble!

Note

We highly recommend you to develop PyFunceble under a virtualenv.

$ git clone https://github.com/funilrys/PyFunceble.git
$ cd PyFunceble
$ git checkout dev
$ virtualenv -p python3 venv
$ source venv/bin/activate
$ pip3 install -e .

Note

After installing with:

$ source venv/bin/activate
$ pip3 install -e .
  • you only need to update the repository.
  • you don’t have to rerun the pip command.

For usage

Using pip

Execute one of the following and enjoy PyFunceble!

From PyPi
$ pip3 install --user PyFunceble-dev

Note

We recommend the --user flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.

Warning

We do not recommend the --user flag when using PyFunceble into containers or CI engines.

From GitHub
$ pip3 install --user git+https://github.com/funilrys/PyFunceble.git@dev#egg=PyFunceble

Note

We recommend the --user flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.

Warning

We do not recommend the --user flag when using PyFunceble into containers or CI engines.

Using the AUR (for Arch Linux users)

The package can be found at https://aur.archlinux.org/packages/pyfunceble-dev/.

With makepkg
$ curl https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=pyfunceble-dev -o PKGBUILD
$ makepkg
$ sudo pacman -U pyfunceble-dev*.tar.xz
With your favorite AUR helper

Warning

We do not recommend any AUR helper but keep in mind that some AUR helpers are “better” than other. For more information about your current (or any other) AUR helper please report to the ArchWiki page.

$ yourFavoriteAurHelper -S pyfunceble-dev
Using docker (hub)

The image description can be found at https://hub.docker.com/r/pyfunceble/pyfunceble-dev

$ docker pull pyfunceble/pyfunceble-dev
Pure Python method

Execute the following and enjoy PyFunceble!

$ git clone https://github.com/funilrys/PyFunceble.git
$ cd PyFunceble && git checkout dev
$ tox # Run tests
$ python3 setup.py install # Avoid this if you want to uninstall or update one day.
$ pip3 install --user -e . # Prefer this method.

Note

We recommend the --user flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.

Warning

We do not recommend the --user flag when using PyFunceble into containers or CI engines.

First steps

Make sure that you can run

$ PyFunceble --version

and enjoy PyFunceble!!

Update

Stable version

Using pip

From PyPi
$ pip3 install --user --upgrade PyFunceble

Note

We recommend the --user flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.

Warning

We do not recommend the --user flag when using PyFunceble into containers or CI engines.

From GitHub
$ pip3 install --user --upgrade git+https://github.com/funilrys/PyFunceble.git@master#egg=PyFunceble

Note

We recommend the --user flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.

Warning

We do not recommend the --user flag when using PyFunceble into containers or CI engines.

Using the AUR (for Arch Linux users)

With makepkg
$ curl https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=python-pyfunceble -o PKGBUILD
$ makepkg
$ sudo pacman -U python-pyfunceble*.tar.xz
With your favorite AUR helper

Warning

We do not recommend any AUR helper but keep in mind that some AUR helpers are “better” than other. For more information about your current (or any other) AUR helper please report to the ArchWiki page.

$ yourFavoriteAurHelper -Syu python-pyfunceble

Using docker (hub)

The image description can be found at https://hub.docker.com/r/pyfunceble/pyfunceble

$ docker pull pyfunceble/pyfunceble

Pure Python method

Execute the following and enjoy PyFunceble!

$ cd PyFunceble
$ git checkout master && git fetch origin && git merge origin/master
$ python3 setup.py test
$ python3 setup.py install # Avoid this if you want to uninstall one day.
$ pip3 install --user --upgrade -e . # Prefer this method.

Note

We recommend the --user flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.

Warning

We do not recommend the --user flag when using PyFunceble into containers or CI engines.

Development version

For development

$ cd PyFunceble && git checkout dev
$ git fetch origin && git merge origin/dev

Note

As you previously installed with

Only code/repository update is required.

For usage

Using pip
From PyPi
$ pip3 install --user --upgrade PyFunceble-dev

Note

We recommend the --user flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.

Warning

We do not recommend the --user flag when using PyFunceble into containers or CI engines.

From GitHub
$ pip3 install --user --upgrade git+https://github.com/funilrys/PyFunceble.git@dev#egg=PyFunceble

Note

We recommend the --user flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.

Warning

We do not recommend the --user flag when using PyFunceble into containers or CI engines.

Using the AUR (for Arch Linux users)
With makepkg
$ curl https://aur.archlinux.org/cgit/aur.git/plain/PKGBUILD?h=python-pyfunceble-dev -o PKGBUILD
$ makepkg
$ sudo pacman -U python-pyfunceble-dev*.tar.xz
With your favorite AUR helper

Warning

We do not recommend any AUR helper but keep in mind that some AUR helpers are “better” than other. For more information about your current (or any other) AUR helper please report to the ArchWiki page.

$ yourFavoriteAurHelper -Syu python-pyfunceble-dev
Using docker (hub)

The image description can be found at https://hub.docker.com/r/pyfunceble/pyfunceble-dev

$ docker pull pyfunceble/pyfunceble-dev
Pure Python method

Execute the following and enjoy PyFunceble!

$ cd PyFunceble && git checkout dev
$ git fetch origin && git merge origin/dev
$ python3 setup.py test
$ python3 setup.py install # Avoid this if you want to uninstall one day.
$ pip3 install --user --upgrade -e . # Prefer this method.

Note

We recommend the --user flag which installs the required dependencies at the user level. More information about it can be found on pip documentation.

Warning

We do not recommend the --user flag when using PyFunceble into containers or CI engines.

Important information for pyfunceble >= 4.0.0

When you upgrade PyFunceble from <4.x to any version 4.x there will be:

  • a SQL conversion if you use the --database-type mysql or mariadb.

  • a JSON to CSV conversion if one of those files is found in your filesystem:

    • inactive_db.json
    • whois_db.json
  • The conversion of both SQL and json to CSV will take a “bit” of time as, it is done in a single process mode, to avoid any hick-ups instead of loading the entire file into memory. Loading the entire *.json file into memory can have severe consequences depending on the size of the source file.

    Note

    Once the job is done the json2csv shouldn’t appear again for this or later 4.x releases.

  • A workaround for waiting on the rather slow json2csv, you can delete

    • inactive_db.json
    • whois_db.json (Very Very Very bad idea in the long run…)

    However you will probably not benefit for by deleting the whois_db.json as this is the definitive slowest lookup process in the test flow, do to the limitation in available API call you can do to WHOIS servers before getting banned. Therefore we CAN NOT recommend deleting this file, rather than waiting for the conversion to finish.

  • The output directory structure have been altered to work with the ability to test more than one source at the time. Prior to version 4.0.0.ax the output hierarchy looked like output/domains/ACTIVE/list. In Pyfunceble version >=4.x this have been altered to include the source name and append to the folder structure. From this version it will therefor looks like output/{{ input_source_name }}/domains/ACTIVE list.

Note

As consequence of the time consuming conversion, we will advise you to run a simple pyfunceble command like:

pyfunceble -d mypdns.org

pyfunceble --database-type mariadb -d mypdns.org

How long time does it take

A few numbers to help you schedule your upgrade process.

We have tested the SQL conversion with the following specifications

  • 2 Xeon CPU x86_64 (8 cores) 2 GHz
  • 48 GB ram.
  • 1 SSD Kingston KC-600
  • Mariadb 10.5, default config
  • Non dedicated
The database contains
  • Roughly 265.000 records in the test tables
  • Approximately 1.000.000 records within the pyfunceble_whois table.

This process toke about 10 hours to complete.

Important information for >= 3.2.11

When you update from dev@<=3.2.10 or master@<=3.2.2 to newer release, there will be made a SQL conversion of the databases table layout. This can take up a sagnificent amount of time based on the size of the database.

The table layout converion is being made to:

  1. Minimize the total size
  2. Optimize the sql flow and minimizing the read/write to save disk I/O.
  3. Minimize the number of SQL queries being made

It have been seen taking days to convert these tables on very large installations.

Configuration

Location

Problematics

  • How can we create a more efficient way to work with configuration?
  • How can we make the configuration file(s) available globally so that PyFunceble can be run everywhere in the user workspace?

To answer those problematics, we moved the configuration location elsewhere in the place where most users expect to have their configuration file(s).

Filename-s

At any of the listed configuration location, the following file will be read:

  • .PyFunceble.yaml
    • This file is generated automatically if missing.

    • This file is automatically replaced if you choose to merge the upstream configuration when a features key is introduced or removed.

      This “new” behavior was introduced at the same time .PyFunceble.overwrite.yaml was. This is to ensure PyFunceble at all time is running on a fully compatible version of .PyFunceble.yaml

  • .PyFunceble.overwrite.yaml
    • This is the project specific configuration file for PyFunceble. This file is now taking presedence over .PyFunceble.yaml which for sure previously was the file you used to alter for your pwn needs.
    • This file can only be maintained by a human-controlled process. PyFunceble will never write into and never owerwrite this file, once it is created.

Repository clone

If you cloned the repository and you’re trying to test from a cloned directory (the one with for example CONTRIBUTING.md) we consider the configuration directory as the current one.

Note

This behavior allows us to not modify the way we develop PyFunceble.

Travis CI

Under Travis CI, we search or initiate the configuration at the directory we are currently located.

Warning

We don’t care about the distribution, as long as the TRAVIS_BUILD_DIR environment variable is set, we search or initiate the configuration in the current directory.

Note

If you want to force the directory where we should work, you can initiate the PYFUNCEBLE_CONFIG_DIR environment variable with the path where we should work.

GitLab CI/CD

Under GitLab CI/CD, we search or initiate the configuration at the directory we are currently located.

Warning

We don’t care about the distribution, as long as the PROJECT_CI and GITLAB_CI environment variables are set, we search or initiate the configuration in the current directory.

Note

If you want to force the directory where we should work, you can initiate the PYFUNCEBLE_CONFIG_DIR environment variable with the path where we should work.

GitHub Actions

Under GitHub Actions, we search or initiate the configuration at the directory we are currently located.

Warning

We don’t care about the distribution, as long as the GITHUB_ACTIONS environment variable is set, we search or initiate the configuration in the current directory.

Note

If you want to force the directory where we should work, you can initiate the PYFUNCEBLE_CONFIG_DIR environment variable with the path where we should work.

Jenkins CI

Under Jenkins CI, we search or initiate the configuration at the directory we are currently located.

Warning

We don’t care about the distribution, as long as the JENKINS_URL and JENKINS_HOME environment variables are set, we search or initiate the configuration in the current directory.

Note

If you want to force the directory where we should work, you can initiate the PYFUNCEBLE_CONFIG_DIR environment variable with the path where we should work.

Linux and MacOS (Darwin Kernel)

Under Linux and MacOS, we look for the following directories in their order. If any configuration directory is found, the system proposes you to install them automatically on the first configuration file.

  1. ~/.config/PyFunceble
  2. ~/.PyFunceble
  3. ${PWD}

Note

If the parent directory does not exist, we move to the next possible location in the given order.

This means that under most Linux distributions and MacOS versions, we consider ~/.config/PyFunceble as the configuration location. But if the ~/.config directory does not exist, we fallback to ~/.PyFunceble as the configuration location.

Windows

As mentioned by Pat Altimore’s Blog, we used the Per user configuration files synchronized across domain joined machines via Active Directory Roaming section to understand what we should do to find our configuration directory.

Under Windows, we look for the following directories in their order. If any configuration directory is found, the system proposes you to install them automatically on the first configuration file.

  1. %APPDATA%\PyFunceble (environnement variable)
  2. %CD%

Note

%CD% is explained by the set command (set /?):

%CD% - expands to the current directory string.

Note

If the parent directory does not exist, we move to the next possible location in the given order.

This means that under most Windows versions, we consider %APPDATA%\PyFunceble - also know as C:\Users\userName\AppData\Roaming\PyFunceble- as the configuration location. But if the %APPDATA% directory does not exist, we fall back to the current directory as the configuration location.

Custom location

Sometimes, you may find yourself in a position where you absolutely do not want PyFunceble to use its default configuration location.

For that reason, if you set your desired configuration location along with the PYFUNCEBLE_CONFIG_DIR environment variable, we take that location as the (default) configuration location.

Autoconfiguration

Sometimes, you may find yourself in a position that you do not or you can’t answer the question which asks you if you would like to merge an upstream configuration file into your local one.

For that reason, if you can set the PYFUNCEBLE_AUTO_CONFIGURATION as an environment variable. Setting that environment variable will make PyFunceble merge the upstream configuration when a new key is available but not found into your configuration file.

Warning

As of 4.0.0 the configuration file is automatically copied into your configuration directory - if it is not found.

Indexes

This page will try to detail each configuration available into .PyFunceble.yaml along with the location of where we are looking for the configuration file.

share_logs

Type: boolean

Default value: False

Description: Activates or disables the logs sharing.

Warning

As the underlying API and infrastructure was not changed since 2017, I choosed to remove all source code related to logs sharing.

Please consider this as reserved for future usages.

verify_ssl_certificate

Type: boolean

Default value: False

Description: Activates or disables the verification of the SSL/TLS certificate when testing for URL.

Warning

If you set this index to True, you may get false positive result.

Indeed if the certificate is not registered to the CA or is simply invalid and the domain is still alive, you will always get INACTIVE as output.

max_http_retries

Type: integer

Default value: 3

Description: Sets the maximum number of retries for an HTTP request.

debug

Type: dict

Description: Configures the debug / logging.

debug[active]

Type: boolean

Default value: False

Description: Activate or deactivates the debug / logging.

debug[level]

Type: string

Default value: info

Available values: INFO, DEBUG, WARNING, ERROR, CRITICAL.

Description: Activate or deactivates the debug / logging.

cli_decoding

Type: dict

Description: Configures everything related to the decoding of the given input sources.

cli_decoding[adblock]

Type: boolean

Default value: False

Description: Activates or disables the adblock decoding.

Note

If this index is set to True, every time we read a given file, we try to extract the elements that are present.

We basically only decode the adblock format.

Note

If this index is set to False, every time we read a given file, we will consider one line as an element to test.

cli_decoding[adblock_aggressive]

Type: boolean

Default value: False

Description: Activates or disables disable some aggressive settings related to the adblock decoding.

Warning

This option is available but please keep in mind that the underlying source code is still experimental.

cli_decoding[rpz]

Type: boolean

Default value: False

Description: Activates or disables the decoding of RPZ policies from each given input files.

cli_decoding[wildcard]

Type: boolean

Default value: False

Description: Activates or disables the decoding of wildcards for each given input files.

cli_testing

Type: dict

Description: Configures everything related to the CLI testing.

cli_testing[hosts_ip]

Type: string

Default value: "0.0.0.0"

Description: Sets the IP to prefix each lines of the hosts file.

cli_testing[max_workers]

Type: integer

Default value: null

Description: Sets the number of maximal processes workers that we are allowed to allocate for the testing.

Warning

If set to null, we use the default value calculated from your machine ressources. Meaning:

CPU cores - 2
cli_testing[autocontinue]

Type: boolean

Default value: True

Description: Activates or disables the automatic continuation subsystem.

cli_testing[inactive_db]

Type: boolean

Default value: True

Description: Activates or disables the usage of a “database” to store all INVALID and INACTIVE subject for continuous retest.

cli_testing[whois_db]

Type: boolean

Default value: True

Description: Activates or disables the uage of a “database” to store the expiration date of all domains with a valid expiration date.

Warning

We do not recomend you to disable this. In fact, this is your safety against the rate limite imposed by most WHOIS servers.

cli_testing[cidr_expand]

Type: boolean

Default value: False

Description: Activates or disables the expansion of CIDR formatted addresses.

cli_testing[complements]

Type: boolean

Default value: False

Description: Activate or disables the generation and test of the complements of a given subject.

Note

A complement is for example example.org if www.example.org is given and vice-versa.

cli_testing[cooldown_time]

Type:: float

Default value: 0.0

Description: Sets the cooldown time to apply between each test.

cli_testing[db_type]

Type: string

Default value: csv

Available values: csv, mariadb, mysql, postgresql.

Description: Sets the database type (or engine) to use everytime we create a database or a storage of a potentially huge dataset.

cli_testing[file_filter]

Type: string

Default value: null

Description: A regular expression which we use to filter the subjects to (actually) test.

cli_testing[mining]

Type: boolean

Default value: True

Description: Activates or disables the mining subsystem.

cli_testing[local_network]

Type: boolean

Default value: False

Description: Activates or disables the consideration of the test(s) in or for a local or private network context.

cli_testing[preload_file]

Type: boolean

Default value: False

Description: Activates or disables the preloading of the given input files. When this is activates, we preload the given files into the auto continue subsystem dataset in order to optimize some of our processes regarding the auto continue.

Note

This option does not have any effect if the auto continue subsystem is disabled.

cli_testing[chancy_tester]

New in version 4.1.0b4.dev.

Type: boolean

Default value: False

Description: Activates a chancy mode that unleashes the safety workflow in place.

Warning

You shouldn’t have to use this unless you feel really lucky and trust your machine.

This mode makes things look ‘fast’, but it may produce some unexpected results if N process simultaneously write the same output file.

This mode makes the graphical CLI output unparsable - either.

MAY THE FORCE BE WITH YOU!

cli_testing[ci]

Type: dict

Description: Configures everything related to the Continuous Integration.

cli_testing[ci][active]

Type: boolean

Default value: False

Description: Activates or disables the Continuous Integration mechanism.

cli_testing[ci][commit_message]

Type: string

Default value: "PyFunceble - AutoSave"

Description: Sets the commit message to apply everytime we have to apply a commit except for the really last one.

cli_testing[ci][end_commit_message]

Type: string

Default value: "PyFunceble - Results"

Description: Sets the commit message to apply at the really end.

cli_testing[ci][max_exec_minutes]

Type: integer

Default value: 15

Description: Sets the number of minutes to wait before starting to stop a CI session.

Note

As many services are setting a rate limit per IP, it’s a good idea to set this value between 1 and 15 minute(s).

cli_testing[ci][branch]

Type: string

Default value: master

Description: Sets our git working branch. This is the branch from where we are supposed to store the tests (excepts the final results).

cli_testing[ci][distribution_branch]

Type: string

Default value: master

Description: Sets our git distributions branch. This is the branch from where we are supposed to store and push the final results.

cli_testing[ci][command]

Type: string

Default value: null

Description: Sets the command to execute before each commit (except the final one).

cli_testing[ci][end_command]

Type: string

Default value: null

Description: Sets the command to execute before the final commit.

cli_testing[display_mode]

Type: dict

Description: Configures everything related to what is displayed.

cli_testing[display_mode][dots]

Type: boolean

Default value: False

Description: Activate or disables the printing of dots or other characters when we skip the test of a subjec.

cli_testing[display_mode][dots]

Type: boolean

Default value: False

Description: Activate or disables the display of dots or other characters when we skip the test of a subjec.

cli_testing[display_mode][execution_time]

Type: boolean

Default value: False

Description: Activates or disables the display of the execution time.

cli_testing[display_mode][percentage]

Type: boolean

Default value: True

Description: Activates or disables the display and generation of the percentage - file - of each status.

cli_testing[display_mode][registrar]

Type: boolean

Default value: False

Description: Activates or disables the display and generation of the (top) registrar - file.

cli_testing[display_mode][quiet]

Type: boolean

Default value: False

Description: Activates or disables the display of output to the terminal.

Warning

If the the dots mode is activate, this option will still allow them to work.

cli_testing[display_mode][less]

Type: boolean

Default value: True

Description: Activates or disables the display of the minimal information in the table we print to stdout.

cli_testing[display_mode][all]

Type: boolean

Default value: True

Description: Activates or disables the disply of the all information in the table we print to stdout.

cli_testing[display_mode][simple]

Type: boolean

Default value: False

Description: Activates or disables the simple output mode.

Note

When this mode is active, the system will only return the result in the following format: example.org ACTIVE.

cli_testing[display_mode][status]

Type: string | list

Default value: all

Available values: all, ACTIVE, INACTIVE, INVALID, VALID, SANE, MALICIOUS

Description: Sets the status that we are allowed to print to STDOUT.

Note

A list of status can be given if you want to filter multiple status at once.

cli_testing[display_mode][colour]

Type: boolean

Default value: True

Description: Activates or disables the coloration to STDOUT.

cli_testing[display_mode][max_registrar]

Type: integer

Default value: 15

Description: Sets the maximum number of registrar to display.

Warning

This value is only used when the registrar mode is activated.

Note

This value doesn’t have any effect with the generated files.

cli_testing[testing_mode]

Type: dict

Description: Configures the testing mode to apply.

Warning

Only one of those is take in consideration.

Here is the priority / checking order:

  1. syntax
  2. reputation
  3. availability
cli_testing[testing_mode][availability]

Type: boolean

Default value: True

Description: Activates or disables the availability checker.

Note

This is the default mode.

cli_testing[testing_mode][syntax]

Type: boolean

Default value: True

Description: Activates or disables the syntax checker.

cli_testing[testing_mode][reputation]

Type: boolean

Default value: True

Description: Activates or disables the reputation checker.

cli_testing[days_between]

Type: dict

Description: Configures some days related events.

cli_testing[days_between][db_clean]

Type: integer

Default value: 28

Description: Sets the numbers of days since the introduction of a subject into the inactive dataset before it gets deleted.

Warning

As of PyFunceble 4.0.0 this is not actively implemented.

cli_testing[days_between][db_retest]

Type: integer

Default value: 28

Description: Sets the numbers of days since the introduction of a subject into the inactive dataset before it gets retested.

cli_testing[sorting_mode]

Type: dict

Description: Configures the sorting mode to apply.

Warning

Only one of those is take in consideration.

Here is the priority / checking order:

  1. hierarchical
  2. standard
cli_testing[sorting_mode][hierarchical]

Type: boolean

Default value: False

Description: Activates or disables the sorting of the files content (output) in a hierarchical order.

cli_testing[sorting_mode][standard]

Type: boolean

Default value: False

Description: Activates or disables the sorting of the files content (output) in our standard order.

cli_testing[file_generation]

Type: dict

Description: Configures everything related to the file generation.

cli_testing[file_generation][no_file]

Type: boolean

Default value: False

Description: Activates or disables the generation of any non-logs file(s).

cli_testing[file_generation][no_file]

Type: boolean

Default value: False

Description: Activates or disables the generation of any non-logs file(s).

cli_testing[file_generation][hosts]

Type: boolean

Default value: True

Description: Activates or disables the generation of the hosts file(s).

cli_testing[file_generation][plain]

Type: boolean

Default value: True

Description: Activates or disables the generation of the RAW file(s). What is meant is a list with only a list of subject (one per line).

cli_testing[file_generation][analytic]

Type: boolean

Default value: True

Description: Activates or disables the generation of the analytic file(s).

cli_testing[file_generation][unified_results]

Type: boolean

Default value: False

Description: Activates or disables the generation of the unified results file instead of the splitted one.

cli_testing[file_generation][merge_output_dirs]

Type: boolean

Default value: False

Description: Activates or disables the merging of the outputs of all inputted files inside a single subdirectory as opposed to the normal behavior.

lookup

Type: dict

Description: Configures everything related to the lookup tools to use while testing a given subject.

lookup[dns]

Type: boolean

Default value: True

Description: Activates or disables the usage of the DNS lookup whether possible.

lookup[http_status_code]

Type: boolean

Default value: True

Description: Activates or disables the usage of the HTTP status code whether possible.

lookup[netinfo]

Type: boolean

Default value: True

Description: Activates or disables the usage of the network information (or network socket) whether possible.

lookup[special]

Type: boolean

Default value: True

Description: Activates or disables the usage of our SPECIAL and extra rules whether possible.

lookup[whois]

Type: boolean

Default value: True

Description: Activates or disables the usage of the WHOIS record (or better said the expiration date in it) whether possible.

lookup[reputation]

Type: boolean

Default value: True

Description: Activates or disables the usage of the reputation dataset whether possible.

lookup[timeout]

Type: integer

Default value: 5

Description: Sets the default timeout to apply to each lookup utilities everytime it is possible to define a timeout.

lookup[collection]

Type: boolean

Default value: True

Description: Activates or disables the usage of the collection dataset whether possible.

dns

Type: dict

Description: Configures everything related to the DNS lookup.

dns[server]

Type: list

Default value: null

Description: Sets the DNS server(s) to work with.

Note

When a list is given the following format is expected.

dns_server:
  - dns1.example.org
  - dns2.example.org

Note

You can specify a port number to use to the DNS server if needed.

As example:

- 127.0.1.53:5353

Warning

Please be careful when you overwrite this option. If one is not correct, you can almost sure that all results are going to be flagged as INACTIVE.

dns[protocol]

Type: string

Default value: UDP

Available values: UDP, TCP, HTTPS, TLS.

Description: Sets the protocol to use for all DNS queries.

dns[follow_server_order]

Type: boolean

Default value: True

Description: Activates or disables the follow-up of the given order.

dns[trust_server]

Type: boolean

Default value: False

Description: Activates or disables the trust mode. When the trust mode is active and the first read DNS server gives us a negative response (without any error), we take it as it is.

Otherwise, when the trust mode is disabled, when the first read DNS server gives us a negative response (without any error), we still ask all other DNS servers that were given or found.

dns[delay]

Type: float

Default value: 0.0

Description: Sets the delay to apply between each DNS query.

proxy

New in version 4.1.0b12.dev.

Type: dict

Description: Configures everything related to the proxy settings.

proxy[global]

New in version 4.1.0b12.dev.

Type: dict

Default value: {"http": null, "https": null}

Description:

The global proxy settings to use when no rules is matching.

The proxy settings matcher works with rules, meaning that it will first try to match any of the given rules against the hostname that is being requested against. If none is matching, it will just take over proxy[global][http] and proxy[global][https].

Note

Both http and https keys are required. But, if one is missing and the other one is given, PyFunceble will take over the given one.

If you give the following - as example:

http: http://example.org:8080
https: null

The proxy settings matcher will read/use when no rules is matched:

http: http://example.org:8080
https: http://example.org:8080
proxy[rules]

New in version 4.1.0b12.dev.

Type: list

Default value: [] (None)

Description:

Sets the list of rules the proxy settings matcher has to follow.

The proxy settings matcher will first look at the rules listed under this key.

If you give the following - as example:

proxy:
  global:
    http: http://example.de:8080
    https: http://example.de:8080
  rules:
    - http: http://example.dev:8080
      https: http://example.dev:8080
      tld:
        - com
        - org
    - http: socks5h://example.org:8080
      https: socks5h://example.org:8080
      tld:
        - onion

The proxy settings matcher will:

  • use http://example.dev:8080 for any HTTP and HTTPS requests to a subject that has the com and org Top-Level-Domain (TLD).

    Example: example.com and example.org

  • use socks5h://example.org:8080 for any HTTP and HTTPS requests to a subject that has the onion Top-Level-Domain (TLD).

    Example: example.onion

    Warning

    If you explicitly want to use this feature to be able to test .onion subjects, be sure to use the socks5h instead of socks5 protocol.

    socks5h will delegate the DNS lookup to the proxy when socks5 will delegate the DNS lookup to the locally defined DNS resolver or server.

  • use http://example.de for any HTTP and HTTPS requests to any other subject that is not matching the previous rules.

user_agent

Type: dict

Description: Configures the user agent.

user_agent[browser]

Type: string

Default value: chrome

Available values: chrome, edge, firefox, ie, opera, safari.

Description: Sets the browser to get the get the latest user agent from.

Warning

This option is not taken in consideration if user_agent[custom] is not set to null.

user_agent[platform]

Type: string

Default value: linux

Available values: linux, macosx, win10

Description: Sets the platform to get the get the latest user agent for.

Warning

This option is not taken in consideration if user_agent[custom] is not set to null.

user_agent[custom]

Type: string

Default value: null

Description: Sets the user agent to use.

Warning

Setting this index will overwrite the choices made into user_agent[platform] and user_agent[browser].

http_codes

Type: dict

Description: Configures everything related to the HTTP status code and the way PyFunceble handles them.

http_codes[self_managed]

Type: bool

Default value: False

Description: Informs PyFunceble that the status code list should not be managed automatically.

http_codes[list]

Type: dict

Description: Categorizes the HTTP status codes.

http_codes[list][up]

Type: list

Default value:

- 100
- 101
- 102
- 200
- 201
- 202
- 203
- 204
- 205
- 206
- 207
- 208
- 226

Description: List the HTTP status codes which are considered as ACTIVE.

http_codes[list][potentially_down]

Type: list

Default value:

- 400
- 402
- 404
- 409
- 410
- 412
- 414
- 415
- 416
- 451

Description: List the HTTP status code which are considered as INACTIVE or POTENTIALLY_INACTIVE.

http_codes[list][potentially_up]

Type: list

Default value:

- 000
- 300
- 301
- 302
- 303
- 304
- 305
- 307
- 308
- 403
- 405
- 406
- 407
- 408
- 411
- 413
- 417
- 418
- 421
- 422
- 423
- 424
- 426
- 428
- 429
- 431
- 500
- 501
- 502
- 503
- 504
- 505
- 506
- 507
- 508
- 510
- 511

Description: List the HTTP status code which are considered as ACTIVE or POTENTIALLY_ACTIVE.

collection

Type: dict

Description: Configures everything related to the interaction with the collection API.

collection[url_base]

Type: str

Default value: http://localhost:8080

Description: Sets the base URL of the collection API.

collection[push]

Type: bool

Default value: False

Description: Activates or disables the push of the test datasets to the collection API.

Warning

This argument is useless if the PYFUNCEBLE_COLLECTION_API environment variable is not defined.

collection[preferred_status_origin]

Type: str

Default value: frequent

Available values: frequent, latest , recommended

Description: Sets the preferred status origin when fetching data from the collection

Usage

PyFunceble Python API

If you are working with a python script, module or even class, you can integrate PyFunceble to your main logic by importing it and using its API (cf: API Documentation).

This section will present some example of the way you can interact with PyFunceble from anything written in Python.

Check the availability of a domain

from PyFunceble import DomainAvailabilityChecker


checker = DomainAvailabilityChecker()
to_test = "github.com"

# You can do it this way.
status = checker.set_subject(to_test).get_status()

# Or this way.
checker.set_subject(to_test)
status = checker.get_status()

# We can convert the status to json.
status_json = status.to_json()

# We can convert the status to dict.
status_dict = status.to_dict()

# We can ask "questions".
print(f"Is {to_test} ACTIVE ?", status.is_active())
print(f"Is {to_test} INACTIVE ?", status.is_inactive())
print(f"Is {to_test} INVALID ?", status.is_invalid())

Check the availability of an IP

from PyFunceble import IPAvailabilityChecker


checker = IPAvailabilityChecker()

to_test = "192.0.2.1"

# You can do it this way.
status = checker.set_subject(to_test).get_status()

# Or this way.
checker.set_subject(to_test)
status = checker.get_status()

# We can convert the status to json.
status_json = status.to_json()

# We can convert the status to dict.
status_dict = status.to_dict()

# We can ask "questions".
print(f"Is {to_test} ACTIVE ?", status.is_active())
print(f"Is {to_test} INACTIVE ?", status.is_inactive())
print(f"Is {to_test} INVALID ?", status.is_invalid())

Check the availability of an IP or domain

from PyFunceble import DomainAndIPAvailabilityChecker


checker = DomainAndIPAvailabilityChecker()

to_test = "github.com"

# You can do it this way.
status = checker.set_subject(to_test).get_status()

# Or this way.
checker.set_subject(to_test)
status = checker.get_status()

# We can convert the status to json.
status_json = status.to_json()

# We can convert the status to dict.
status_dict = status.to_dict()

# We can ask "questions".
print(f"Is {to_test} ACTIVE ?", status.is_active())
print(f"Is {to_test} INACTIVE ?", status.is_inactive())
print(f"Is {to_test} INVALID ?", status.is_invalid())

Check the availability of URL

from PyFunceble import URLAvailabilityChecker


checker = URLAvailabilityChecker()

to_test = "http://github.com/PyFunceble"

# You can do it this way.
status = checker.set_subject(to_test).get_status()

# Or this way.
checker.set_subject(to_test)
status = checker.get_status()

# We can convert the status to json.
status_json = status.to_json()

# We can convert the status to dict.
status_dict = status.to_dict()

# We can ask "questions".
print(f"Is {to_test} ACTIVE ?", status.is_active())
print(f"Is {to_test} INACTIVE ?", status.is_inactive())
print(f"Is {to_test} INVALID ?", status.is_invalid())

Check the syntax of domains

from PyFunceble import DomainSyntaxChecker


checker = DomainSyntaxChecker()

to_test = "github.com"

# You can do it this way.
status = checker.set_subject(to_test).get_status()

# Or this way.
checker.set_subject(to_test)
status = checker.get_status()

# We can convert the status to json.
status_json = status.to_json()

# We can convert the status to dict.
status_dict = status.to_dict()

# We can ask "questions".
print(f"Is {to_test} VALID ?", status.is_valid())
print(f"Is {to_test} INVALID ?", status.is_invalid())

Check the syntax of IP (v4 or v6)

from PyFunceble import IPSyntaxChecker


checker = IPSyntaxChecker()

to_test = "192.0.2.1"

# You can do it this way.
status = checker.set_subject(to_test).get_status()

# Or this way.
checker.set_subject(to_test)
status = checker.get_status()

# We can convert the status to json.
status_json = status.to_json()

# We can convert the status to dict.
status_dict = status.to_dict()

# We can ask "questions".
print(f"Is {to_test} VALID ?", status.is_valid())
print(f"Is {to_test} INVALID ?", status.is_invalid())

Check the syntax of URLs

from PyFunceble import URLSyntaxChecker


checker = URLSyntaxChecker()

to_test = "https://github.com/PyFunceble"

# You can do it this way.
status = checker.set_subject(to_test).get_status()

# Or this way.
checker.set_subject(to_test)
status = checker.get_status()

# We can convert the status to json.
status_json = status.to_json()

# We can convert the status to dict.
status_dict = status.to_dict()

# We can ask "questions".
print(f"Is {to_test} VALID ?", status.is_valid())
print(f"Is {to_test} INVALID ?", status.is_invalid())

From a terminal

This chapter also relates to writing scripts in bash and PowerShell as the uses the same syntaxes.

--show-completion "shell"

Show shell completion script and exit.

Available Values: bash, zsh

Note

This argument provides the autocompletion script that you can use to get access to the autocompletion assistance.

It is meant to be used like this:

$ source <(pyfunceble --show-completion bash)
$ pyfunceble --do[TAB]
--domain  --dots

--help

Show the help message and exit.


-v | --version

Show the version of PyFunceble and exit.


Test sources

-d "$DOMAIN" | --domain "$DOMAIN"

This argument takes one or more values separated by spaces.

Test one or more :code:`$DOMAIN`s,

$ PyFunceble -d example.org example.net

A domain is defined as it do NOT start with a protocol:// and it do not contain a forward slash /

This is a domain: example.org

Note

When this option is used, no output files are generated.


-u "$URI" | --url "$URI"

Test one or more full URL, separated by spaces.

This argument takes one or more values.

$ PyFunceble --url https://example.org/AlIvE https://example.com/GoNe

Note

When we test the availability of a URL, we (only) check the HTTP status code of the given URL.

A URI or URL is defined by it is starting with a protocol.

This is a URL http://example.org/?example=yes

This is another URL https://example.org

This is another URL ftp://ftp.example.org


-f "$DOMAIN" | --file "$DOMAIN_FILE"

Read a local or remote (RAW link) file and test all domains inside it. If remote (RAW link) file is given, PyFunceble will download it, and test the content of the given RAW link as if it was a locally stored file.

$ PyFunceble -f "$DOMAIN"_1 "$DOMAIN"_2
$ PyFunceble -f "$DOMAIN_FILE"_1 "$DOMAIN_FILE"_2
$ PyFunceble --file "$DOMAIN_FILE"_1 "$DOMAIN_FILE"_2

Note

  • This argument takes one or more space separated values.
  • You can combine -f and -uf in the same test.

Warning

You can not combine the usage of -f, -uf with --adblock at the same time


-uf "$URL_FILES" | --url-file "$URL_FILES"

Read a local or remote (RAW link) file and test all (full) URLs inside it. If remote (RAW link) file is given, PyFunceble will download it, and test the content of the given RAW link as if it was a locally stored file.

This argument test if a URL which is inside the given file is available. It ONLY tests full URLs.

$ PyFunceble -uf "$URI"_1 "$URI"_2

When a remote located source is provided, we will download the given URL and test its content assuming that each line represents a URL to test.

$ PyFunceble -uf "$URL_FILES"

Note

  • This argument takes one or more space separated values.
  • You can combine -f and -uf in the same test.
  • We consider one line as one URL to test.

Warning

A test with this argument consists of the comparison of the status code. No WHOIS record will be requested nor DNS Lookup will be done.

You can not combine the usage of -f, -uf and --adblock at the same time


Source filtering, decoding, conversion and expansion

--adblock

This feature is used to extract all domains, IPv4 and IPv6 addresses from a adblock formatted file and test the status and validate the extracted domains.

To use this feature you’ll need to set the -f "$DOMAIN" | --file "$DOMAIN_FILE" to tell PyFunceble from where to obtain the given list.

$ PyFunceble --adblock -f "$ADBLOCK_FILES"

Default value: adblock: False

Warning

You can not combine the usage of -f, -uf and --adblock at the same time


--cidr

This feature will expand CIDR formatted addresses.

Default value: cidr_expand: False


--complements

A complement is for example example.org if www.example.org is given and vice-versa.

Default value: complements: False


--filter "RegEx"

A Regex string to match in order to test a given line.

Default value: file_filter: null

If you only want to test all blogspot URI or domains from your list, this argument allows you to do that!

$ PyFunceble --filter '^\.blogspot\.(com|net)$' -f $DOMAIN_FILE

--mining

Todo

Find out more about how this actually works…

Want to find domain or URL linked to a domain in your list? This argument will exactly do that.

Default value: mining: False


--rpz

New in version 3.3.3.

Activates or disables the decoding of RPZ policies from each given input source (-f).

$ PyFunceble --rpz -f $RPZ_FILES

The --rpz is used to test domains from a fully functional and valid RPZ (Response Policy Zone). If you do provide the required zone SOA record it will extract the right domains to test.

Example of a fully functional RPZ zone

spyware.my-rpz.internal.   86400   IN      SOA     my.awesome.rps.zone. need.to.know.only. 2021011401 300 60 604800 3600
*.360.com.spyware.my-rpz.internal. 86400   IN      CNAME   .
*.360safe.com.cn.spyware.my-rpz.internal.  86400   IN      CNAME   .
*.360totalsecurity.com.spyware.my-rpz.internal.    86400   IN      CNAME   .
360.com.spyware.mypdns.cloud.   86400   IN      CNAME   .
360safe.com.cn.spyware.mypdns.cloud.    86400   IN      CNAME   .
360totalsecurity.com.spyware.mypdns.cloud.      86400   IN      CNAME   .

(PS. RPZ zones does not requires the NS records RFC 1034)

From the example above PyFunceble will be testing the following domains.

You can make a simple test with the above zone example by copy/pasting.

In case your RPZ zone are missing the required SOA entry, you should consider combining the --rpz with –wildcard to avoid all your wildcard’s domain becoming marked as INVALID

Default value: rpz: False

Warning

You can currently not use the --rpz in combination with --syntax to validate or syntax test a rpz formatted file.

See also

See discussions 149 for more information and participate in it’s development.


--wildcard

New in version 3.3.0.

The flag to use when your source(-f) of domains starts with a wildcard.

This flag will subtract the *.$DOMAIN and test the $DOMAIN according to the test arguments given.

Default value: wildcard: False

As examples of when to use this argument. The first one will return INVALID if --wildcard is not set to true.

This feature is related to the –rpz

'*.example.org'
'example.org'

Test control

--chancy

New in version 4.1.0b4.dev.

Activates a chancy mode that unleashes the safety workflow in place.

Default value: chancy_tester: False

Warning

You shouldn’t have to use this unless you feel really lucky and trust your machine.

This mode makes things look ‘fast’, but it may produce some unexpected results if N process simultaneously write the same output file.

This mode makes the graphical CLI output unparsable - either.

MAY THE FORCE BE WITH YOU!


--cooldown-time

Sets a cooldown time (in second) to be applied between (sleep) before/between each test cycles is done.

Default value: cooldown_time: 0.0


--local

Activates or disables the consideration of the test(s) in or for a local or private network context.

This option is to include testing ability of records only availeble for local and private network. This argument will enable this functionality by removing the usual limitation which do not apply to intranets.

Default value: local_network: False


--collection-preferred-origin

New in version 4.0.0.

Sets the preferred status origin.

Default value: collection.preferred_status_origin: frequent

Available values: frequent, latest, recommended


--collection-lookup

New in version 4.0.0.

Activates or disables the usage of the collection lookup whether possible.

Default value: lookup.collection: False

Want to take advantage of the collection API ? This argument is for you.


--collection-lookup-only

New in version 4.1.0b10.

Activates or disables the exclusive usage of the collection lookup as test method.


--dns-lookup

Activates or disables the usage of the DNS lookup whether possible.

Default value: dns: True

Don’t want to perform some DNS lookup? This argument is for you.


--dns-lookup-only

New in version 4.1.0b10.

Activates or disables the exclusive usage of the DNS lookup as test method.


--http-status-code-lookup | --http

Don’t want to take the result of the HTTP code execution into consideration?

This argument allows you to disable the HTTP status code checker!

Default value: http_status_code: True


--http-status-code-lookup-only

New in version 4.1.0b10.

Activates or disables the exclusive usage of the HTTP Status code lookup as test method.


--netinfo-lookup

Activates or disables the usage of the network information (or network socket) whether possible.

Don’t want to perform some netinfo lookup ? This argument is for you.

Default value: netinfo: True


--netinfo-lookup-only

New in version 4.1.0b10.

Activates or disables the exclusive usage of the NETINFO lookup as test method.


--special-lookup

Activates or disables the usage of our SPECIAL and extra rules whether possible.

Don’t want to use/apply the Special Rules - which are explained in the source column section?

This argument disables them all.

Default value: special: True


--special-lookup-only

New in version 4.1.0b10.

Activates or disables the exclusive usage of the SPECIAL lookup as test method.


--whois-lookup

New in version 4.0.0.

Activates or disables the usage of the WHOIS record (or better said the expiration date in it) when possible.

Don’t want to use or take the whois date into consideration? This argument allows you to disable it!

Default value: whois: True

Note

When you use the --syntax no WHOIS data lookup will be performed In other words: --syntax overrules this argument


--whois-lookup-only

New in version 4.1.0b10.

Activates or disables the exclusive usage of the WHOIS lookup as test method.


--reputation-lookup

Todo

Check which of the reputation is alive or the code difference

Want to take the reputation data into consideration?

Activates or disables the usage of the reputation dataset when possible.

Default value: reputation: False


--reputation-lookup-only

New in version 4.1.0b10.

Activates or disables the exclusive usage of the Reputation lookup as test method.


--reputation

Activates or disables the reputation checker.

Default value: False


--syntax

This code is to check the syntax of domains when the -f and URI’s when –url is used as source.

You should be able to use both -f and code:-uf` at the same time with --syntax

When you are using this flags there will not be performed any other test, such as the WHOIS or HTTP status code

Default value: syntax: False

Note

TIP: If you would like to gain some serious performance while testing with --syntax, We recommend you disable –auto-continue

See note for --rpz


-t "seconds" | --timeout "seconds"

Sets the default timeout to apply to each lookup utilities every time it is possible to define a timeout.

Default value: timeout: 5 seconds


New in version 4.0.3b1.dev.

--max-http-retries "number"

Sets the maximum number of retries for an HTTP request.

Default value: max_http_retries: 3


-ua "full string" | --user-agent "full string"

User defined user agent to use in the http status code lookup.

user_agent:
    browser: chrome
    platform: linux

Warning

If not given, we try to get the latest (automatically) for you

Example of how to change the default from CLI.

$ PyFunceble --user-agent "Mozilla/5.0 (X11; U; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/83.0.4103.97 Safari/537.36"

-vsc | --verify-ssl-certificate

Activates or disables the verification of the SSL/TLS certificate when testing for URL.

Default value: verify_ssl_certificate: False

Warning

If you activate the verification of the SSL/TLS certificate, you may get false-positive results.

Indeed if the certificate is not registered to the CA or is simply invalid and the domain is still alive, you will always get INACTIVE as output.


DNS control

--dns

By default, PyFunceble will use the system-wide DNS settings. This can be changed with the ability to configure which DNS-Servers you like PyFunceble to use during the test.

You set this up with the CLI command --dns or insert it into your personal .PyFunceble.yaml

You can add several separated by spaces and they will all be used in a order. (Kind of Round Robin style)

Default value: Follow OS DNS ==> server: null

$ PyFunceble --dns 127.0.1.53:5303 127.0.0.1 -f $DOMAIN_FILE

You can also set default DNS servers used for testing within the my_project/.PyFunceble.yaml file. (No secondary indent)

server:
- 1.2.3.4
- 5.6.7.8
- 9.10.11.12:5302

Warning

We expect a DNS server(s). If you add this flag but no DNS server(s) is given. You’ll almost for certain get all results as INACTIVE

This could happen in case you use --dns -f

Note

You can specify the port number to be used on the DNS server if needed.

If you provide an IPv6, we are expecting the [ip]:port format.


--dns-protocol

Sets the protocol to use for the DNS queries.

Default value: protocol: UDP

Available values: UDP, TCP, HTTPS, TLS. Case-Sensitive

$ PyFunceble --dns doh.powerdns.org --dns-protocol HTTPS -f $DOMAIN_FILE
$ PyFunceble --dns 192.0.2.2:53 --dns doh.powerdns.org --dns-protocol HTTPS

--follow-server-order

New in version 4.0.0.

Let us follow or mix the order of usage of the given or found DNS server(s).

Default value: True


--trust-dns-server

New in version 4.0.0.

Activates or disable the trust mode.

Default value: False

Note

When active, when the first read DNS server give us a negative response - without error - we take it as it it.

Otherwise, if not active, when the first read DNS server give us a negative response - without error - we still consolidate by checking all given/found server.


--dns-delay

New in version 4.1.0b12.dev.

Sets the delay to apply between each DNS query.

Default value: 0.0

Note

When greater that 0.0, a delay will be applied between each DNS query.

Otherwise, if equal to 0.0, no delay will be applied.


Proxy control

--http-proxy

New in version 4.1.0b12.dev.

By default, PyFunceble will use the environment-wide Proxy Settings. This can be changed with the ability to configure which Proxy Server you like PyFunceble to use during the test of subject.

You can set this up with the CLI command --http-proxy or insert it into your personal .PyFunceble.overwrite.yaml

Default value: Follow HTTP_PROXY variable

$ PyFunceble --http-proxy http://127.0.0.1:9899 -f $DOMAIN_FILE

You can also set default DNS servers used for testing within the my_project/.PyFunceble.yaml file. (No secondary indent)

global:
    http: http://127.0.0.1:9899

Warning

We expect a Proxy Server. If you add this flag but no valid Proxy Server is given. You’ll almost for certain get all results as INACTIVE


--https-proxy

New in version 4.1.0b12.dev.

By default, PyFunceble will use the environment-wide Proxy Settings. This can be changed with the ability to configure which Proxy Server you like PyFunceble to use during the test of subject.

You can set this up with the CLI command --https-proxy or insert it into your personal .PyFunceble.overwrite.yaml

Default value: Follow HTTPS_PROXY variable

$ PyFunceble --https-proxy http://127.0.0.1:9899 -f $DOMAIN_FILE

You can also set default DNS servers used for testing within the my_project/.PyFunceble.yaml file. (No secondary indent)

global:
    https: http://127.0.0.1:9899

Warning

We expect a Proxy Server. If you add this flag but no valid Proxy Server is given. You’ll almost for certain get all results as INACTIVE


Databases

--inactive-database

Switch the value of the usage of a database to store inactive domains of the currently tested list.

Default value: db_clean: 28 Day(s).

This argument will disable or enable the usage of a database which saves all INACTIVE and INVALID domain of the given file over time.


--database-type

Sets the database engine to use.

Default value: db_type: csv

Available values: csv, mariadb, mysql, postgresql.


--inactive-db

Activates or disables the usage of a ‘database’ to store all ‘INACTIVE’ and ‘INVALID’ subject for continuous retest.

Configured value: inactive_db: True


-dbr "time" | --days-between-db-retest "time"

Sets the numbers of days since the introduction of a subject into the inactive dataset before it gets retested.

Default value: db_retest: 1 Day(s)

Note

This argument is only used if -db or inactive_database : true (under .PyFunceble.yaml) are activated. See also –inactive-db


-wdb | --whois-database

Activates or disables the usage of a “database” to store the expiration date of all domains with a valid expiration date.

Default value: whois_db: True


Output control

-a | --all

Activates or disables the display of the all information in the table we print to stdout (screen).

Default value: all: False

Default:

Domain                        Status      Source
----------------------------- ----------- ----------
pyfunceble.readthedocs.io     ACTIVE      SYNTAX

When :code:`all: True`:

Domain                        Status      Expiration Date   Source     HTTP Code  Checker
----------------------------- ----------- ----------------- ---------- ---------- -------------
pyfunceble.readthedocs.io     ACTIVE      Unknown           NSLOOKUP   302        AVAILABILITY

--color | --colour

Activates or disables the coloration to STDOUT.

Default value: colour: True

Don’t want any colour ? This argument is for you!


--display-status

New in version 4.0.0.

Sets the status that we are allowed to print to stdout.

Multiple space separated statuses can be given.

Default value: status: all

Available values: all, ACTIVE, INACTIVE, INVALID, VALID, SANE, MALICIOUS

Default response

$ PyFunceble -d google-analytics.com duckduckgo.com --whois-lookup

Subject                                              Status      Source
---------------------------------------------------- ----------- ----------
duckduckgo.com                                       ACTIVE      DNSLOOKUP
google-analytics.com                                 INACTIVE    STDLOOKUP

Show only active and inactive

$ PyFunceble -d google-analytics.com duckduckgo.com --whois-lookup \
--display-status INACTIVE ACTIVE

Subject                                              Status      Source
---------------------------------------------------- ----------- ----------
duckduckgo.com                                       ACTIVE      DNSLOOKUP
google-analytics.com                                 INACTIVE    STDLOOKUP

Show only inactive

$ PyFunceble -d google-analytics.com duckduckgo.com --whois-lookup \
  --display-status INACTIVE

Subject                                              Status      Source
---------------------------------------------------- ----------- ----------
google-analytics.com                                 INACTIVE    STDLOOKUP

Note

If you have provided more than one $DOMAIN_FILE as input source, then the printed status will be in same order as your $DOMAIN_FILE was given in the input.

For an example you can visit: github


-ex | --execution

Want to know the execution time of your test? Well, this argument will let you know!

Default value: execution_time: False


--hierarchical

Activates or disables the sorting of the files content (output) in a hierarchical order.

Default value: hierarchical: False

This argument will output the result listed in a hierarchical order.


-h | --hosts

This argument will let the system know if it want to generate a hosts formatted result file for each status.

Default value: hosts: True

See also

–plain, –no-files

Note

There is an ongoing request to set the default value of hosts: False You should be following this issue as it might affect your setup/results later on. Flip defaults for host


-ip "ip-address" | --hosts-ip “ip-address”

Sets the IP to prefix each lines of the hosts file.

Default value: 0.0.0.0


--logging-level

New in version 4.0.0.

You can configure the logging level to be outputted in STDOUT (screen) when you uses --no-files. Default outputs to output/__pyfunceble_loggging__/*.log

Please notice this is a separated folder at the same lever as your tested sources.

├── /tmp/pyfunceble/output/__pyfunceble_loggging__/
├── /tmp/pyfunceble/output/my-blacklist/

Optional values. (From less to more information)

  • --logging-level critical ==> CRITICAL
  • --logging-level error ==> ERROR
  • --logging-level info ==> INFO (default)
  • --logging-level warning ==> WARNING
  • --logging-level debug ==> DEBUG

--merge-output

Activates or disables the merging of the outputs of all inputted files inside a single subdirectory as opposed to the normal behavior.

Default value: merge_output_dirs: False


--no-files

Activates or disables the generation of any non-logs and status file(s).

Default value: no_file: False


--output-location

New in version 4.0.0.

This is used to direct the output location and matches PYFUNCEBLE_OUTPUT_LOCATION.

With this new option you no longer need to add the Global Variable but can append it directly to the CLI string.

$ PyFunceble --output-location /tmp/pyfunceble -f $DOMAIN_FILE

--unified-results

Activates or disables the generation of the unified results file instead of the divided output in individual subfolder under output/.

Default value: unified_results: False

This argument disables the generation of the result.txt file.


--percentage

Activates or disables the display and generation of the percentage - file - of each status.

Default value: percentage: True

This argument will disable or enable the generation of the percentage of each status.


--registrar

New in version 4.1.0b1.dev.

Activates or disables the display and generation of the (top) registrar stats - file.

Default value: registrar: False


--max-registrar

New in version 4.1.0b1.dev.

Sets the maximum number of registrar to display.

Default value: max_registrar: 15

Note

This option does not take effect on the generated file.


--plain

Activates or disables the generation of the generation of clean file(s).

This will output a file per status only containing the subject(s). (One record per line)

Default value: plain: True


--dots

CLI only: Activate or disables the display of dots or other characters when we skip the test of a subject.

CI only: If you combine the --ci --dots we display a dot for each record we tests.

Default value: dots: False


-q | --quiet

Activates or disables the display of output to the terminal.

Default value: quiet: False


--push-collection

New in version 4.0.0.

Activates or disables the push of the test results into the collection API.

Default value: collection.push: False

Want to take submit data into the collection API ? This argument is for you.

Warning

This argument is useless if the PYFUNCEBLE_COLLECTION_API environment variable is not defined.


--share-logs

Want to help make PyFunceble a better tool?

Then you can share your logs with our backend API which collect all logs!

Default value: share_logs: False

Changed in version 4.0.0.


-s | --simple

Activates or disables the simple output mode.

Default value: simple: False

Want as less as possible data on screen? This argument returns as less as possible on screen!


Multiprocessing

-w | --max-workers

New in version 4.0.0.

Sets the number of maximal worker to use.

Keep in mind that the --max-workers mostly - if not only - affects the number of tester sub-processes. Because we want to safely write the files, we still need a single process which read the submitted results and generate the outputs.

The reason we added this to PyFunceble 4.0.0 is we don’t want to have a wrongly formatted output file.

If you have more than 2 CPU cores/processes the default will be number of CPU - 2. Otherwise, it will 1.

Default value: max_workers: null

Note

If you have a CPU with 4 cores or Threads (depends on it’s age) Then the number of workers will be 4 - 2 = 2 workers

Warning

This section about max-workers is still under construction, but it is close to how it is working.

  • This means you should be experimenting a bit your self.

To follow the “behind the scene” talk about the subject, please take a look at issue


CI / CD

--ci

Activates or disables the Continuous Integration mechanism.

Default value: active: False

Note

If you combine this argument with the --quiet argument, the test will output a dotted line, where each dot (.) represent one test result or input which was skipped because it was previously tested.

Want to use PyFunceble under a supported CI infrastructure/network? This argument is suited for your needs!


--ci-max-minutes

Sets the number of minutes to wait before starting to stop a CI session.

Default value: max_exec_minutes: 15


--ci-branch

Sets our git working branch. This is the branch from where we are supposed to store the tests (excepts the final results).

Default value: branch: master

Note

Currently the branch need to exist, but there are being worked on a path to have PyFunceble to create the sub-branch and finally merge it into the --ci-distribution-branch


--ci-distribution-branch

Sets our git distributions branch. This is the branch from where we are supposed to store and push the final results.

Default value: distribution_branch: master

Note

The difference between this and --ci-branch is the fact that this branch will get the (final) result only when the test is finished under the given --ci-branch.

As an example, this allows us to have 2 branches:

--ci-branch processing # (CI branch), for the tests with PyFunceble.
--ci-distribution-branch master # (CI distribution branch), for the
                                # distribution of the results of PyFunceble.

--ci-command "something"

Changed in version 4.0.0.

Sets the command to execute before each commit (except the final one).

Default value: command: null

Note

In this example, something should be a script or a program which have to be executed when we reached the end of the given file.

Note

This argument is only used if --ci or ci: true (under .PyFunceble.yaml) are activated.


--ci-end-command "something"

Changed in version 4.0.0.

Sets the command to execute before the final commit.

Default value: end_command: null

Note

In this example, something should be a script or a program which have to be executed when we reached the end of the given file.

Note

This argument is only used if --ci or ci: true (under .PyFunceble.yaml) are activated.


--ci-commit-message "message"

Changed in version 4.0.0.

Sets the commit message to apply every time we have to apply a commit except for the really last one.

Default value: commit_message: "PyFunceble - AutoSave"

This argument allows us to set a custom commit message which is going to be used as a commit message when saving.

Note

This argument is only used if --ci or ci: true (under .PyFunceble.yaml) are used.

Note

This argument is only used if we have to split the work into multiple processes because a list is too long or the timeout is reached.

Warning

Please avoid the usage of [ci skip] here.


--ci-end-commit-message

Changed in version 4.0.0.

Sets the commit message to apply at the really end.

Default value: end_commit_message: "PyFunceble - Results"

Note

This argument is only used if --ci or ci: true (under .PyFunceble.yaml) are used.

Note

This argument is only used if we reached the end of the list we are or have to test.


-c | --auto-continue | --continue

This argument is to used for auto-continuing from a previously under CI

Default value: autocontinue: False

This argument activates or deactivates the auto-continue subsystem. Indeed, as we can automatically continue if the script has been stopped, this switch allows us to disable or enable the usage of that specific subsystem.


--preload

New in version 4.0.0.

Activates or disables the preloading of the input file(s) into the continue dataset before starting the tests.

The –preload argument - or its option counterpart - ping is given, we decode and load the given input files into the continue dataset before starting the test.

This reduces the waiting time while continuing a previous session.

Note

This argument is useless unless the auto continue subsystem is active.

The preloading may take some time depending of the size of the file to test, but this is the price for a smooth and better autocontinue. Especially under CI’s.


Global Variables

Here is the list of environment variables we use and how we use them if they are set.

Note

If used in a script like bash or a terminal directly you have to use the export as PyFunceble is running as sub-processes

Environment Variable How to use them?
PYFUNCEBLE_AUTO_CONFIGURATION Tell us if we have to install/update the configuration file automatically.
PYFUNCEBLE_COLLECTION_API_TOKEN Sets the API token to use when pushing data into the collection API.
PYFUNCEBLE_CONFIG_DIR Tell us the location of the directory to use as the configuration directory.
PYFUNCEBLE_DB_CHARSET Tell us the MariaDB charset to use.
PYFUNCEBLE_DB_HOST Tell us the host or the Unix socket (absolute file path) of the MariaDB database.
PYFUNCEBLE_DB_NAME Tell us the name of the MariaDB database to use.
PYFUNCEBLE_DB_PASSWORD Tell us the MariaDB user password to use.
PYFUNCEBLE_DB_PORT Tell us the MariaDB connection port to use.
PYFUNCEBLE_DB_USERNAME Tell us the MariaDB user-name to use.
PYFUNCEBLE_DEBUG Tell us to log everything into the output/logs/*.log files.
PYFUNCEBLE_DEBUG_LVL Sets the logging level to use. --logging-level
PYFUNCEBLE_DEBUG_ON_SCREEN Tell us to log everything to stdout bool (true | false)
PYFUNCEBLE_LOGGING_LVL Same as PYFUNCEBLE_DEBUG_LVL. --logging-level
PYFUNCEBLE_OUTPUT_LOCATION Tell us where we should generate the output/ directory.
APPDATA Used under Windows to construct/get the configuration directory if PYFUNCEBLE_CONFIG_DIR is not found.
GH_TOKEN Tell us the GitHub token to set into the repository configuration when using PyFunceble under Travis CI.
GL_TOKEN Tell us the GitLab token to set into the repository configuration when using PyFunceble under GitLab CI/CD.
GIT_EMAIL Tell us the git.email configuration to set when using PyFunceble under any supported CI environment.
GIT_NAME Tell us the git.name configuration to set when using PyFunceble under any supported CI environment.
TRAVIS_BUILD_DIR Used to confirm that we are running under a Travis CI container.
GITLAB_CI Used to confirm that we are running under a GitLab CI/CD environment.
GITLAB_USER_ID Used to confirm that we are running under a GitLab CI/CD environment.

Global overview

usage: pyfunceble [--show-completion {bash,zsh,tcsh}]
                [-d DOMAINS [DOMAINS ...]] [-u URLS [URLS ...]]
                [-f FILES [FILES ...]] [-uf URL_FILES [URL_FILES ...]]
                [--adblock] [--cidr] [--complements] [--preload]
                [--filter CLI_TESTING__FILE_FILTER] [--mining] [--rpz]
                [--wildcard] [--chancy] [-c]
                [--cooldown-time CLI_TESTING__COOLDOWN_TIME] [--local]
                [--collection-preferred-origin {frequent,latest,recommended}]
                [--collection-lookup] [--collection-lookup-only]
                [--dns-lookup] [--dns-lookup-only] [--http] [--http-only]
                [--netinfo-lookup] [--netinfo-lookup-only]
                [--special-lookup] [--special-lookup-only] [--whois-lookup]
                [--whois-lookup-only] [--reputation-lookup]
                [--reputation-lookup-only] [--reputation] [--syntax]
                [-t LOOKUP__TIMEOUT] [--max-http-retries MAX_HTTP_RETRIES]
                [-ua USER_AGENT__CUSTOM] [-vsc]
                [--dns DNS__SERVER [DNS__SERVER ...]]
                [--dns-protocol {UDP,TCP,HTTPS,TLS}] [--follow-server-order]
                [--trust-dns-server] [--dns-delay DNS__DELAY]
                [--http-proxy PROXY__GLOBAL__HTTP]
                [--https-proxy PROXY__GLOBAL__HTTPS] [--inactive-db]
                [--database-type {csv,mariadb,mysql}]
                [-dbr CLI_TESTING__DAYS_BETWEEN__DB_RETEST] [-wdb] [-a]
                [-ex] [--colour]
                [--display-status {all,ACTIVE,INACTIVE,VALID,INVALID,MALICIOUS,SANE} [{all,ACTIVE,INACTIVE,VALID,INVALID,MALICIOUS,SANE} ...]]
                [--dots] [--hierarchical] [-h] [-ip CLI_TESTING__HOSTS_IP]
                [--merge-output] [--no-files]
                [--output-location OUTPUT_LOCATION] [--unified-results]
                [--percentage] [--registrar]
                [--max-registrar CLI_TESTING__DISPLAY_MODE__MAX_REGISTRAR]
                [--plain] [-q] [--push-collection] [-s]
                [-w CLI_TESTING__MAX_WORKERS]
                [--ci-max-minutes CLI_TESTING__CI__MAX_EXEC_MINUTES] [--ci]
                [--ci-branch CLI_TESTING__CI__BRANCH]
                [--ci-distribution-branch CLI_TESTING__CI__DISTRIBUTION_BRANCH]
                [--ci-command CLI_TESTING__CI__COMMAND]
                [--ci-end-command CLI_TESTING__CI__END_COMMAND]
                [--ci-commit-message CLI_TESTING__CI__COMMIT_MESSAGE]
                [--ci-end-commit-message CLI_TESTING__CI__END_COMMIT_MESSAGE]
                [--help] [-v]

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

options:
    --show-completion {bash,zsh,tcsh}
                            Show Shell completion script and exit.
    --help                Show this help message and exit.
    -v, --version         Show the version of PyFunceble and exit.

Test sources:
    -d DOMAINS [DOMAINS ...], --domain DOMAINS [DOMAINS ...]
                            Test one or more domains, separated by spaces.

                            When this option is used, no output files are generated.
    -u URLS [URLS ...], --url URLS [URLS ...]
                            Test one or more full URL, separated by spaces.
    -f FILES [FILES ...], --file FILES [FILES ...]
                            Read a local or remote (RAW link) file and test all domains inside it.
                            If remote (RAW link) file is given, PyFunceble will download it,
                            and test the content of the given RAW link as if it was a locally stored file.
    -uf URL_FILES [URL_FILES ...], --url-file URL_FILES [URL_FILES ...]
                            Read a local or remote (RAW link) file and test all (full) URLs inside it.
                            If remote (RAW link) file is given, PyFunceble will download it,
                            and test the content of the given RAW link as if it was a locally stored file.

                            This argument test if an URL is available. It ONLY test full URLs.

Source filtering, decoding, conversion and expansion:
    --adblock             Activates or deactivates the decoding of the adblock format.
                            Configured value: False
    --cidr                Activates or disables the expansion of CIDR formatted
                            addresses.
                            Configured value: False
    --complements         Activates or disables the generation and test of the
                            complements.
                            A complement is for example `example.org` if 'www.example.org'
                            is given and vice-versa.
                            Configured value: False
    --preload             Activates or disables the preloading of the input
                            file(s) into the continue dataset before starting the tests.

                            This reduces the waiting time while continuing a previous
                            session.
                            Note: This is useless when the auto continue subsystem is not active.
                            Configured value: False
    --filter CLI_TESTING__FILE_FILTER
                            Regex to match in order to test a given line.
                            Configured value: None
    --mining              Activates or disables the mining subsystem.
                            Configured value: False
    --rpz                 Activates or disables the decoding of RPZ policies
                            from each given input files.
                            Configured value: False
    --wildcard            Activates or disables the decoding of wildcards for
                            each given input files.
                            Configured value: False

Test control:
    --chancy, --ludicrous
                            Activates a chancy mode that unleashes the safety
                            workflow in place.

                            WARNING: You shouldn't have to use this unless you feel really lucky
                            and trust your machine. This mode makes things look 'fast',
                            but it may produce some unexpected results if N process
                            simultaneously write the same output file.
                            This mode makes the graphical CLI output unparsable - either.

                            MAY THE FORCE BE WITH YOU!

                            Configured value: False
    -c, --auto-continue, --continue
                            Activates or disables the autocontinue subsystem.
                            Configured value: False
    --cooldown-time CLI_TESTING__COOLDOWN_TIME
                            Sets the cooldown time (in second) to apply between
                            each test.
                            Configured value: 0.0
    --local               Activates or disables the consideration of the test(s)
                            in or for a local or private network context.
                            Configured value: False
    --collection-preferred-origin {frequent,latest,recommended}
                            Sets the preferred status origin.
                            Configured value: 'recommended'
    --collection-lookup   Activates or disables the usage of the Collection lookup
                            whether possible.
                            Configured value: False
    --collection-lookup-only
                            Only perform a Collection lookup.
    --dns-lookup          Activates or disables the usage of the DNS lookup
                            whether possible.
                            Configured value: True
    --dns-lookup-only     Only perform a DNS lookup.
    --http, --http-status-code-lookup
                            Switch the value of the usage of HTTP code.
                            Configured value: True
    --http-only, --http-status-code-lookup-only
                            Only perform a HTTP Code lookup.
    --netinfo-lookup      Activates or disables the usage of the network
                            information (or network socket) whether possible.
                            Configured value: True
    --netinfo-lookup-only
                            Only perform a network information (or networket socket) lookup.
    --special-lookup      Activates or disables the usage of our SPECIAL and
                            extra rules whether possible.
                            Configured value: True
    --special-lookup-only
                            Only perform a SPECIAL lookup.
    --whois-lookup        Activates or disables the usage of the WHOIS record
                            (or better said the expiration date in it) whether possible.
                            Configured value: True
    --whois-lookup-only   Only perform a WHOIS lookup.
    --reputation-lookup   Activates or disables the usage of the reputation
                            dataset whether possible.
                            Configured value: False
    --reputation-lookup-only
                            Only perform a reputation lookup.
    --reputation          Activates or disables the reputation checker.
                            Configured value: False
    --syntax              Activates or disables the syntax checker.
                            Configured value: False
    -t LOOKUP__TIMEOUT, --timeout LOOKUP__TIMEOUT
                            Sets the default timeout to apply to each lookup
                            utilities every time it is possible to define a timeout.
                            Configured value: 5
    --max-http-retries MAX_HTTP_RETRIES
                            Sets the maximum number of retries for an HTTP request.
                            Configured value: 0
    -ua USER_AGENT__CUSTOM, --user-agent USER_AGENT__CUSTOM
                            Sets the user agent to use.

                            If not given, we try to get the latest (automatically) for you.
    -vsc, --verify-ssl-certificate
                            Activates or disables the verification of the SSL/TLS
                            certificate when testing for URL.
                            Configured value: False

DNS control:
    --dns DNS__SERVER [DNS__SERVER ...]
                            Sets one or more (space separated) DNS server(s) to use during testing.

                            To specify a port number for the DNS server you append
                            it as :port [ip:port].

                            If no port is specified, the default DNS port (53) is used.
                            Configured value: <BoxList: ['1.1.1.1']>
    --dns-protocol {UDP,TCP,HTTPS,TLS}
                            Sets the protocol to use for the DNS queries.
                            Configured value: 'UDP'
    --follow-server-order
                            Let us follow or mix the order of usage of the given
                            or found DNS server(s).
                            Configured value: True
    --trust-dns-server    Activates or disable the trust mode.

                            When active, when the first read DNS server give us a negative
                            response - without error - we take it as it it.
                            Otherwise, if not active, when the first read DNS server give us
                            a negative response - without error - we still consolidate by
                            checking all given/found server.

                            Configured value: False
    --dns-delay DNS__DELAY
                            Sets the delay (in seconds) to apply between each DNS
                            queries.

                            Configured value: 0.0

Proxy control:
    --http-proxy PROXY__GLOBAL__HTTP
                            Sets the proxy to use when testing subjects over HTTP.
                            Configured value: None
    --https-proxy PROXY__GLOBAL__HTTPS
                            Sets the proxy to use when testing subjects over HTTPS.
                            Configured value: None

Databases:
    --inactive-db         Activates or disables the usage of a 'database' to
                            store all 'INACTIVE' and 'INVALID'  subject for continuous retest.
                            Configured value: False
    --database-type {csv,mariadb,mysql}
                            Sets the database engine to use.
                            You can choose between the following: `csv | mariadb | mysql`
                            Configured value: 'csv'
    -dbr CLI_TESTING__DAYS_BETWEEN__DB_RETEST, --days-between-db-retest CLI_TESTING__DAYS_BETWEEN__DB_RETEST
                            Sets the numbers of days since the introduction of
                            subject into the inactive dataset before it gets retested.
                            Configured value: 1
    -wdb, --whois-database
                            Activates or disables the usage of a 'database' to
                            store the expiration date of all domains with a valid
                            expiration date.
                            Configured value: True

Output control:
    -a, --all             Activates or disables the display of the all
                            information in the table we print to stdout.
                            Configured value: False
    -ex, --execution      Activates or disables the display of the execution time.
                            Configured value: False
    --colour, --color     Activates or disables the coloration to STDOUT.
                            Configured value: True
    --display-status {all,ACTIVE,INACTIVE,VALID,INVALID,MALICIOUS,SANE} [{all,ACTIVE,INACTIVE,VALID,INVALID,MALICIOUS,SANE} ...]
                            Sets the status that we are allowed to print to STDOUT.

                            Multiple space separated statuses can be given.
                            Configured value: 'all'
    --dots                Activate or disables the display of dots or other
                            characters when we skip the test of a subject.
                            Configured value: False
    --hierarchical        Activates or disables the sorting of the files
                            content (output) in a hierarchical order.
                            Configured value: False
    -h, --host            Activates or disables the generation of the
                            hosts file(s).
                            Configured value: False
    -ip CLI_TESTING__HOSTS_IP, --hosts-ip CLI_TESTING__HOSTS_IP
                            Sets the IP to prefix each lines of the hosts file.
                            Configured value: '0.0.0.0'
    --merge-output        Activates or disables the merging of the outputs of all
                            inputted files inside a single subdirectory as opposed to the
                            normal behavior.
                            Configured value: False
    --no-files            Activates or disables the generation of any non-logs
                            file(s).
                            Configured value: False
    --output-location OUTPUT_LOCATION
                            Sets the location where we are supposed to generation
                            the output directory from.
                            Configured value: '/home/pyfunceble-dev/repositories/github/source/PyFunceble'
    --unified-results     Activates or disables the generation of the unified
                            results file instead of the divided ones.
                            Configured value: False
    --percentage          Activates or disables the display and generation
                            of the percentage - file - of each status.
                            Configured value: True
    --registrar           Activates or disables the display and generation
                            of the registrar - file - status at the end of a test.
                            The registrar file contains the top domain registrar found
                            while testing.
                            Configured value: True
    --max-registrar CLI_TESTING__DISPLAY_MODE__MAX_REGISTRAR
                            Sets the maximal number of registrar to display.
                            Note: This argument has no effect when the --registrar
                            argument is not set. This argument only takes effect on
                            display but not
                            in the log file
                            Configured value: 15
    --plain               Activates or disables the generation of the
                            RAW file(s). What is meant is a list with only a list of
                            subject (one per line).
                            Configured value: True
    -q, --quiet           Activates or disables the display of output to the
                            terminal.
                            Configured value: False
    --push-collection     Activates or disables the push of test result into the
                            collection API.
                            Configured value: False
    -s, --simple          Activates or disables the simple output mode.
                            Configured value: False

Multiprocessing:
    -w CLI_TESTING__MAX_WORKERS, --max-workers CLI_TESTING__MAX_WORKERS
                            Sets the number of maximal workers to use.
                            If not given, 20 (based on the current machine) will be applied.
                            Configured value: None

CI / CD:
    --ci-max-minutes CLI_TESTING__CI__MAX_EXEC_MINUTES
                            Sets the number of minutes to wait before starting
                            to stop a CI session.
                            Configured value: 15
    --ci                  Activates or disables the Continuous Integration
                            mechanism.
                            Configured value: False
    --ci-branch CLI_TESTING__CI__BRANCH
                            Sets our git working branch. This is the branch
                            from where we are supposed to store the tests
                            (excepts the final results).
                            Configured value: 'master'
    --ci-distribution-branch CLI_TESTING__CI__DISTRIBUTION_BRANCH
                            Sets our git distributions branch. This is the
                            branch from where we are supposed to store and push
                            the final results.
                            Configured value: 'master'
    --ci-command CLI_TESTING__CI__COMMAND
                            Sets the command to execute before each commit
                            (except the final one).
                            Configured value: None
    --ci-end-command CLI_TESTING__CI__END_COMMAND
                            Sets the command to execute before the final commit.
                            Configured value: None
    --ci-commit-message CLI_TESTING__CI__COMMIT_MESSAGE
                            Sets the commit message to apply every time we have
                            to apply a commit except for the really last one.
                            Configured value: 'PyFunceble - AutoSave'
    --ci-end-commit-message CLI_TESTING__CI__END_COMMIT_MESSAGE
                            Sets the commit message to apply at the really end.
                            Configured value: 'PyFunceble - Results'

For an in-depth usage, explanation and examples of the arguments,
you should read the documentation at https://pyfunceble.readthedocs.io/en/latest/

Crafted with ♥ by Nissar Chababy (@funilrys) with the help of
https://pyfunceble.github.io/#/contributors && https://pyfunceble.github.io/#/special-thanks

Github Actions CI/CD

Example of how you can run PyFunceble inside Github Actions.

main.yml
name: PyFunceble CI tests
on:
push:
    branches:
    - "master"
pull_request:
    branches:
    - "master"
schedule:
    - cron: "0 * * * *"

env:
PYFUNCEBLE_AUTO_CONFIGURATION: "YES"
GIT_NAME: "${{ secrets.GIT_BOT_NAME }}"
GIT_EMAIL: "${{ secrets.GIT_BOT_EMAIL }}"
PYFUNCEBLE_CONFIG_DIR: "${{ github.workspace }}/.pyfunceble"
GITHUB_TOKEN: "${{ secrets.BOT_REPO_PAT }}"

jobs:
single:
    name: Run PyFunceble with a single domain
    runs-on: "${{ matrix.os }}"

    strategy:
    fail-fast: false
    matrix:
        python_version:
        - "3.9.1"
        os:
        - ubuntu-latest

    steps:
    - uses: actions/checkout@v3
        name: Clone repository
        with:
        token: "${{ secrets.BOT_REPO_PAT }}"

    - name: Set up Python ${{ matrix.python_version }}
        uses: actions/setup-python@v2
        with:
        python-version: ${{ matrix.python_version }}

    - name: Install dependencies
        run: |
        pip install --pre PyFunceble-dev

    - name: Get PyFunceble version
        run: |
        PyFunceble --version

    - name: Run PyFunceble
        run: |
        PyFunceble -a --logging-level critical -d github.com

file_and_push:
    name: Run PyFunceble against a file and push result to repository
    runs-on: "${{ matrix.os }}"

    strategy:
    fail-fast: false
    matrix:
        python_version:
        - "3.9.1"
        os:
        - ubuntu-latest

    steps:
    - uses: actions/checkout@v3
        name: Clone repository
        with:
        token: "${{ secrets.BOT_REPO_PAT }}"

    - name: Set up Python ${{ matrix.python_version }}
        uses: actions/setup-python@v2
        with:
        python-version: ${{ matrix.python_version }}

    - name: Install dependencies
        run: |
        pip install --pre PyFunceble-dev

    - name: Get PyFunceble version
        run: |
        PyFunceble --version

    - name: Run PyFunceble
        run: |
        PyFunceble -a --ci --logging-level critical -f test.list

GitLab Runner CI/CD

As we offer an argument named --ci which will autosave in a GitLab CI/CI environment, this document try to describe hot it works!

Configuration

Personal Access Token

A personal access token is needed in order for PyFunceble to automatically push the results.

You should get a personal GitLab access token with the read_repository and write_repository scopes.

Once created and copied in a safe place, create a new masked variable named GL_TOKEN inside the CI/CD settings of your project. The value of the variable should be the newly generated personal access token.

.gitlab-ci.yml

Note

This part only present a commented .gitlab-ci.yml. This is just an example do not take the following as necessarly true.

You’re invited to submit changes if something stated in this document is wrong.

# Python needed, so we use the python image.
image: python:latest

variables:
    # This is the Git name we have to set. (git config user.name)
    GIT_EMAIL: "dead-hosts@funilrys.com"
    # This is the Git Email we have to set. (git config user.email)
    GIT_NAME: "GitLab CI/CD"

before_script:
    # We install the development version of PyFunceble.
    # If you prefer the stable version replace `pyfunceble-dev`
    # with `pyfunceble`.
    - pip3 install PyFunceble-dev

run:
    script:
        # Let's say we want our results and our PyFunceble
        # infrastructure to be saved in a directory called `PyFunceble-tests`

        # We move inside it.
        - cd PyFunceble-tests
        # We test the file `my_awesome_list` which is located inside the current directory.
        # Note: we precise the `--ci` argument here,
        #     but you work without it if you set `ci: true` inside your `.PyFunceble.yaml`
        - PyFunceble --ci -f my_awesome_list --plain

Travis container CI/CD

As we offer an argument named --ci to activate the usage of PyFunceble in a Travis CI instance, we document here what you need to know!

Configuration

Note

This part only present a commented .travis.yml so that you can understand where to start.

If you need more practical examples, feel free to report to one of Dead-Hosts repositories which use PyFunceble with Travis CI.

env:
    global:
        # The following is your encrypted GitHub API key.
        # Indeed as we are going to push to the repository, this is needed.
        #- GH_TOKEN: # This can be set in the travis-ci https://travis-ci.com/repo/settings as 'Environment Variables'
        # or as below: secure: encrypted code
        - secure: QQdKFquFFojFT9XJ1XZp4EMoDTVoXFgqZq8XU+sCVf+pJQR6d/oKBp8rnSTCnZizWOQXUjGXUUxUpSG/dYGyBLjo3rH3rsn9ciZHVfubxbwK860w4sqibl4DvhCv2rdsFtvzXnhm4P9OL3i+krKdewh9fxpNyUU58qOgfnS7mK9FcFhb8z5ak2sxU2XRZedwm6Ro0oyVKs8kFkL4YaADfNyAHlGTfr9rVmE52WXQXQENktb9gFgR2A8ZnmLy0BCMZGkPDShJnjRDWD4DErtasLmLQvWpzOBwdbVJTY6U9KDRXVNdC9lp5E5Ba/dc0y36q6vjfgJR+QchetOtHgNbKYbLB8c26Di90OZCFJsxMNcl1Wct4qFPXkFGvjXrISW6pbdPL5Plto0Ig3iLiulhYOPVArysMIk9ymtSXP+WE7VWX01LQ1fEkIoSfeVZ2caTnCmTsoHVGRRe978CojKaT7yU45kb15hcyDrzptQ8EP2hfxeh5F7KtueQ6Rsb9LFDZMkMDKflZn6a+bRhESlmWWmYB9stzGzTurQA1E1bcSACJ8A8hG5nHBzZYJ2S+OY0PE7UdyOJ0JK0qe/67d+F9ocQdIoFpDDTdgIjHerQnD2wRg1aKPzLDb4jJTpqgr5ssPrqUAKl3st7gyaAZzCEADPDnIBDjOJS+mFWbx9DKgc=
        # This is the Git name we have to set. (git config user.name)
        - GIT_NAME: Travis CI
        # This is the Git Email we have to set. (git config user.email)
        - GIT_EMAIL: dead-hosts@funilrys.com

# This is the language we use.
language: python

# This is the python version we are going to use for the tests.
# Note: you can add any 3.x version to the list.
python:
- "3.8"

# The following will tell Travis CI to ends as fast as possible.
matrix:
    fast_finish: true

# Here we are setting what Travis CI have to cache.
cache:
    # We are caching pip3 as we use it to install PyFunceble
    - pip3

install:
    # We install the development version of PyFunceble. If you prefer the stable version replace
    # `pyfunceble-dev` with `pyfunceble`.
    - pip3 install pyfunceble-dev

# Our tests start here.
script:
    # Let's say we want our results and our PyFunceble infrastructure to be saved in a directory
    # called `PyFunceble-tests`

    # We move inside it.
    - cd PyFunceble-tests
    # We test the file `my_awesome_list` which is located inside the current directory.
    # Note: we precise the `--ci` argument here,
    #     but you work without it if you set `travis: true` inside your `.PyFunceble.yaml`
    - PyFunceble --ci -f my_awesome_list --plain

# The following initiate email notification logic.
notifications:
    # As we want to get a mail on failure and on status change, we set the following.
    on_success:   change
    on_failure:   always

Getting a GitHub token

For the secure index of the .travis.yml file, you have to generate a new GitHub token.

After you got your token, please write it or save it in a safe place as you’re going to need it every time you’re going to interact with Travis CI.

Note

The scope to set is public_repo but you can also set others depending on your needs.

Encrypting the token for future usage under the Travis CIs’ containers

To encrypt the token simply replace and execute the following according to your personal case.

$ travis encrypt 'GH_TOKEN=theGeneratedToken' -r 'The content of TRAVIS_REPO_SLUG' --add

Warning

Please do not execute the following explicitly without replacing theGeneratedToken with your previously generated GitHub token and The content of TRAVIS_REPO_SLUG with your repository slug.

Note

The usage of --add ensure that the travis program automatically add the secure index to the .travis.yml file.

Deprecated arguments

The following arguments have previous been in use by PyFunceble, these are now deprecated and should in some cases be replaced with alternative args.

In other cases the old feature have either been included into a other functional or simply been removed as it was obselete to keep the function within Pyfunceble v4.x.

This is happening because PyFunceble is evolving over time and features comes and goes.



-nw | --no-whois

Deprecated since version 4.0.0.

Replacement: –whois-lookup


--shadow-file | --shadow

Deprecated since version 4.0.0.

Replacement: N/A


--use-reputation-data

Deprecated since version 4.0.0.

Replacement: reputation-lookup


--dns-lookup-over-tcp

Deprecated since version 4.0.0.

See: –dns-protocol


-db | --database

Deprecated since version 4.0.0.

Replacement: –inactive-db


-dbc "something" | --days-between-db-clean

Deprecated since version 4.0.0.

Replacement: N/A


-json

Deprecated since version 4.0.0.

Replacement: N/A


-less

Deprecated since version 4.0.0.

Replacement: -a | –all


-nf

Deprecated since version 4.0.0.

Replacement: –no-files


-nl | --no-logs

Deprecated since version 4.0.0.

Replacement: –no-files


-nu | --no-unified

Deprecated since version 4.0.0.

Replacement: –unified-results


-ns|--no-special

Deprecated since version 4.0.0.

Replacement: –special-lookup

In the .code:.PyFunceble_production.yaml the value have changed from no_special to special


--split

Deprecated since version 4.0.0.

Replacement: –unified-results


--store-whois

Deprecated since version 4.0.0.

Replacement: N/A


-m | --multiprocess

Deprecated since version 4.0.0.

Integrated into -w | –max-workers


-p | --processes

Deprecated since version 4.0.0.

Replacement: -w | –max-workers


--multiprocess-merging-mode

Deprecated since version 4.0.0.

Replacement: N/A


--autosave-minutes

Deprecated since version 4.0.0.

Replacement: –ci-max-minutes


--cmd

Deprecated since version 4.0.0.

Replacement: –ci-command


--cmd-before-end

Deprecated since version 4.0.0.

Replacement: --ci-end-command


Responses

API Responses

Syntax Checker

{
    "checker_type": "SYNTAX",
    "idna_subject": "example.com",
    "params": null,
    "status": "VALID",
    "status_source": "SYNTAX",
    "subject": "example.com",
    "tested_at": "2021-03-09T17:43:24.477977"
}

Availability Checker

{
    "checker_type": "AVAILABILITY",
    "dns_lookup": {
        "NS": [
            "a.iana-servers.net.",
            "b.iana-servers.net."
        ]
    },
    "dns_lookup_record": {
        "dns_name": "example.com.",
        "follow_nameserver_order": true,
        "nameserver": "9.9.9.9",
        "port": 53,
        "preferred_protocol": "UDP",
        "query_record_type": "NS",
        "query_timeout": 5.0,
        "response": [
            "a.iana-servers.net.",
            "b.iana-servers.net."
        ],
        "subject": "example.com",
        "used_protocol": "UDP"
    },
    "domain_syntax": true,
    "expiration_date": null,
    "http_status_code": null,
    "idna_subject": "example.com",
    "ip_syntax": false,
    "ipv4_range_syntax": false,
    "ipv4_syntax": false,
    "ipv6_range_syntax": false,
    "ipv6_syntax": false,
    "netinfo": null,
    "netloc": "example.com",
    "params": {
        "do_syntax_check_first": false,
        "use_dns_lookup": true,
        "use_extra_rules": true,
        "use_http_code_lookup": true,
        "use_netinfo_lookup": true,
        "use_reputation_lookup": false,
        "use_whois_db": true,
        "use_whois_lookup": false,
        "use_collection": false
    },
    "registrar": null,
    "second_level_domain_syntax": true,
    "status": "ACTIVE",
    "status_after_extra_rules": null,
    "status_before_extra_rules": null,
    "status_source": "DNSLOOKUP",
    "status_source_after_extra_rules": null,
    "status_source_before_extra_rules": null,
    "subdomain_syntax": false,
    "subject": "example.com",
    "tested_at": "2021-03-09T17:42:15.771647",
    "url_syntax": false,
    "whois_lookup_record": {
        "expiration_date": null,
        "port": 43,
        "query_timeout": 5.0,
        "record": null,
        "server": null,
        "subject": "example.com",
        "registrar": null
    },
    "whois_record": null
}

Reputation Checker

{
    "checker_type": "REPUTATION",
    "dns_lookup": [
        "93.184.216.34"
    ],
    "dns_lookup_record": {
        "dns_name": "example.com.",
        "follow_nameserver_order": true,
        "nameserver": "9.9.9.9",
        "port": 53,
        "preferred_protocol": "UDP",
        "query_record_type": "A",
        "query_timeout": 5.0,
        "response": [
            "93.184.216.34"
        ],
        "subject": "example.com",
        "used_protocol": "UDP"
    },
    "domain_syntax": true,
    "idna_subject": "example.com",
    "ip_syntax": false,
    "ipv4_range_syntax": false,
    "ipv4_syntax": false,
    "ipv6_range_syntax": false,
    "ipv6_syntax": false,
    "params": {
        "do_syntax_check_first": false,
        "use_collection": false
    },
    "second_level_domain_syntax": true,
    "status": "SANE",
    "status_source": "REPUTATION",
    "subdomain_syntax": false,
    "subject": "example.com",
    "tested_at": "2021-03-09T17:44:02.908452",
    "url_syntax": false
}

API Responses (explained)

In this page, we intend to explain the most useful parts of the API responses.

checker_type

The checker type. It describes the checker which was used to provide the given response.

It should be one of the following:

  • SYNTAX
  • AVAILABILITY
  • REPUTATION

idna_subject

The IDNA formatted subject. It is the subject that is internally exposed the all supported testing methods.

You should consider this as the subject and consider the subject key as a placeholder of what was given by you.

params

The parameters. It describes the parameter applied to the checker. In most case, if you are using the Python API, you should be able to control most of them through the class constructor or their property setters with the same name.

Syntax Checker

As of now, there is no known parameters.

Availability Checker

With the availability checker, the following is provided.

{
    "do_syntax_check_first": false,
    "use_dns_lookup": true,
    "use_extra_rules": true,
    "use_http_code_lookup": true,
    "use_netinfo_lookup": true,
    "use_reputation_lookup": false,
    "use_whois_db": true,
    "use_whois_lookup": false,
    "use_collection": false
}
do_syntax_check_first

This parameter lets the checker know that it has to do a syntax check before starting an extensive test. Meaning that the status strongly depends on the caught syntax.

use_dns_lookup

This parameter lets the checker know that it is allowed to perform some DNS lookup to determine the status of the given subject.

use_extra_rules

This parameter lets the checker know that it is allowed to check against our own sets of SPECIAL rules in order to escalate or deescalate the status of the given subject.

use_http_code_lookup

This parameter lets the checker know that it is allowed to gather and use the HTTP status code of the given subject to determine its status.

use_netinfo_lookup

This parameter lets the checker know that it is allowed to perform a network information lookup to determine the status of the given subject.

use_reputation_lookup

This parameter lets the checker know that is allowed to perform a reputation lookup to determine the status of the given subject.

use_whois_db

This parameter lets the checker know that it is allowed to look at the WHOIS local WHOIS database before even trying to perform a WHOIS lookup to determine the status of the given subject.

Warning

If the use_whois_lookup parameter is deactivated, this parameter is ignored.

use_whois_lookup

This parameter lets the checker know that is it allowed to perform a WHOIS lookup to determine the status of the given subject.

use_collection

This parameter lets the checker know that it is allowed to perform a lookup into the collection API before starting an extensive local test.

Reputation Checker

With the availability checker, the following is provided.

{
    "do_syntax_check_first": false,
    "use_collection": false
}
do_syntax_check_first

This parameter lets the checker know that it has to do a syntax check before starting an extensive test. Meaning that the status strongly depends on the caught syntax.

use_collection

This parameter lets the checker know that it is allowed to perform a lookup into the collection API before starting an extensive local test.

status

The status. It describes the final status gathered by the checker.

Syntax Checker

With the syntax checker, it may be one of the following:

  • VALID
  • INVALID
Availability Checker

With the availability checker, it may be one of the following:

  • ACTIVE
  • INACTIVE
  • INVALID
Reputation Checker

With the reputation checker, it may be one of the following:

  • SANE
  • MALICIOUS

registrar

The registrar. It describes the registrar of the given subject as described in its WHOIS record.

Syntax Checker

Non-existent.

Availability Checker

Provides the - found - registrar. Otherwise, null is provided.

Reputation Checker

Non-existent.

status_after_extra_rules

The status after our extra rules lookup. It describes the status after the lookup against our own sets of rules.

If no rules were matched, null is provided.

Warning

Beware, this is only provided by the availability checker.

status_before_extra_rules

The status before our extra rules lookup. It describes the status before the lookup against our own sets of rules. In other words, it is the status provided by our standard status lookup strategy.

If no rules were matched, null is provided.

Warning

Beware, this is only provided by the availability checker.

status_source

The status source. It describes the test method that led to the given status.

It should be one of the following:

  • SYNTAX
  • WHOIS
  • DNSLOOKUP
  • NETINFO
  • HTTP CODE
  • SPECIAL (extra rules)
  • COLLECTION

status_source_after_extra_rules

The status source after our extra rules lookup. It describes the status source after the lookup against our own sets of rules.

It should be SPECIAL.

If no rules were matched, null is provided.

Warning

Beware, this is only provided by the availability checker.

status_source_before_extra_rules

The status source before our extra rules lookup. It describes the status source before the lookup against our own sets of rules.

In other words, it is the status source provided by our standard status lookup strategy.

It should be one of the following:

  • SYNTAX
  • WHOIS
  • DNSLOOKUP
  • NETINFO
  • HTTP CODE
  • COLLECTION

If no rules were matched, null is provided.

Warning

Beware, this is only provided by the availability checker.

subject

The subject. It describes the subject that was given by you.

tested_at

The test date. It may not be useful to everyone, but it describes the date and time of the generation of the given output.

dns_lookup

The DNS lookup summary. It describes the summary of the DNS Lookup that was performed.

Syntax Checker

Non-existent.

Availability Checker

With the availability checker, the following format (or null) is provided:

{
    "QUERY TYPE": [
        "string",
        "string"
    ]
}

Where QUERY TYPE is one of the following:

  • NS
  • A
  • AAAA
  • CNAME
  • DNAME
Reputation Checker

With the reputation checker, the following format (or null) is provided:

[
    "string",
    "string"
]

It is just a simple list of IPs that we check against. When the given subject is an IPv4, null is provided.

dns_lookup_record

The DNS lookup record. It describes the latest performed DNS lookup record.

Syntax Checker

Non-existent.

Availability and Reputation Checker

With the availability or reputation checker, the following is provided.

{
    "dns_name": "example.com.",
    "follow_nameserver_order": true,
    "nameserver": "9.9.9.9",
    "port": 53,
    "preferred_protocol": "UDP",
    "query_record_type": "NS",
    "query_timeout": 5.0,
    "response": [
        "a.iana-servers.net.",
        "b.iana-servers.net."
    ],
    "subject": "example.com",
    "used_protocol": "UDP"
}
dns_name

The DNS name. It describes the DNS name that was queried.

follow_nameserver_order

It describes if we followed the nameserver order.

nameserver

The nameserver. It describes the nameserver that was queried last.

port

The port. It describes the port that was used to communicate with the nameserver.

query_record_type

The query record type. It describes the record type that was queried last.

query_timeout

The query timeout. It describes the query timeout that was used to perform the query.

response

The response. It describes a list of domains or IPs given by the nameserver as response.

subject

The subject. It describes the subject that was given to the query tool.

used_protocol

The used protocol. It describes the used protocol.

It should be one of the following:

  • UDP (default)
  • TCP
  • HTTPS
  • TLS

domain_syntax

The domain syntax. It describes through a boolean the state of the given subject.

In other words: true is provided when the given subject is a 2nd level domain or a subdomain.

Warning

This key may give you a null if nothing was performed (yet).

Warning

Beware, this is only provided by the availability and reputation checkers.

expiration_date

The expiration date. It describes the expiration date of the given subject as extracted from the WHOIS record.

If none is found, null will be provided.

Warning

Beware, this is only provided by the availability checker.

http_status_code

The HTTP status code. It describes the HTTP status code which was discovered.

If none is found, null or 0 will be provided.

Warning

Beware, this is only provided by the availability checker.

ip_syntax

The IP syntax. It describes through a boolean the state of the given subject.

In other words: true is provided when the given subject is an IPv4 or an IPv6 (range excluded).

Warning

This key may give you a null if nothing was performed (yet).

Warning

Beware, this is only provided by the availability and reputation checkers.

ipv4_range_syntax

The IPv4 range syntax. It describes through a boolean the state of the given subject.

In other words: true is provided when the given subject is an IPv4 range.

Warning

This key may give you a null if nothing was performed (yet).

Warning

Beware, this is only provided by the availability and reputation checkers.

ipv4_syntax

The IPv4 syntax. It describes through a boolean the state of the given subject.

In other words: true is provided when the given subject is an IPv4 (range excluded).

Warning

This key may give you a null if nothing was performed (yet).

Warning

Beware, this is only provided by the availability and reputation checkers.

ipv6_range_syntax

The IPv6 range syntax. It describes through a boolean the state of the given subject.

In other words: true is provided when the given subject is an IPv6 range.

Warning

This key may give you a null if nothing was performed (yet).

Warning

Beware, this is only provided by the availability and reputation checkers.

ipv6_syntax

The IPv6 syntax. It describes through a boolean the state of the given subject.

In other words: true is provided when the given subject is an IPv6 (range excluded).

Warning

This key may give you a null if nothing was performed (yet).

Warning

Beware, this is only provided by the availability and reputation checkers.

second_level_domain_syntax

The 2nd level domain syntax. It describes through a boolean the state of the given subject.

In other words: true is provided when the given subject is a 2nd level domain.

Warning

This key may give you a null if nothing was performed (yet).

Warning

Beware, this is only provided by the availability and reputation checkers.

subdomain_syntax

The subdomain syntax. It describes through a boolean the state of the given subject.

In other words: true is provided when the given subject is a subdomain.

Warning

This key may give you a null if nothing was performed (yet).

Warning

Beware, this is only provided by the availability and reputation checkers.

url_syntax

The subdomain syntax. It describes through a boolean the state of the given subject.

In other words: true is provided when the given subject is a URL.

Warning

This key may give you a null if nothing was performed (yet).

Warning

Beware, this is only provided by the availability and reputation checkers.

netinfo

The network information summary. It describes the summary of the network information lookup.

Syntax Checker

Non-existent.

Availability Checker

With the availability checker, the following format (or null) is provided:

[
    "string",
    "string"
]

It is just a simple list of IPs or domains that were found. Otherwise, null will be supplied.

Reputation Checker

Non-existent.

netloc

The network location. It describe the network location of the tested subject. This can be useful when working with URLs. When working with URLs the value of netloc will be in the domain:port formet if the port is explicitly given and domain otherwise.

whois_lookup_record

The WHOIS lookup record. It describes the latest performed WHOIS lookup record.

Syntax Checker

Non-existent.

Availability Checker

With the availability checker, the following is provided.

{
    "expiration_date": null,
    "port": 43,
    "query_timeout": 5.0,
    "record": null,
    "server": null,
    "subject": "example.com"
}
expiration_date

The expiration date. It describes the extracted expiration date.

It should be a string if the format 09-oct-1970 or null otherwise.

port

The port. It describes the port used to communicate with the WHOIS server.

query_timeout

The query timeout. It describes the query timeout that was applied during the query.

record

The WHOIS record. It describes the record or response of the WHOIS server.

subject

The subject. It describes the subject which was queried.

Reputation Checker

Non-existent.

whois_lookup

The WHOIS record. It describes the WHOIS record as given by the (root) WHOIS server.

Warning

Beware, this is only provided by the availability checker.

CLI Responses

From the CLI, there is a lot less information available to the end-user. This patch intend to shortly preset each column of the CLI stdout outputs.

Subject

The subject. It describes the given or decoded subject after conversion to IDNA.

Status

The status. It describes the official status of the tested subject.

Source

The status source. It describes the method that let to the given status.

Expiration Date

The expiration date. It describes the expiration date extracted from the WHOIS record - if found. Otherwise, Unknown is supplied.

HTTP Code

The HTTP status code. It describes the HTTP status code - if found. Otherwise, Unknown is supplied.

Checker

The checker. It describes the checker used to gather the status.

API Documentation

Checkers

As of PyFunceble 4.0.0, it is possible to use our checker without any configuration of initialization of any sort. Simply choose your checker, interact with it and get what you are looking for!

Getting started

Before starting to play with any checkers you need to understand 2 things:

The first one is the base of all checkers, and the second is the base of all status you get when you call the get_status() method.

Interaction with checkers

Note

This method is the same for all available checkers.

Let’s say we want to test the availability of github.com.

We first have to select and prepare the checker.

from PyFunceble import DomainAvailabilityChecker

# Here we take the default configuration.
checker = DomainAvailabilityChecker()

Then we just set the subject to work with.

checker.set_subject("github.com")

We can then get the status.

status = checker.get_status()

# Note: You can also do it in one shot.
status = checker.set_subject("github.com").get_status()

Once we have a status object, we can convert it to a different format.

# To dict.
status_dict = status.to_dict()

# To JSON.
status_json = status.to_json()

We can also interact with any of the attributes of the status object.

# This is the status.
print("GitHub is", status.status)

But finally, and probably most importantly, we can ask questions.

Warning

Each checker have their own set of methods. Be sure to read them or follow the autocomplete of your editor.

# Is it active ?
print("Is GitHub active ?", status.is_active())

# Is it inactive ?
print("Is GitHub inactive ?", status.is_inactive())

# Is it invalid ?
print("Is github.com invalid ?", status.is_invalid())

Available Checkers

In this section you can find the list of available checkers and how to import them.

Availability checkers

Syntax checkers

Reputation checkers

Endpoints

Note

This section document what you can call directly when you use PyFunceble as an imported module.

Warning

Some of those methods may be deprecated and removed in the future (open for discussion).

The tool to check the availability or syntax of domain, IP or 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.get_complements(subject: str, include_given: bool = False) → List[str][source]

Provides the complements of a given subject.

A complement is a for example example.org if www.example.org is given and vice-versa.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import Subject2Complements

my_subject = "example.org"
complements = Subject2Complements(
    my_subject
).get_converted(include_given=True)
Parameters:
  • subject – The subject to work with.
  • include_given – Include the given subject in the result.
PyFunceble.is_domain(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid second level domain or subdomain.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import DomainSyntaxChecker

my_subject = "example.org"
the_status = DomainSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is a domain (2nd level or subdomain).
print(f"{my_subject} is domain ? {the_status.is_valid()}")
Parameters:subject – The subject to work with.
PyFunceble.is_domain_malicious(subject: str, **kwargs) → bool[source]

Checks if the given domain is malicious.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import DomainReputationChecker

my_subject = "example.org"
the_status = DomainReputationChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is malicious.
print(f"{my_subject} is Malicious ? {the_status.is_malicious()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ip(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid IP range.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPSyntaxChecker

my_subject = "192.168.0.0"
the_status = IPSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is an IP (v4 or v6).
print(f"{my_subject} is IP ? {the_status.is_valid()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ip_range(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid IP range.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPSyntaxChecker

my_subject = "192.168.0.0"
the_status = IPSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is an IP range (v4 or v6).
print(f"{my_subject} is IP range ? {the_status.is_valid_range()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ipv4(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid IPv4.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPSyntaxChecker

my_subject = "192.168.0.0"
the_status = IPSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is an IPv4.
print(f"{my_subject} is IPv4 ? {the_status.is_valid_v4()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ipv4_malicious(subject: str, **kwargs) → bool[source]

Checks if the given IPv4 is malicious.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPReputationChecker

my_subject = "192.168.0.1"
the_status = IPReputationChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is malicious.
print(f"{my_subject} is Malicious ? {the_status.is_malicious()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ipv4_range(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid IPv4 range.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPSyntaxChecker

my_subject = "192.168.0.0"
the_status = IPSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is IPv4 range.
print(f"{my_subject} is IPv4 range ? {the_status.is_valid_v4_range()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ipv6(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid IPv6.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPSyntaxChecker

my_subject = "192.168.0.0"
the_status = IPSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is an IPv6.
print(f"{my_subject} is IPv6 ? {the_status.is_valid_v6()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ipv6_range(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid IPv6 range.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPSyntaxChecker

my_subject = "::1"
the_status = IPSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is IPv6 range.
print(f"{my_subject} is IPv6 range ? {the_status.is_valid_v6_range()}")
Parameters:subject – The subject to work with.
PyFunceble.is_second_level_domain(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid second level domain.

Warning

This method was added for retrocompatibility. It may be removed in the future and is still available for convenience.

Please consider the following alternative example:

from PyFunceble import SecondLvlDomainSyntaxChecker

my_subject = "example.org"
the_status = SecondLvlDomainSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is a second level domain.
print(f"{my_subject} is 2nd level domain ? {the_status.is_valid()}")
Parameters:subject – The subject to work with.
PyFunceble.is_subdomain(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid subdomain.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import SubDomainSyntaxChecker

my_subject = "hello.example.org"
the_status = SubDomainSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is a subdomain.
print(f"{my_subject} is subdomain ? {the_status.is_valid()}")
Parameters:subject – The subject to work with.
PyFunceble.is_url(subject: str, **kwargs) → bool[source]

Checks if the given subject is syntactically a valid URL.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import DomainReputationChecker

my_subject = "https://example.org"
the_status = URLSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is a URL.
print(f"{my_subject} is URL ? {the_status.is_valid()}")
Parma subject:The subject to check.
PyFunceble.is_url_malicious(subject: str, **kwargs) → bool[source]

Checks if the given URL is malicious.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import URLReputationChecker

my_subject = "https://example.org"
the_status = URLReputationChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is malicious.
print(f"{my_subject} is Malicious ? {the_status.is_malicious()}")
Parameters:subject – The subject to work with.
PyFunceble.load_config(*args, **kwargs) → None[source]

Placeholder before deletion.

Since 4.0.0, you are not required to load the configuration before hand. If you still want too because you may want to use a special CLI related method, you can doing it so:

import PyFunceble.facility

PyFunceble.facility.ConfigLoader.start()
PyFunceble.test(subject: str, **kwargs) → PyFunceble.checker.availability.status.AvailabilityCheckerStatus[source]

Checks the avaialbility of the given subject assuming that it is a domain or an IP.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import DomainAndIPAvailabilityChecker

my_subject = "example.org"
the_status = DomainAndIPAvailabilityChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is available.
print(f"{my_subject} is available ? {the_status.is_available()}")
Parameters:subject – The subject to work with.
PyFunceble.url_test(subject: str, **kwargs) → PyFunceble.checker.availability.status.AvailabilityCheckerStatus[source]

Checks the availability of the given subject assuming that it is a URL.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import URLAvailabilityChecker

my_subject = "http://example.org"
the_status = URLAvailabilityChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is available.
print(f"{my_subject} is available ? {the_status.is_available()}")
Parameters:subject – The subject to work with.

File generation while using the API

You may want to test using the API but still want the result structured normally like a CLI usage. For that case simply add the following.

"""
This is an example which let us manipulate the data and also generate the files
as if it was the CLI.
"""

import copy

import colorama

import PyFunceble.facility
import PyFunceble.storage
from PyFunceble import DomainAvailabilityChecker
from PyFunceble.cli.filesystem.dir_structure.restore import (
    DirectoryStructureRestoration,
)
from PyFunceble.cli.processes.producer import ProducerProcessesManager
from PyFunceble.cli.utils import ascii_logo

# We initiate the coloration.
colorama.init(autoreset=True)


# We are in control, so we need to manually start the loading.
PyFunceble.facility.ConfigLoader.custom_config = {
    "cli_testing": {"file_generation": {"plain": True}, "display_mode": {"quiet": True, "color": True}}
}
PyFunceble.facility.ConfigLoader.start()

print(ascii_logo.get_home_representation())

# This is needed as our idea is to communicate with the producer process instead
# of trying to implement everything again.
# So, this describes the dataset as they are sent to the tester process
# (normally from the CLi).
STD_COMMUNICATION_DATASET = {
    "type": "single",
    "subject_type": "domain",
    # Destination inside the output directory.
    "destination": "my_awesome_pyfunceble_wrapper",
    "subject": None,
    "idna_subject": None,
    "source": "my_awesome_pyfunceble_wrapper",
    "output_dir": None,  # Will be handled automatically
    "checker_type": "AVAILABILITY",  # Must be one of our supported one!!
}

DOMAINS = ["github.com", "twitter.com"]

# In this example, we are cleaning up and regenerating the output directory
# at each run.
dir_structure_restoration = DirectoryStructureRestoration(
    parent_dirname=STD_COMMUNICATION_DATASET["destination"]
).restore_from_backup()

# We start the producer process.
producer_proc = ProducerProcessesManager()
# We start the process manager now that we are ready.
producer_proc.start()

# We start and configure our availability checker.
avail_checker = DomainAvailabilityChecker(use_whois_lookup=False)

for domain in DOMAINS:
    # We loop through our list of subject to test.

    # We parse the current subject to the availability checker.
    avail_checker.subject = domain

    # Now we fetch the status object.
    test_result = avail_checker.get_status()

    # We prepare our communication dataset.
    communication_dataset = copy.deepcopy(STD_COMMUNICATION_DATASET)
    communication_dataset["subject"] = test_result.subject
    communication_dataset["idna_subject"] = test_result.idna_subject

    # We print the result (for us as we call this script.)
    print(
        f"{test_result.idna_subject} (IDNA: {test_result.subject}) "
        f"is {test_result.status}"
    )

    # We order the generation of the status file by putting our information
    # to the producer queue.
    producer_proc.add_to_input_queue(
        (communication_dataset, test_result), worker_name="main"
    )

# We are now done, it's time to send the stop signal.
# The stop signal will inform the producer process that it needs to stop
# listening to new order (from the time it reads the stop signal).
producer_proc.send_stop_signal()

# Now we wait until it's done.
producer_proc.wait()

# From here all files were generated we can do whatever we want with them.

Components

AdBlock/Filter list decoding

Warning

This component is not activated by default.

Why do we need it?

As some people may want to test the content of their AdBlock/Filter list, we offer a way to decode them!

How does it work?

Note

Want to read the code ? It’s here: AdblockInputLine2Subject!

We keep it simple by trying to comply with the Adblock Plus filters explained documentation. For us, the relevant parts are the one which defines/explains which domains are being blocked from a given rule.

Note

A more aggressive extraction might be planned in the future.

How to use it?

You can simply change

cli_decoding:
    adblock: False

    # Activate this only if you want to get as much as possible.
    adblock_aggressive: False

to

cli_decoding:
    adblock: False

    # Activate this only if you want to get as much as possible.
    adblock_aggressive: False

into your personal .PyFunceble.yaml or use the --adblock argument from the CLI to activate it.

Autocontinue

Why do we need it?

The auto-continue logic was originaly created for one purpose: Testing long files inside Travis CI. As Travis CI session has a time limit of 45 minutes, it became vital for us to be able to stop and continue the test from where we were under those 45 minutes. This is how it started.

Today, - and it might be controversial - it is used by most people who aren’t under a Travis CI container to continue when the machine or tool crashes.

How does it work?

Note

Want to read the code ? It’s here: ContinueDatasetBase()!

We log every subject already tested previously and remove them completely when we are done with the test of the given file.

How to use it?

It is activated by default but you can simply change

cli_testing:
    autocontinue: False

to

cli_testing:
    autocontinue: True

into your personal .PyFunceble.yaml or use the --continue argument from the CLI to reactivate it.

Certificate verification

Warning

This component is not activated by default.

Why do we need it?

You might sometime be sure that every URL tested with PyFunceble have a valid certificate. This what it’s all about!

How does it work?

By default we don’t check the certificate, but if you choose to activate this, as soon as the verification is failed, an INACTIVE status will be returned while testing for URL.

How to use it?

Simply change

verify_ssl_certificate: False

to

verify_ssl_certificate: True

into your personal .PyFunceble.yaml or use the --verify-ssl-certificate argument from the CLI to activate it.

Cleaning

Why do we need it?

Because we constantly need to clean files which are not needed before starting a new test, we embedded our cleaning logic.

How does it work?

Note

Want to read the code ? It’s here FilesystemCleanup!

It has an internal map of what has to be deleted and how.

How to clean?

For a simple clean, run PyFunceble with the clean-pyfunceble CLI tool.

For a complete cleaning, run PyFunceble with the clean-pyfunceble CLI tool along with the --all argument.

Complements Generation

Warning

This component is not activated by default.

Why do we need it?

Let’s say we have example.org but www.example.org (or vice-versa) is not into my list. This component (if activated) let us test www.example.org (or vice-versa) even if it’s not into the input list.

How does it work?

Note

Want to read the code ? It’s here Subject2Complements!

At the end of the normal test process, we generate the list of complements and test them.

How to use it?

You can simply change

cli_testing:
    # Activates the generation of complements.
    complements: False

to

cli_testing:
    # Activates the generation of complements.
    complements: True

into your personal .PyFunceble.yaml or use the --complements argument from the CLI to activate it.

Configuration

Why do we need it?

As we wanted to be able to manage the options without having to always update the CLI call, we introduced the configuration logic and file.

How does it work?

Note

Want to read the configuration loader code ? It’s here ConfigLoader!

When you are using an argument from the CLI, what we actually do is parse them into our configuration logic.

In the other side, if we first look for the .PyFunceble.yaml file. If not found, we get/generate it and then parse it to our system.

Note

We also wanted to get rid of the configuration for an end-user point of view, therefore almost all configuration indexed can be updated from the CLI.

In that case, we update the configuration with the different argument you gives us before parsing it to the system.

How to configure?

Update the .PyFunceble.yaml file or use the CLI.

Continuous Integration

Warning

This component is not activated by default.

Why do we need it?

The continuous integrations component is there to enable a continuous testing and integration in your workflow.

The idea is that: If you can use any of the supported Continuous Integration engine, use it, and use PyFunceble to work along your workflow.

How does it work?

Note

Want to read the code ? It’s here ContinuousIntegrationBase!

After a given amount of minutes, we stop the tool, generate the percentage, run a given command (if found), commit all the changes we made to the repository and finally, push to the git repository.

How to use it?

As of today, PyFunceble should work under Travis CI and GitLab CI.

Warning

Along with the configuration file or the CLI setting, you are required to give the following environment variables:

  • GIT_EMAIL: The email to use for the commit.
  • GIT_NAME: The name to use for the commit.
  • GH_TOKEN: The GitHub token if you use Travis CI.
  • GL_TOKEN: The GitLab token if you use GitLab CI.

The following from the configuration (or their equivalent from the CLI) are available for usage.

cli_testing:
    ci:
        # Provides everything related to the continuous integration.

        # Activates the continuous integration mode.
        # WARNING: Do not activate without asking or knowing what you are doing.
        active: False

        # Sets the commit message to apply each time except for the last one.
        commit_message: "PyFunceble - AutoSave"

        # Sets the commit message to apply at the very end of the test.
        end_commit_message: "PyFunceble - Results"

        # Sets the number of minutes  to wait before sftarting to save and stop
        # a session.
        max_exec_minutes: 15

        # Sets the working branch. This is the branch from where we are testing.
        branch: master

        # Sets the distribution branch. This is the branch that is going to get
        # the (final) results.
        distribution_branch: master

        # Sets the command to execute before each commits except the last
        # one.
        command: null

        # Sets the command to execute before the last commit.
        end_command: null

Custom DNS Protocol

Why do we need it?

Sometimes, your firewall may block the UDP protocol over port 53 or you simply want to use DNS-Over-TLS or why not DNS-Over-HTTPS and why not DNS-Over-TCP.

Since PyFunceble 4.0.0, to simplify such situations, it is possible to define the protocol to use for the DNS queries.

How does it work?

Note

Want to read the DNS query tool source code ? It’s here DNSQueryTool!

We read your preferred protocol and use it.

How to use it?

By default, PyFunceble will use the UDP protocol. This can be changed with the ability to configure which DNS-Servers you like PyFunceble to use during the test.

You set this up with the CLI command --dns-protocol or insert it into your personal .PyFunceble.yaml.

Note

As of today, here is the list of supported protocols.

  • UDP (default)
  • TCP
  • HTTPS
  • TLS
dns:
    # Sets the protocol to use.
    # Available: UDP | TCP | HTTPS | TLS
    protocol: UDP

to

dns:
    # Sets the protocol to use.
    # Available: UDP | TCP | HTTPS | TLS
    protocol: TCP

Custom DNS Server

New in version 3.3.0.

Why do we need it?

Our testing tool may sometime use a DNS-server which isn’t suited for PyFunceble. This could by example be your own DNS-Firewall.

To avoid these situations, the program allows you to setup the DNS-Server that we need to use.

How does it work?

Note

Want to read the DNS query tool source code ? It’s here DNSQueryTool!

What we do is that we parse and use your given server.

How to use it?

By default, PyFunceble will use the system-wide DNS settings. This can be changed with the ability to configure which DNS-Servers you like PyFunceble to use during the test.

You set this up with the CLI command --dns or insert it into your personal .PyFunceble.yaml

dns;
    server: null

to

dns:
    server:
        - 88.198.70.39
        - 95.216.209.53
        - 116.203.32.67
        - 88.198.70.38

Changed in version 3.0.0.

It is now possible to assign a specific port to use with the DNS-Server.

If you don’t append a port number, the default DNS port (53) will be used.

$ pyfunceble --dns 88.198.70.38 95.216.209.53:53 116.203.32.67:853 \
    -f $DOMAIN_FILE

Custom User-Agent

Why do we need it?

As we need to be one in a middle of a connection to a webserver, the custom user agent is there for that!

How does it work?

We set the user-agent every time we request something with the http and https protocols.

If a custom user agent is given, it will be used.

Otherwise, every 24 hours, we update our user-agents.json file which will be fetched by your local version to determine the user-agent to use.

How to use it?

Simply choose your browser and platform or provide us your custom one!

user_agent:
    browser: chrome
    platform: linux
    custom: null

into your personal .PyFunceble.yaml or use the --user-agent (custom UA) argument from the CLI.

Available Browser

Here is a list of available and accepted browsers at this time.

  • chrome
  • edge
  • firefox
  • ie
  • opera
  • safari
Available Platform

Here is a list of available and accepted platform at this time.

  • linux
  • macosx
  • win10

What if we don’t give a custom User-Agent?

If you don’t set a custom User-Agent, we will try to get the latest one for the chosen browser and platform.

Databases

Why do we use “databases”?

We use databases to store data while we run the tests. When globally talking about databases, we are indirectly talking about the following subsystems.

  • Autocontinue
  • InactiveDB
  • WhoisDB

How do we manage them?

They consist of simple CSV files which are read and updated on the fly.

Warnings around Database (self) management

Warning

If you plan to delete everything and still manage to use PyFunceble in the future, please use the clean-pyfunceble CLI.

Indeed, it will delete everything that we generated, except the things like the WHOIS database file/table which saves (almost) static data which should be reused in the future.

Deleting, for example, the WHOIS database file/table will just make your test run for a much longer time if you retest subject that used to be indexed into the whois database file/table.

Databases types

Since PyFunceble 2.0.0 (equivalent of >=1.18.0.dev), we offer multiple database types which are (as per configuration) csv (default since 4.0.0), mariadb, mysql and postgresql.

Why different database types?

With the introduction of the multiprocessing logic, it became natural to introduce other database formats.

How to use the mysql or mariadb format?
  1. Create a new user, password and database (optional) for PyFunceble to work with.

  2. Create a .pyfunceble-env file at the root of your configuration directory.

  3. Complete it with the following content (example)

    PYFUNCEBLE_DB_CHARSET=utf8mb4
    PYFUNCEBLE_DB_HOST=localhost
    PYFUNCEBLE_DB_NAME=PyFunceble
    PYFUNCEBLE_DB_PASSWORD=Hello,World!
    PYFUNCEBLE_DB_PORT=3306
    PYFUNCEBLE_DB_USERNAME=pyfunceble
    

    Note

    Since version 2.4.3.dev it is possible to use the UNIX socket for the PYFUNCEBLE_DB_HOST environment variable.

    The typical location for mysqld.sock is /var/run/mysqld/mysqld.sock.

    This have been done to make

    1. It easier to use the socket in conjunction with a supported CI environment/platform.

    1. Leaving more space on the IP-stack on local DB installations.

    3. The UNIX:SOCKET is usually faster than the IP connection on local runs.

    PYFUNCEBLE_DB_CHARSET=utf8mb4
    PYFUNCEBLE_DB_HOST=/var/run/mysqld/mysqld.sock
    PYFUNCEBLE_DB_NAME=PyFunceble
    PYFUNCEBLE_DB_PASSWORD=Hello,World!
    PYFUNCEBLE_DB_PORT=3306
    PYFUNCEBLE_DB_USERNAME=pyfunceble
    
  4. Switch the db_type index of your configuration file to mysql or mariadb.

  5. Play with PyFunceble!

Note

If the environment variables are not found, you will be asked to prompt the information.

How to use the postgresql format?
  1. Create a new user, password and database (optional) for PyFunceble to work with.

  2. Create a .pyfunceble-env file at the root of your configuration directory.

  3. Complete it with the following content (example)

    PYFUNCEBLE_DB_CHARSET=utf8
    PYFUNCEBLE_DB_HOST=localhost
    PYFUNCEBLE_DB_NAME=PyFunceble
    PYFUNCEBLE_DB_PASSWORD=Hello,World!
    PYFUNCEBLE_DB_PORT=5432
    PYFUNCEBLE_DB_USERNAME=pyfunceble
    

    Note

    Since version 2.4.3.dev it is possible to use the UNIX socket for the PYFUNCEBLE_DB_HOST environment variable.

    The typical location for s.PGSQL.5432 is /var/run/postgresql.

    This have been done to make

    1. It easier to use the socket in conjunction with a supported CI environment/platform.

    1. Leaving more space on the IP-stack on local DB installations.

    3. The UNIX:SOCKET is usually faster than the IP connection on local runs.

    PYFUNCEBLE_DB_CHARSET=utf8
    PYFUNCEBLE_DB_HOST=/var/run/postgresql
    PYFUNCEBLE_DB_NAME=PyFunceble
    PYFUNCEBLE_DB_PASSWORD=Hello,World!
    PYFUNCEBLE_DB_PORT=5432
    PYFUNCEBLE_DB_USERNAME=pyfunceble
    
  4. Switch the db_type index of your configuration file to postgresql.

  5. Play with PyFunceble!

Note

If the environment variables are not found, you will be asked to prompt the information.

Directory Structure

Why do we need it?

As we wanted the end-user to be able to work from everywhere into the filesystem, we created a logic which will create and keep the output/ directory which complies with our source code.

How does it work?

Note

Want to read the code ? It’s here PyFunceble.cli.filesystem.dir_structure.backup.DirectoryStructureBackup and PyFunceble.cli.filesystem.dir_structure.backup.DirectoryStructureRestoration!

After each version, the maintainer run the production-pyfunceble CLI which will prepare the repository for production.

That has the side effect to map the maintainer’s version of the output/__pyfunceble_origin__ directory into a file called dir_structure_production.json which is then bundled into the PyPI package.

Once pushed, on the end-user side, when testing for file, that file is copied from the Python Package into a file called dir_structure.json which is then used to restore/create a a perfect copy of the output directory the maintainer had when pushing the new version.

DNS Lookup

Why do we need it?

As our main purpose is to check the availability of the given subjects, we make a DNS lookup to determine it.

How does it work?

For domains

In order:

  1. Request the NS record.
  2. If not found, request the A record.
  3. If not found, request the AAAA record.
  4. If not found, request the CNAME record.
  5. If not found, request the DNAME record.

Warning

If none is found, we call the UNIX/C equivalent of getaddrinfo().

For IP

We request the PTR record for the IP.

Warning

If none is found, we call the UNIX/C equivalent of gethostbyaddr() or getaddrinfo().

How to use it?

It is activated by default but if not simply change

lookup:
    # Activates the usage of the DNS lookup.
    dns: False

to

lookup:
    # Activates the usage of the DNS lookup.
    dns: True

into your personal .PyFunceble.yaml or use the --no-whois argument from the CLI to reactivate it.

Proxy Settings - Matcher

New in version 4.1.0b12.dev.

Why do we need it?

The primary need is the ability to delegate HTTP(s) queries to a proxy.

The secondary need is the ability to be able to delegate HTTPS(s) queries to a specif proxy server when a set of rules are matched.

How does it work?

The proxy settings matcher except a subject and return a JSON/dict with the proxy settings to use. The returned value is then use by our very own Request Adapter to process the request.

It will first try to extract the extension from the given subject. As example, if example.org is given, the extension will be org.

Then, it will go through the list of rules and check if the given extension is listed inside the proxy[rules][N][tld] list. If the extension is in the read list, the proxy settings matcher will return the provided proxy[rules][N][http] and proxy[rules][N][https] proxies.

If no rules is was matched, it will return the provided proxy[global][http] and proxy[global][https] proxies.

How to use it?

Simply provides your own own settings into your personal .PyFunceble.overwride.yaml file.

Example:

global:
  http: http://example.org:8080
  https: http://example.org:8080
rules:
  - http: http://example.com:8080
    https: http://example.org:8080
    tld:
      - com
      - org
      - dev
  - http: socks5h://example.dev:8080
    https: socks5h://example.dev:8080
    tld:
      - onion

Environment variables

Dotenv files

Since PyFunceble 2.0.0 (equivalent of PyFunceble-dev >=1.18.0), we load (thanks to python-dotenv) the content of the following files into the (local) list of environment variables.

  1. .env (current directory)
  2. .pyfunceble-env (current directory)
  3. .env (configuration directory)
  4. .pyfunceble-env (configuration directory)

To quote the python-dotenv documentation, a .env should look like the following:

# a comment and that will be ignored.
REDIS_ADDRESS=localhost:6379
MEANING_OF_LIFE=42
MULTILINE_VAR="hello\nworld"

What do we use and why ?

Here is the list of environment variables we use and how we use them if they are set.

Execution time

Warning

This component is not activated by default.

Why do we need it?

As it is always nice to see how long we worked, we added this logic!

How does it work?

Note

Want to read the code ? It’s here PyFunceble.cli.execution_time.ExecutionTime!

It shows the execution time on screen (stdout).

How to use it?

You can simply change

display_mode:
    # Activates the printing of the execution time.
    execution_time: False

to

display_mode:
    # Activates the printing of the execution time.
    execution_time: True

into your personal .PyFunceble.yaml or use the --execution argument from the CLI to activate it.

Expiration Date

Why do we need it?

As we want to determine the availability from the WHOIS record - if available, we need to extract and provide the expiration date.

How does it work?

After the query of the WHOIS record, it is parsed so that we can extract the expiration date.

When successful, a date in the format 09-oct-1970 is provided to the end-user. Otherwise, null is provided to those using the API and Unknown to those using the CLI.

How to use it?

You can simply allow the usage of the WHOIS lookup through:

  • the (Python) API,
  • the CLI argument,
  • or, your configuration file.

List filtering

Warning

This component is not activated by default.

Why do we need it?

While testing for file, you may find yourself in a situation where you only want to test subject which matches a given pattern. That’s what this component do.

How does it work?

We scan the list against the given pattern/regex and only test those who match it.

How to use it?

You can simply change

cli_testing:
    # Sets the filter to apply while reading the given input.
    # For example, if you give `\.info`, we will only test the subjects
    # who match `\.info`.
    file_filter: null

to

cli_testing:
    # Sets the filter to apply while reading the given input.
    # For example, if you give `\.info`, we will only test the subjects
    # who match `\.info`.
    file_filter: "\.org"

(for example)

into your personal .PyFunceble.yaml or use the --filter argument from the CLI.

HTTP Status Code

Why do we need it?

As we want to determine the availability of a domain, IP, or URL; one of our testing method is the gathering of the HTTP status code.

How does it work?

Note

We never send a generic User-Agent. You can define your own or let PyFunceble choose one of the latest one of one of the major browser for you.

When it is the turn of the HTTP status code lookup tool to try to gather a status for the given subject, an HTTP query is made to the given IP, domain or subject.

When testing for a domain, a successful HTTP response is considered as ACTIVE.

Otherwise, the following default classification applies.

Note

The classification can be changed by end-user through their configuration file.

As ACTIVE

Please note that the following HTTP status codes are considered as ACTIVE.

If you are using the CLI with the analytic files generated, you will get any matching subject flagged as ACTIVE officially and into your analytic files.

  • 100: Continue
  • 101: Switching Protocols
  • 102: Processing
  • 200: OK
  • 201: Created
  • 202: Accepted
  • 203: Non-Authoritative Information
  • 204: No Content
  • 205: Reset Content
  • 206: Partial Content
  • 207: Multi-Status
  • 208: Already Reported
  • 226: IM User
  • 429: Too Many Request.
As potentially ACTIVE

Please note that the following HTTP status codes are considered as potentially ACTIVE but still officially reported as ACTIVE when caught.

If you are using the CLI with the analytic files generated, you will get any matching subject flagged as ACTIVE officially and into your analytic files as potentially ACTIVE.

  • 300: Multiple Choices
  • 301: Moved Permanently
  • 302: Found
  • 303: See Other
  • 304: Not Modified
  • 305: Use Proxy
  • 307: Temporary Redirect
  • 308: Permanent Redirect
  • 403: Forbidden
  • 405: Method Not Allowed
  • 406: Not Acceptable
  • 407: Proxy Authentication Required
  • 408: Request Timeout
  • 411: Length Required
  • 413: Payload Too Large
  • 417: Expectation Failed
  • 418: I’m a teapot
  • 421: Misdirect Request
  • 422: Unprocessable Entity
  • 423: Locked
  • 424: Failed Dependency
  • 426: Upgrade Required
  • 428: Precondition Required
  • 431: Request Header Fields Too Large
  • 500: Internal Server Error
  • 501: Not Implemented
  • 502: Bad Gateway
  • 503: Service Unavailable
  • 504: Gateway Timeout
  • 505: HTTP Version Not Supported
  • 506: Variant Also Negotiates
  • 507: Insufficient Storage
  • 508: Loop Detected
  • 510: Not Extended
  • 511: Network Authentication Required
As INACTIVE or potentially INACTIVE

Please note that the following HTTP status codes are considered as INACTIVE or potentially INACTIVE. Therefore officially reported as INACTIVE when caught.

If you are using the CLI with the analytic files generated, you will get any matching subject flagged as INACTIVE officially and into your analytic files as potentially INACTIVE.

  • 400: Bad Request
  • 402: Payment Required
  • 404: Not Found
  • 409: Conflict
  • 410: Gone
  • 412: Precondition Failed
  • 414: Request-URI Too Long
  • 415: Unsupported Media Type
  • 416: Request Range Not Satisfiable
  • 451: Unavailable For Legal Reasons

How to use it?

You can simply allow the usage of the HTTP status code lookup through:

  • the (Python) API,
  • the CLI argument,
  • or, your configuration file.

IANA Root Zone Database

Why do we need it?

We use it to check if an extension is valid/exists.

How does it work?

Note

Want to read the parser code ? It’s here IanaDBGenerator!

The root zone database is saved into the iana-domains-db.json file. It is formatted like below and is automatically merged for the end-user before each test run.

{
    "extension": "whois_server"
}

In-app, while testing for a domain, we check if the extension is listed there before doing some extra verifications. If not, domain(s) will be flagged as INVALID.

How to generate it manually?

You can’t and should not as we are automatically generating it every 24 hours. But using the iana-pyfunceble CLI will do the job on purpose.

Test in/for local hostnames, IPs, components

Warning

This component is not activated by default.

Why do we need it?

As we may need to test for local hostnames, IPs, components in a local network, this component allows a less aggressive way of syntax validation.

How does it work?

We simply use a less aggressive syntax validation so that everything you give us is being tested.

How to use it?

Simply change

cli_testing:
   # Acknowleadges that we may test for local network component.
   # NOTE: Activating this, will remove the syntax checker completely.
   local_network: False

to

cli_testing:
   # Acknowleadges that we may test for local network component.
   # NOTE: Activating this, will remove the syntax checker completely.
   local_network: True

into your personal .PyFunceble.yaml or use the --local argument from the CLI to activate it.

Logs Sharing

Note

This component is not activated by default.

Why do we need it?

We chose to initiate the logs sharing as some actions can really be random when working with millions of domains.

The idea and purpose of this feature are ONLY to make PyFunceble a better tool.

What is collected

Changed in version 4.0.0.

As of 4.0.0, we temporarly disabled and removed all data collection.

Indeed, I need to rewrite the infrastructure behind it. Therefore, I refused to implement any of the data collection source code until the infrastructure behind it is ready.

Warning

The following table only represent the option as available in the 3.x version of PyFunceble.

Event Shared URL
No WHOIS server (referrer) is found.
  • The extension of the currently tested domain.
https://pyfunceble.funilrys.com/api/no-referrer
The expiration date is not correctly formatted.
  • The extracted expiration date.
  • The currently tested domain.
  • The currently used WHOIS server (DNS) name.
https://pyfunceble.funilrys.com/api/date-format

How to share logs?

If you wish to share your logs simply change

share_logs:                   False

to

share_logs:                   True

into your personal .PyFunceble.yaml or use the --share-logs argument from the CLI to activate it.

Mining

Warning

This component is not activated by default.

Why do we need it?

Sometimes you might, for example, want to get the list of domain(s) / URL(s) in a redirecting loop. This feature reveals them.

How does it work?

Note

Want to read the code ? It’s here MinerWorker!

We access the given domain/URL and get the redirection history which we then test once we finished the normal test.

Warning

This component might evolve with time.

How to use it?

You can simply change

cli_testing:
    # Activates the mining of data.
    mining: False

to

cli_testing:
    # Activates the mining of data.
    mining: True

into your personal .PyFunceble.yaml or use the --mining argument from the CLI to activate it.

Multiprocessing

Why do we need it?

Many people around the web who talked about PyFunceble were talking about one thing: We take time to run.

In the past, we implemented what was then called the “multiprocessing” method. As of 4.0.0, we went away from the original multiprocessing logic. The reason behind it was that the multiprocessing method we developed at the time was becoming a nightmare to manage because we always had to take into consideration that a process does not have access to the memory space of the main process.

Therefore, we decided to rewrite it to be a bit more efficient. In the new layout, we work with queues to split the testing work through multiple test workers. That simplifies our data workflow and maintainability.

How does it work?

We read the given inputs, add them into some queues and generate some outputs through other queues or processes.

Here is a short representation of the process model behind the CLI testing:

PyFunceble CLI Thread Model

How to use it?

As of 4.0.0, you don’t have the choice. It is available and is systematically used as soon as you use the PyFunceble CLI.

But, you can control the maximum about of test worker through the --max-workers argument or its configuration counterpart:

cli_testing:
    # Sets the number of maximal workers to use.
    # If set to null, the system use: CPU * Cores - 2
    max_workers: null

Outputted Files

Note

This section does not cover the log files.

Why do we need it?

We need a way to deliver our results.

How does it work?

After testing a given subject, we generate its output file based on what’s needed.

Host format

This is the default output file.

A line is formatted like 0.0.0.0 example.org.

Note

A custom IP can be set with the help of the custom_ip index or the --hosts-ip argument from the CLI.

Don’t need it? Simply change

cli_testing:
    file_generation:
        # Activates the generation of the hosts file(s).
        hosts: False

to

cli_testing:
    file_generation:
        # Activates the generation of the hosts file(s).
        hosts: False

into your personal .PyFunceble.yaml or use the --hosts argument from the CLI to deactivate it.

Plain format

A line is formatted like example.org.

Need it? Simply change

cli_testing:
    file_generation:
        # Activates the generation of the plain (or raw) file(s).
        plain: False

to

cli_testing:
     file_generation:
         # Activates the generation of the plain (or raw) file(s).
         plain: True

into your personal .PyFunceble.yaml or use the --plain argument from the CLI to activate it.

Percentage

Warning

This component is activated by default while testing files.

Note

The percentage doesn’t show up - by design - while testing for single subjects.

Why do we need it?

We need it in order to get information about the amount of data we just tested.

How does it work?

Note

Want to read the code ? It’s here FilesystemCounter!

Regularly or at the very end of a test we get the number of subjects for each status along with the number of tested subjects. We then generate and print the percentage calculation on the screen (stdout) and into output/${input_file_name}/logs/percentage/percentage.txt

How to use it?

It is activated by default, but if not please update

cli_testing:
    display_mode:
        # Activates the output of the percentage information.
        percentage: False

to

cli_testing:
    display_mode:
        # Activates the output of the percentage information.
        percentage: True

into your personal .PyFunceble.yaml or use the --percentage argument from the CLI to reactivate it.

The Public Suffix List

Why do we need it?

We use it in the process of checking the validity of domains.

How does it work?

Note

Want to read the parser code ? It’s here PublicSuffixGenerator!

The copy of the public suffix list we use is saved into the public-suffix.json file. It is formatted like below and is (periodically) automatically merged for the end-user before each test run.

{
    "extension": [
        "suffix1.extension",
        "suffix2.extension",
        "suffix3.extension"
    ]
}

In-app, while testing for domain(s), we use it to know if we are checking for a subdomain or not.

How to generate it manually?

You can’t and should not as we are automatically generating it every 24 hours. But, using the public-suffix-pyfunceble CLI will do the job on purpose.

Sorting

Note

While using the multiprocessing option, the data are tested as given.

Why do we need it?

Because sorted is better, we sort by default!

How does it work?

Note

Want to read the code ? It’s here: standard() and hierarchical()!

Alphabetically

This is the default one. The standard() function is used for that purpose.

Hierarchically

The objective of this is to provide sorting by service/domains.

The hierarchical() function is used for that purpose.

Note

This is a simplified version of what we do.

  1. Let’s say we have aaa.bbb.ccc.tdl.

    Note

    The TDL part is determined. Indeed we first look at the IANA Root Zone database, then at the Public Suffix List.

  2. Let’s split the points. We then get a list [aaa, bbb, ccc, tdl]

  3. Put the TDL first. It will gives us [tdl, aaa, bbb, ccc]

  4. Reverse everything after the TDL. It will gives us [tdl, ccc, bbb, aaa].

  5. Get the string to use for sorting. It will gives us tdl.ccc.bbb.aaa.

How to activate the hierarchical sorting?

Simply change

cli_testing:
    sorting_mode:
        # Activates the hierarchical sorting.
        hierarchical: False

to

cli_testing:
    sorting_mode:
        # Activates the hierarchical sorting.
        hierarchical: True

into your personal .PyFunceble.yaml or use the --hierarchical argument from the CLI to activate it.

SPECIAL rules

Why do we need it?

As PyFunceble grew up, I thought that a bit of filtering for special cases would be great to introduce. That where the idea came from.

How does it work?

Note

For any new suggestion of domains where a special rule can enhance PyFunceble please either open a new issue or make your contribution directly into the project.

Note

Contribution to the SPECIAL rules

To add directly to the special rules please modify both the source code extra_rules.py and the documentation (here).

Below is the list of all special rules that are implemented into PyFunceble. Please keep in mind that you can disable the usage those rules at any time.


IP range

Any IPv4 and IPv6 ranges are supplied as ACTIVE.


How to use it?

Special rules are activated by default, but you can switch its usage through:

  • the (Python) API,
  • the CLI argument,
  • or, your configuration file.

Parked Subjects

WARNING: This optiona is not available yet.

Any subjects that are considered parked by PyFunceble are supplied as INACTIVE.


ChangeIP.com Platform domains

Any subjects that are part of the known ChangeIP.com platform domains which contain abuse.changeip.com. in their SOA record are supplied as INACTIVE.

Here is a rough list of the affected domains:

  • 25u.com
  • 2waky.com
  • 3-a.net
  • 4dq.com
  • 4pu.com
  • acmetoy.com
  • almostmy.com
  • americanunfinished.com
  • as19557.net
  • authorizeddns.net
  • authorizeddns.org
  • authorizeddns.us
  • b0tnet.com
  • bigmoney.biz
  • changeip.biz
  • changeip.co
  • changeip.net
  • changeip.org
  • changeip.us
  • cleansite.biz
  • cleansite.info
  • cleansite.us
  • ddns.info
  • ddns.mobi
  • ddns.ms
  • ddns.us
  • dhcp.biz
  • dns-dns.com
  • dns-report.com
  • dns-stuff.com
  • dns04.com
  • dns05.com
  • dns1.us
  • dns2.us
  • dnset.com
  • dnsfailover.net
  • dnsrd.com
  • dsmtp.biz
  • dsmtp.com
  • dubya.biz
  • dubya.info
  • dubya.net
  • dubya.us
  • dumb1.com
  • dynamic-dns.net
  • dynamicdns.biz
  • dynssl.com
  • edns.biz
  • esmtp.biz
  • ezua.com
  • faqserv.com
  • fartit.com
  • freeddns.com
  • freetcp.com
  • freewww.biz
  • freewww.info
  • ftp1.biz
  • ftpserver.biz
  • gettrials.com
  • got-game.org
  • gr8domain.biz
  • gr8name.biz
  • homingbeacon.net
  • https443.net
  • https443.org
  • ikwb.com
  • instanthq.com
  • iownyour.biz
  • iownyour.org
  • isasecret.com
  • itemdb.com
  • itsaol.com
  • jetos.com
  • jkub.com
  • jungleheart.com
  • justdied.com
  • lflink.com
  • lflinkup.com
  • lflinkup.net
  • lflinkup.org
  • longmusic.com
  • mefound.com
  • misecure.com
  • moneyhome.biz
  • mrbasic.com
  • mrbonus.com
  • mrface.com
  • mrslove.com
  • my03.com
  • mydad.info
  • myddns.com
  • myftp.info
  • mylftv.com
  • mymom.info
  • mynetav.com
  • mynetav.net
  • mynetav.org
  • mynumber.org
  • mypicture.info
  • mypop3.net
  • mypop3.org
  • mysecondarydns.com
  • mywww.biz
  • myz.info
  • ninth.biz
  • ns01.biz
  • ns01.info
  • ns01.us
  • ns02.biz
  • ns02.info
  • ns02.us
  • ns1.name
  • ns2.name
  • ns3.name
  • ocry.com
  • onedumb.com
  • onmypc.biz
  • onmypc.info
  • onmypc.net
  • onmypc.org
  • onmypc.us
  • organiccrap.com
  • otzo.com
  • ourhobby.com
  • port25.biz
  • proxydns.com
  • qhigh.com
  • qpoe.com
  • rebatesrule.net
  • sendsmtp.com
  • serveuser.com
  • serveusers.com
  • sexidude.com
  • sexxxy.biz
  • sixth.biz
  • squirly.info
  • ssl443.org
  • ssmailer.com
  • toh.info
  • toshibanetcam.com
  • toythieves.com
  • trickip.net
  • trickip.org
  • vizvaz.com
  • wikaba.com
  • www1.biz
  • wwwhost.biz
  • wwwhost.us
  • x24hr.com
  • xxuz.com
  • xxxy.biz
  • xxxy.info
  • ygto.com
  • youdontcare.com
  • yourtrap.com
  • zyns.com
  • zzux.com

*.000webhostapp.com

Any subjects matching the given pattern and the 410 status code are supplied as INACTIVE.


*.24.eu

Any subjects matching the given pattern and the 503 status code are supplied as INACTIVE.


*.altervista.org

New in version 4.1.0b13.

Any subjects matching the given pattern and the 403 status code are supplied as INACTIVE.


*.angelfire.com

Any subjects matching the given pattern and the 404 status code are supplied as INACTIVE.


*.blogspot.*

Any subjects matching the given pattern and:

  • the 404 status code
  • the 301 status code that does not exists or are blocked by Google
  • the 303 status code that are blocked by Google

are supplied as INACTIVE.


*.canalblog.com

Any subjects matching the given pattern and the 404 status code are supplied as INACTIVE.


*.dr.ag

Any subjects matching the given pattern and the 503 status code are supplied as INACTIVE.


*.fc2.com

Any subjects matching the given pattern and the error.fc2.com subdomain is into the Location headers are supplied as INACTIVE.


*.github.io

Any subjects matching the given pattern and the 404 status code are supplied as INACTIVE.


*.godaddysites.com

Any subjects matching the given pattern and the 404 status codes are supplied as INACTIVE.


*.hpg.com.br

Any subjects matching the given pattern and the 404 status code are supplied as INACTIVE.


*.imgur.com

Any subjects matching the given pattern and:

  • the /removed.png path in the end URL (after redirect).

are supplied as INACTIVE.


*.liveadvert.com

Any subjects matching the given pattern and the 404 status code are supplied as INACTIVE.


*.skyrock.com

Any subjects matching the given pattern and the 404 status code are supplied as INACTIVE.


*.tumblr.com

Any subjects matching the given pattern and the 404 status code are supplied as INACTIVE.


*.weebly.com

Any subjects matching the given pattern and the 404 status code are supplied as INACTIVE.


*.wix.com

Any subjects matching the given pattern and the 404 status code are supplied as INACTIVE.


*.wordpress.com

Any subjects matching the given pattern and the 301 status code along with the pattern doesn’t exist are supplied as INACTIVE.

Status

Why do we need it?

We use it to provide a representation of the availability, syntax, or reputation of a given subject.

How does it work?

Multiple statuses are available to each checker. Each has its meaning and root.

INVALID

This the status that is supplied by the availability, syntax, or reputation checkers when the given subject is INVALID.

It is provided the subject does not pass our internal syntax checker.

The internal syntax checker analyzes the following against the given subject:

  • If you are testing for a domain, is the extension registered in the IANA Root Zone Database?
  • If you are testing for an IP, is it a valid IP (v4 or v6)?
  • If you are testing for a URL, is it a valid one?

Warning

While using the CLI against a local network, this is ignored.

ACTIVE

This is the status that is supplied by the availability checker.

It is provided when one of the following is effective:

  • We could query the WHOIS record and extract the expiration date out of it.
  • We could query any of the NS, A, AAAA, CNAME or DNAME of the given subject.
  • We could query the network information of the given subject.
  • We could query the HTTP status code of the given subject.
VALID

This is the status that is supplied by the syntax checker.

It is provided when the syntax check of the given subject was successful.

Consider it as the equivalent of ACTIVE but for syntax checking.

MALICIOUS

This is the status that is supplied by the reputation checker.

It is provided when the following is effective:

  • If you are testing for a domain, is its IPv4 known to be malicious?
  • If you are testing for an IP, is its IPv4 known to be malicious?
  • If you are testing for a URL, is the IPv4 of the hostname known to be malicious?
SANE

This is the status that is supplied by the reputation checker when the MALICIOUS status is not effective.

Status Source

Why do we need it?

We use it to provide a representation of the testing method that led to the status.

How does it work?

Multiple status sources are available. Each has its meaning and root.

SYNTAX

This is the status source that is supplied when the syntax is the reason behind the status. It is exclusively followed by the INVALID status.

You may find this status source behind the availability, syntax, or reputation checkers.

DNSLOOKUP

This is the status source that is supplied when the DNS lookup is the reason behind the status. It is generally followed by either the ACTIVE or INACTIVE status.

You will find this status source exclusively behind the availability checker.

NETINFO

This is the status source that is supplied when the Network Information is the reason behind the status. It is exclusively followed by the ACTIVE status.

You will find this status source exclusively behind the availability checker.

HTTP CODE

This is the status source that is supplied when the HTTP Status Code is the reason behind the status. It is generally followed by either the ACTIVE, or INACTIVE status.

You will find this status source exclusively behind the availability checker.

REPUTATION

This is the status source that is supplied when the reputation lookup is the reason behind the status. It is generally followed by either the ACTIVE, SANE, or MALICIOUS status.

You may find this status source behind the availability or reputation checkers.

SPECIAL

This is the status source that is supplied when our own sets of special rules are the reasons behind the status. It is generally followed by either the ACTIVE, or INACTIVE status.

You will find this status source exclusively behind the availability checker.

Whois Lookup

Note

While testing using PyFunceble, subdomains, IPv4 and IPv6 are not used against our whois lookup logic.

Why do we need it?

As our main purpose is to check the availability of the given subjects, we make a WHOIS lookup (if authorized) to determine it.

How does it work?

Note

Want to read the code ? It’s here WhoisQueryTool!

For us the only relevant part is the extraction of the expiration date. Indeed, it’s an indicator if a domains is still owned by someone, we use it first to get the availability of domains.

How to use it?

It is activated by default but if not simply change

lookup:
    # Activates the usage of the WHOIS record.
    whois: False

to

lookup:
    # Activates the usage of the WHOIS record.
    whois: True

into your personal .PyFunceble.yaml or use the --no-whois argument from the CLI to reactivate it.

Contribute

Submit changes

Before anything, please keep in mind the following. If one or more of those conditions are not filled. Your Pull Request to PyFunceble may not be merged.

The master branch is used only for releasing a new or stable version of the code. That’s why we require that all contributions/modifications must be done under the dev or a new branch.

In order to gain some time and also understand what you are working on, your pull requests submission as long as your commit descriptions should be clear and complete as much as possible. We do an exception to commit with minor changed but big changes should have a complete description.

Please ensure to use the following method when committing a big change.

Coding conventions

Format

  1. We should format our code with Black, The uncompromising Python code formatter.
  2. We should write docstrings for every public method, function and classes. It does not have to be elaborate. Just explain what it simply does!
$ black PyFunceble && black tests

Note

You can avoid this secion if you use the production-pyfunceble CLI which already handles as musch as possible.

Linting

Our code should pass a pylint check without any issue (exit 0).

$ pylint PyFunceble && pylint tests

Coverage

Our code should have at least 60% of coverage.

Note

Coverage unrelevant code/files can be muted.

$ coverage run setup.py test && coverage report -m

Distribution

Our code should be shipped (after each commit) with a new version and a new version.yaml file. That file should ALWAYS be generated with the following.

Note

An exception is granted for detached branch (not dev nor master) and no code changes.

$ # Prepare our files, :code:`version.yaml` and code for production/dev usage.
$ PyFunceble --production

Commit

All your commits should be - when possible - be signed with PGP. (More information can be found on GitHub documentation) Please note the usage of -S into the commit command which means that we sign the commit.

The commit message may be formatted like follow:

Note

An exception is granted for no code changes.

::

Short explanation (max 79 char).

Paragraphs with some details/context (if needed).

Git Hook

If one may want to automate the process.

Here is a git hook (as proposition) to be set into .git/hooks/pre-commit.

#!/usr/bin/env bash

# We print what's going on.
set -x
# We stop on error.
set -e

# We get top level path.
rootDirectory="$(git rev-parse --show-toplevel)"
# We construct our list of directories.
ourDirectories="${rootDirectory}/PyFunceble ${rootDirectory}/tests"

if [[ ! -z "$(git status --porcelain | awk '{ if ($NF > 0 && substr($1,1,1) != "?" && $2 ~ '/\.py/' ) print $2}')" ]]
then
        hash find
        hash isort
        hash black
        hash pylint
        hash coverage

        for directory in $(echo ${ourDirectories})
        do
                # We sort the imports.
                find "${directory}" -name "*.py" -exec isort {} \;
                # We format the code.
                black "${directory}"
                # We lint the code.
                pylint "${directory}"
        done

        cd "${rootDirectory}"
        coverage run setup.py test
fi

set +e
set +x
exit 0

Dead-Hosts

Why Dead-Hosts?

We are conscient that PyFunceble may run for days. We would therefore offer you, to have your list. Request for Dead-Hosts testing.

How do Dead-Hosts work?

Dead-Hosts is like a wrapper of PyFunceble. Indeed, we use Travis CI containers in order to test lists with PyFunceble.

Once a list is set up inside our infrastructure, PyFunceble will test the list regularly and the Dead-Hosts infrastructure will produce a clean.list file which represents the list of domains/IP/URL which remains or became ACTIVE.

In addition, if needed, we can set up a list of GitHub username to @ping once a new test is finished.

Do you want your list to be tested at Dead-Hosts ? You can request it !

History of Dead-Hosts

The project started on 3rd March 2017 at funilrys/dead-hosts.

The original idea was to test Funceble against hosts file in order to find bugs inside Funceble but also letting me (@funilrys) have a shorter hosts file.

On 23rd January 2018, I (@funilrys) decided to shut down funilrys/dead-hosts , as it became impossible to test all members of the project without having to wait for weeks. I then decided it was time to move on to another level.

That was the beginning of Dead-Hosts.

Today Dead-Hosts’s is objective to provide project and lists to maintainers or individuals, with the help of PyFunceble, to provide more information about their favourite project/list or domains, IP or URL.

Frequently Asked Questions

How to speed up the test process?

Warning

Beware, when talking about speed a lot of things have to be taken into consideration. Indeed here is a non-exhaustive list of things that fluctuate the testing speed.

  • Bandwidth.
  • DNS Server response time.
  • CPU.
  • ISP’s who blocks a big amount of connection to the outside world.
  • Our databases management (do not apply for PostgreSQL, MySQL and MariaDB format).
  • Amount of data to test.
  • Disk I/O in particular as PyFunceble is heavy on the I/O * RamDrives and NVME disks are very suitable for PyFunceble CSV db.

I have a dedicated server or machine just for PyFunceble

Simply increase the number of maximal workers PyFunceble is allowed to use through the –max-workers argument.

By default, the number of workers is equal to:

CPU CORES - 2

meaning that if you have 8 CPU threads, the value will be automatically set to 6.

If that’s not sufficient for you, you may try the dangerous –chancy argument.

Warning

Keep in mind that the --max-workers (-w) mostly - if not only - affects the tester processes. Because we want to safely write the files(Disk I/O), we still need a single process that reads the submitted results and generates the outputs.

The reason we added this to PyFunceble 4.0.0 is we don’t want to have a wrongly formatted file output.

Setup and use ramfs

What is a ramfs and why not use tmpfs?

ramfs is better than tmpfs when data needs to be secret, since ramfs data never gets swapped (saved to a physical storage drive), while tmpfs may get swapped. Third parties who later gain root or physical access to the machine then can inspect the swap space and extract sensitive data.

The HOWTO solution

You can prepare ramfs mount so any non-privileged user can mount/unmount it on-demand.

To do this, you will need root privilege, once. Ask the administrator of your system to set this up for you, if you lack root privileges.

At first, you need to add a line to the /etc/fstab. The line in fstab may look like this:

  • /mnt/ramfs is a mount point, where the ramfs filesystem will be mounted. Directory most exist.
  • noauto option prevents this from being mounted automatically (e.g. at system’s boot-up).
  • user makes this mountable by regular users.
  • size sets this “ramdisk’s” size (you can use M and G here)
  • mode is very important, with the octal :code 0770 only root and user, who mounted this filesystem, will be able to read and write to it, not the others (you may use different :code of your choice as well, but be very sure about it!).

Note

We recommend you to set the file mode to 0777 in case you are using this in relation to any kind of scripting, to ensure subprocesses have access to the file(s). In all other cases, you should set the folder permision to 0770.

Mount

$ mount /mnt/ramfs/

Unmount

$ umount /mnt/ramfs/

This chapter has practically been copied from https://unix.stackexchange.com/a/325421 creditted to Neurotransmitter as it is well written and cover our purpose for describing how to setup a ramFS to be used for testing with PyFunceble.

Next, we need to configure PyFunceble to use the newly created and mounted ramFS. This is done with the PYFUNCEBLE_OUTPUT_LOCATION ; now all outputs are stored in the ramFS, so remember to copy the results to a stationary file path when you are done.

Next time you are going to run a test with PyFunceble are will do:
  1. Mount the ramFS
  2. Copy the last test results to the ramFS
  3. Run your test
  4. Copy your results from ramFS to a stationary file path.

Known issues

This is the list of issues which are not or will not be fixed (yet…).

  • Under Travis CI the coloration may not be shown.
  • Under GitLab CI/CD the coloration may not be shown.

Python < 3.8

Changed in version 4.2.0.

As of version 4.2.0 we no longer support python prior to version 3.8.

This means you actually are unable to run with any version below python 3.8 as a number of build-in features may be missing or first introduced in 3.8.


Ubuntu 20.04.1 LTS Focal

New in version 3.2.0.

In Ubuntu release 20.04 they have removed a package name libffi.so.6 and upgraded it with version libffi.so.7

This means PyFunceble will trow an error like:

ImportError: libffi.so.6: cannot open shared object file: No such file or directory

The fix for this issue is then rather simple, add a softlink between the versions with ln -s

The complete line in my case was:

sudo ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6

However, the right way to do this is by first locate where your libffi.so.7 is with find

find /usr/lib/ -type f -iname 'libffi.so.*'

Then apply the softlink to libffi.so.7

Combination of -f, -uf and --adblock

You can not combine the usage of -f, -uf with --adblock simultaneously.


Sql Missing default data in whois table

New in version 4.0.0.

If you are trying to move or restore your SQL database from a dump, you will see an error message that is looking something like this

SQL Error [1364][HY000]: (conn=12345678) Field 'created_at' doesn't have a default value
  (conn=12345678) Field 'created_at' doesn't have a default value
  (conn=12345678) Field 'created_at' doesn't have a default value
    Field 'created_at' doesn't have a default value

The issue arises from the way SQLAlchemy is creating the tables. The fact is PyFunceble is written to set a default date for the :code:’created_at`.

However, it isn’t set in the database.

To solve this, you will have to manually set the default for created_at to for example 2020-12-22 09:09:50 in the DB_name.pyfunceble_whois_record. You can for example use dBeaver to do this or manually run this SQL code insode your database.

ALTER TABLE DB_name.pyfunceble_whois_record
    MODIFY COLUMN created_at datetime
    DEFAULT '2020-12-22 09:09:50'
    NOT NULL;

Warning

These changes will be reset next time you are running PyFunceble.


Windows Powershell with Python or Cygwin

New in version all.

There are a number of well Known limitation by running or even installing Python on a closed source Windows computer.

Among these issues is the default settings for the installation programs, where we all know the users tend to just click next next next without reading the questions, and the path toward hell continues.

  1. To have Python to become installed within the system PATH: by the installer, you are required to use the advanced install option. (spirillen Was told).
  2. Cygwin do not INCLUDE- and therefore not exporting current PATH to running environment. Full path is always required, to be set by your scripts or command line.

Since any of these problems, ain’t @PyFunceble related issues we have left a Cygwin related issue at github.

Discovered an issue?

Want to talk with @funilrys about it? Contact @funilrys on Keybase.

Want to make it public? Fill out a new issue.

Don’t want to fill out an issue on GitHub? Let’s discuss it through a new discussion on GitHub.

Need help?

Do you need help with the usage of PyFunceble? We can help!

Submit a new discussion (NOT ISSUE) on GitHub or contact one of our contributors directly.

Need information?

You can get information and discuss about PyFunceble on our issue board (GitHub) or ask your question through a new discussion on GitHub. @Funilrys (me) will do his best to keep it up-to-date with some information about the development and other news about PyFunceble.

Code Documentation

PyFunceble package

Subpackages

PyFunceble.checker package
Subpackages
PyFunceble.checker.availability package
Subpackages
PyFunceble.checker.availability.extras package
Submodules
PyFunceble.checker.availability.extras.base module

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

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

Provides the base of all extra handlers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.extras.base.ExtraRuleHandlerBase(status: Optional[PyFunceble.checker.availability.status.AvailabilityCheckerStatus] = None)[source]

Bases: object

Provides the base of all extra rules handler.

Parameters:statatus – The previously gathered status.
dns_query_tool = None
do_dns_lookup(*, subject: str, query_type: str) → List[str][source]

Do a DNS lookup and return its response.

Parameters:
  • subject – The subject to query.
  • query_type – The query type.
do_on_body_match(url: str, matches: List[str], *, method: Callable[[...], ExtraRuleHandlerBase], match_mode: str = 'regex', strict: bool = False, allow_redirects: bool = False) → PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase[source]

Make a request to the given url and run the given method, if one of the given matches matches.

Parameters:
  • url – The URL to query.
  • matches – A list of strings to match.
  • match_mode – A matching mode. Use regex for a regex match, and anything else for a string match.
  • strict – Whether we should match any (False) or all (True).
do_on_header_match(url: str, matches: Dict[str, List[str]], *, method: Callable[[...], ExtraRuleHandlerBase], match_mode: str = 'regex', strict: bool = False, allow_redirects: bool = True) → PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase[source]

Make a request to the given url and run the given method, if one of the chosen header matches any of the given matches.

Parameters:
  • url – The URL to query.
  • matches – A dict representing the match.
  • match_mode – A matching mode. Use regex for a regex match, and anything else for a string match.
  • strict – Whether we should match any (False) or all (True).
  • allow_redirects – Whether we should allow redirect.
do_request(*, allow_redirects: bool = True) → requests.models.Response[source]

Do a request and store its response into the req attribute.

Parameters:allow_redirects (bool) – Whether we shoold follow the redirection - or not.
ensure_status_is_given()[source]

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

Raises:TypeError – If the subject is not a string.
regex_helper = None
req = None
req_url

Provides a viable request URL.

req_url_https

Provides a viable request URL that default to an HTTPS URL.

set_status(value: PyFunceble.checker.availability.status.AvailabilityCheckerStatus) → PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase[source]

Sets the status to work with.

Parameters:value – The status to work with.
setup_status_after()[source]

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

Raises:TypeError – If the subject is not a string.
setup_status_before()[source]

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

Raises:TypeError – If the subject is not a string.
start() → PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase[source]

Starts the gathering process.

status

Provides the current state of the _status attribute.

switch_down_if_dns_match(query_type: str, matches: list) → PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase[source]

Switches the status to inactive if the DNS query of the type query_type matches any of the given matches.

Parameters:
  • query_type – A DNS query type.
  • matches – A list of string (not regex) to match.
switch_to_down() → PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase[source]

Switches the status to inactive.

switch_to_down_if_status_code(status_code: Union[int, List[int]]) → PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase[source]

Switches the status to inactive if the caught status code matches one of the given one.

switch_to_up() → PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase[source]

Switches the status to active.

PyFunceble.checker.availability.extras.dns module

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

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

Provides the extra rules handler based on some DNS records.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.extras.dns.DNSRulesHandler(status: Optional[PyFunceble.checker.availability.status.AvailabilityCheckerStatus] = None)[source]

Bases: PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase

Provides our very own sets of DNS based rules.

Parameters:status (AvailabilityCheckerStatus) – The previously gathered status.
rulesets = {}
start() → PyFunceble.checker.availability.extras.dns.DNSRulesHandler[source]

Process the check and handling of the current subject.

PyFunceble.checker.availability.extras.etoxic module

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

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

Provides the extra rules handler for the etoxic infrastructure.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.extras.etoxic.EToxicHandler(status: Optional[PyFunceble.checker.availability.status.AvailabilityCheckerStatus] = None)[source]

Bases: PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase

Provides our very own rulesets for the etoxic infrastructure.

Parameters:status (AvailabilityCheckerStatus) – The previously gathered status.
MATCHES = ['.0wn0.com', '.123.st', '.1forum.biz', '.1fr1.net', '.1talk.net', '.30yearsstillyoung.com', '.3oloum.com', '.3rab.pro', '.4umer.com', '.5turbo.org', '.666forum.com', '.7olm.org', '.ace.st', '.actieforum.com', '.actifforum.com', '.aforumfree.com', '.africamotion.net', '.ahladalil.com', '.ahlamontada.com', '.ahlamontada.net', '.ahlamountada.com', '.airesdelibertad.com', '.alanoblebouffarde.com', '.aldeiarpg.com', '.all-up.com', '.ambiance-varadero.com', '.amoticos.org', '.arabepro.com', '.archeryonline.net', '.argyletd.com', '.artes-ana.com', '.audittpassion.com', '.avenir-vsp.com', '.bachandbachettefans.net', '.banouta.net', '.bbactif.com', '.beagle-attitude.com', '.benimforum.net', '.black-librarium.com', '.boxster-cayman.com', '.briefmarken-forum.com', '.bromptonforum.net', '.caferacerclub.org', '.camperfree.com', '.canadaboard.net', '.canadian-forum.com', '.cantal-leforum.com', '.casatridente.com', '.catsboard.com', '.cdnmilitarycollectors.com', '.chemin-de-memoire-parachutistes.org', '.clooneysopenhouse.com', '.club-bajaj.com', '.clubcb500x.com', '.clubgtipowers.com', '.clubtrackerarg.com', '.contrabaixobr.com', '.corvettepassion.com', '.coxengineforum.com', '.cro-wood.com', '.dan-moc.net', '.darkbb.com', '.deco-moderne-fr.com', '.desforums.net', '.detenteaujardin.com', '.discustoutsimplement.com', '.e30passion.com', '.easyforumpro.com', '.editboard.com', '.enbicielectrica.com', '.entreelles.org', '.exprimetoi.net', '.fcmulhousefans.com', '.filthy-secret.com', '.fmsp.net', '.focusrstteam.com', '.ford100e.org', '.foroactivo.com', '.foroactivo.com.es', '.forseps.org', '.forum-jardins.com', '.forum-zafira.com', '.forum2jeux.com', '.forumactif.com', '.forumactif.fr', '.forumactif.org', '.forumalgerie.net', '.forumattivo.it', '.forumbrasil.net', '.forumegypt.net', '.forumeiros.com', '.forumeiros.net', '.forumgamers.net', '.forumgaming.fr', '.forumgratuit.be', '.forumgratuit.ch', '.forumgratuit.org', '.forumgratuit.ro', '.forumgreek.com', '.forumgsr750.com', '.forumlaguna3.com', '.forumlumix.com', '.forumotion.com', '.forumotion.net', '.forumperso.com', '.forumpro.fr', '.forums-actifs.com', '.forumshiba.com', '.forumvi.com', '.fra.co', '.fritzbox-forum.com', '.fxsforexsrbijaforum.com', '.galoppourlavie.org', '.gid3an.com', '.giocattolivintage.com', '.glory-box-forum.com', '.goldwingpartage.com', '.goodforum.net', '.grisoghetto.com', '.gunetwork.org', '.hareketforum.net', '.hifi4sale.net', '.hooxs.com', '.i-love-harvard.com', '.iftopic.com', '.imperialgunneryforum.com', '.jeun.fr', '.jordanforum.net', '.just-married-rpg.com', '.kanak.fr', '.kawasaki-customs-forum.com', '.keuf.net', '.la-taverne-des-aventuriers.com', '.le-medaillon.org', '.le-site-de-la-citroen-xm.com', '.lebonforum.com', '.leforumlafigurine.com', '.legion-etrangere-munch.com', '.lemondedudiagauto.com', '.letrasyalgomas.com', '.levriers-forever.com', '.lights-camera-action.org', '.longluntan.com', '.magic-tarot58.com', '.mam9.com', '.manager-fifa.com', '.marvelscustoms.net', '.materielceleste.com', '.matostt.com', '.megane4forum.com', '.meilleurforum.com', '.minivanchrysler.com', '.mirbb.com', '.misteria7.com', '.montres-russes.org', '.moseisleyraumhafen.com', '.mundoqashqai.com', '.never-utopia.com', '.niceboard.com', '.novaerarpg.com', '.obd2sos.net', '.onepiece-mangas.com', '.open-consoles.com', '.orizzontescuolaforum.net', '.ottobreaddicts.net', '.own0.com', '.palstani.com', '.passion-harley.net', '.passionmilitaria.com', '.passionphoto-passionmontage.com', '.pblvfrance3.com', '.photos-camions.com', '.planete4x4.com', '.portalmercedes.com', '.portalmercedesbrasil.com', '.pro-forum.fr', '.puntoevoforum.com', '.quilterslastresort.com', '.repartocorse2.com', '.rigala.net', '.roo7.biz', '.rpg-board.net', '.rpghogwarts.org', '.sanata.biz', '.sdvg-deti.com', '.serbianforum.info', '.sgt3r.com', '.shaveua.com', '.sheffieldboardgamers.com', '.small-tracks.org', '.sorcieremonique.com', '.sporepedia2.com', '.stickeristas.com', '.subarashiis.com', '.superforo.net', '.superforum.fr', '.suzuki800.com', '.syriaforums.net', '.t5zone.com', '.team-z1000.com', '.terre-bitume.org', '.tibiaface.com', '.tubelesskite.net', '.ufologie-paranormal.org', '.unimog-mania.com', '.v2-honda.com', '.velovintageagogo.com', '.viterbikers.com', '.vivelecrpe.com', '.vstromhellasforum.com', '.walkingdead-rpg.com', '.warriorcatsnl.com', '.warriors-rpg.com', '.wwrail.net', '.yoo7.com', '.ze-43eme.com', '.zxr7team.com']
start() → PyFunceble.checker.availability.extras.etoxic.EToxicHandler[source]

Starts the gathering process.

PyFunceble.checker.availability.extras.parked module

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

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

Provides the extra rules handler based on the “parked status” 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.extras.parked.ParkedRulesHandler(status: Optional[PyFunceble.checker.availability.status.AvailabilityCheckerStatus] = None)[source]

Bases: PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase

Provides our very own parked rules handler. This handler will try to check if a subject is parked.

Parameters:status (AvailabilityCheckerStatus) – The previously gathered status.
start() → PyFunceble.checker.availability.extras.parked.ParkedRulesHandler[source]

Starts the gathering process.

PyFunceble.checker.availability.extras.rules module

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

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

Provides the extra rules handler based on the status code.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.extras.rules.ExtraRulesHandler(status: Optional[PyFunceble.checker.availability.status.AvailabilityCheckerStatus] = None)[source]

Bases: PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase

Provides our very own extra rules handler.

Parameters:status (AvailabilityCheckerStatus) – The previously gathered status.
handle_blogspot() → PyFunceble.checker.availability.extras.rules.ExtraRulesHandler[source]

Handles the blogspot.* case.

Warning

This method assume that we know that we are handling a blogspot domain.

handle_fc2_dot_com() → PyFunceble.checker.availability.extras.rules.ExtraRulesHandler[source]

Handles the fc2.com case.

Warning

This method assume that we know that we are handling a fc2 domain.

handle_imgur_dot_com() → PyFunceble.checker.availability.extras.rules.ExtraRulesHandler[source]

Handles the imgur.com case.

handle_wordpress_dot_com() → PyFunceble.checker.availability.extras.rules.ExtraRulesHandler[source]

Handles the wordpress.com case.

Warning

This method assume that we know that we are handling a blogspot domain.

http_codes_dataset = None
regex_active2inactive = {}
start() → PyFunceble.checker.availability.extras.rules.ExtraRulesHandler[source]

Starts the process.

PyFunceble.checker.availability.extras.subject_switch module

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

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

Provides the extra rules handler based on the “switching” domain behavior of some 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.extras.subject_switch.SubjectSwitchRulesHandler(status: Optional[PyFunceble.checker.availability.status.AvailabilityCheckerStatus] = None)[source]

Bases: PyFunceble.checker.availability.extras.base.ExtraRuleHandlerBase

Provides our very own “subject switch” handler.

This handler will be used to detects a subject switch behavior from a server. In other words, this handler should be able to detect the following scenario and switch the original subject to INACTIVE.

start() → PyFunceble.checker.availability.extras.subject_switch.SubjectSwitchRulesHandler[source]

Process the check and handling of the current subject.

url2netloc = None
Module contents

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

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

Provides everything related to the extras of the availablity checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Submodules
PyFunceble.checker.availability.base module

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

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

Provides the base of all availability checker classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.base.AvailabilityCheckerBase(subject: Optional[str] = None, *, use_extra_rules: Optional[bool] = None, use_whois_lookup: Optional[bool] = None, use_dns_lookup: Optional[bool] = None, use_netinfo_lookup: Optional[bool] = None, use_http_code_lookup: Optional[bool] = None, use_reputation_lookup: Optional[bool] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_whois_db: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.base.CheckerBase

Provides the base of all our availability checker classes.

Parameters:
  • subject (str) – Optional, The subject to work with.
  • use_extra_rules (bool) – Optional, Activates/Disables the usage of our own set of extra rules.
  • use_whois_lookup (bool) – Optional, Activates/Disables the usage of the WHOIS lookup to gather the status of the given subject.
  • use_dns_lookup (bool) – Optional, Activates/Disables the usage of the DNS lookup to gather the status of the given subject.
  • use_netinfo_lookup (bool) – Optional, Activates/Disables the usage of the network information lookup module to gather the status of the given subject.
  • use_http_code_lookup (bool) – Optional, Activates/Disables the usage of the HTTP status code lookup to gather the status of the given subject.
  • use_reputation_lookup (bool) – Optional, Activates/Disables the usage of the reputation dataset lookup to gather the status of the given subject.
  • do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
  • use_whois_db (bool) – Optional, Activates/Disable the usage of a local database to store the WHOIS datasets.
STD_USE_DNS_LOOKUP = True
STD_USE_EXTRA_RULES = True
STD_USE_HTTP_CODE_LOOKUP = True
STD_USE_NETINFO_LOOKUP = True
STD_USE_REPUTATION_LOOKUP = False
STD_USE_WHOIS_DB = True
STD_USE_WHOIS_LOOKUP = True
addressinfo_query_tool = None
dns_query_tool = None
domain_syntax_checker = None
extra_rules_handlers = None
get_status() → Optional[PyFunceble.checker.availability.status.AvailabilityCheckerStatus][source]

Provides the current state of the status.

Note

This method will automatically query status using the PyFunceble.checker.base.CheckerBase.query_status() if the PyFunceble.checker.status_base.CheckerStatusBase.status attribute is not set.

guess_all_settings() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Try to guess all settings.

guess_and_set_dns_lookup() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Try to guess and set the value of the use_dns_lookup attribute from the configuration file.

guess_and_set_use_extra_rules() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Try to guess and set the value of the use_extra_rules attribute from the configuration file.

guess_and_set_use_http_code_lookup() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Try to guess and set the value of the use_http_code_lookup attribute from the configuration file.

guess_and_set_use_netinfo_lookup() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Try to guess and set the value of the use_netinfo_lookup attribute from the configuration file.

guess_and_set_use_reputation_lookup() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Try to guess and set the value of the use_reputation_lookup attribute from the configuration file.

guess_and_set_use_whois_db() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Try to guess and set the value of the use_whois_db attribute.

guess_and_set_use_whois_lookup() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Try to guess and set the value of the use_whois attribute from the configuration file.

hostbyaddr_query_tool = None
http_status_code_query_tool = None
ip_syntax_checker = None
params = None
query_common_checker() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Queries the syntax checker.

query_dns_record() → Optional[Dict[str, Optional[List[str]]]][source]

Tries to query the DNS record(s) of the given subject.

Changed in version 4.1.0b8.dev: Lookup order relative to actual subject.

query_status() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Queries the status and for for more action.

set_use_dns_lookup(value: bool) → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Sets the value which authorizes the usage of the DNS Lookup.

Parameters:value – The value to set.
set_use_extra_rules(value: bool) → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Sets the value which authorizes the usage of the special rule.

Parameters:value – The value to set.
set_use_http_code_lookup(value: bool) → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Sets the value which authorizes the usage of the HTTP status code lookup.

Parameters:value – The value to set.
set_use_netinfo_lookup(value: bool) → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Sets the value which authorizes the usage of the network information lookup.

Parameters:value – The value to set.
set_use_reputation_lookup(value: bool) → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Sets the value which authorizes the usage of the reputation lookup.

Parameters:value – The value to set.
set_use_whois_db(value: bool) → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Sets the value which authorizes the usage of the WHOIS DB.

Parameters:value – The value to set.
set_use_whois_lookup(value: bool) → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Sets the value which authorizes the usage of the WHOIS lookup.

Parameters:value – The value to set.
should_we_continue_test(status_post_syntax_checker: str) → bool[source]

Checks if we are allowed to continue a standard testing.

Rules:
  1. No status available yet. Continue to next test method.
  2. Status is/still INVALID. Continue to next test method.
  3. Above are False. Not allowed to continue to next test method.
status = None
subject_propagator() → PyFunceble.checker.base.CheckerBase[source]

Propagate the currently set subject.

Warning

You are not invited to run this method directly.

try_to_query_status_from_collection() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to get and set the status from the Collection API.

try_to_query_status_from_dns() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to query the status from the DNS lookup.

Changed in version 4.1.0b7.dev: Logging return the correct subject.

try_to_query_status_from_extra_rules() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to query the status from the extra rules.

try_to_query_status_from_http_status_code() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to query the status from the HTTP status code.

try_to_query_status_from_netinfo() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to query the status from the network information.

try_to_query_status_from_reputation() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to query the status from the reputation lookup.

try_to_query_status_from_syntax_lookup() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to query the status from the syntax.

try_to_query_status_from_whois() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to get and the status from the WHOIS record.

Warning

If the configuration is loaded, this method try to query from the best database first.

If it’s not found it will try to query it from the best WHOIS server then add it into the database (if the expiration date extraction is successful).

Note

The addition into the WHOIS database is only done if this method is running in a process with a name that does not starts with PyFunceble (case sensitive).

url2netloc = None
url_syntax_checker = None
use_dns_lookup

Provides the current value of the _use_dns_lookup attribute.

use_extra_rules

Provides the current value of the _use_extra_rules attribute.

use_http_code_lookup

Provides the current value of the _use_http_code_lookup attribute.

use_netinfo_lookup

Provides the current value of the _use_netinfo_lookup attribute.

use_reputation_lookup

Provides the current value of the _use_reputation_lookup attribute.

use_whois_db

Provides the current value of the _use_whois_db attribute.

use_whois_lookup

Provides the current value of the _use_whois_lookup attribute.

whois_query_tool = None
PyFunceble.checker.availability.domain module

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

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

Provides the domains availability checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.domain.DomainAvailabilityChecker(subject: Optional[str] = None, *, use_extra_rules: Optional[bool] = None, use_whois_lookup: Optional[bool] = None, use_dns_lookup: Optional[bool] = None, use_netinfo_lookup: Optional[bool] = None, use_http_code_lookup: Optional[bool] = None, use_reputation_lookup: Optional[bool] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_whois_db: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.availability.base.AvailabilityCheckerBase

Provides the interface for checking the availability of a given domain.

Parameters:
  • subject (str) – Optional, The subject to work with.
  • use_extra_rules (bool) – Optional, Activates/Disables the usage of our own set of extra rules.
  • use_whois_lookup (bool) – Optional, Activates/Disables the usage of the WHOIS lookup to gather the status of the given subject.
  • use_dns_lookup (bool) – Optional, Activates/Disables the usage of the DNS lookup to gather the status of the given subject.
  • use_netinfo_lookup (bool) – Optional, Activates/Disables the usage of the network information lookup module to gather the status of the given subject.
  • use_http_code_lookup (bool) – Optional, Activates/Disables the usage of the HTTP status code lookup to gather the status of the given subject.
  • use_reputation_lookup (bool) – Optional, Activates/Disables the usage of the reputation dataset lookup to gather the status of the given subject.
  • do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
  • use_whois_db (bool) – Optional, Activates/Disable the usage of a local database to store the WHOIS datasets.
static is_valid() → bool[source]

Provides the result of the validation.

query_status() → PyFunceble.checker.availability.domain.DomainAvailabilityChecker[source]

Queries the result without anything more.

try_to_query_status_from_reputation() → PyFunceble.checker.availability.domain.DomainAvailabilityChecker[source]

Tries to query the status from the reputation lookup.

PyFunceble.checker.availability.domain_and_ip module

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

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

Provides the domains and IP availability checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.domain_and_ip.DomainAndIPAvailabilityChecker(subject: Optional[str] = None, *, use_extra_rules: Optional[bool] = None, use_whois_lookup: Optional[bool] = None, use_dns_lookup: Optional[bool] = None, use_netinfo_lookup: Optional[bool] = None, use_http_code_lookup: Optional[bool] = None, use_reputation_lookup: Optional[bool] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_whois_db: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.availability.base.AvailabilityCheckerBase

Provides the interface for checking the availability of a IP or domain.

Parameters:
  • subject (str) – Optional, The subject to work with.
  • use_extra_rules (bool) – Optional, Activates/Disables the usage of our own set of extra rules.
  • use_whois_lookup (bool) – Optional, Activates/Disables the usage of the WHOIS lookup to gather the status of the given subject.
  • use_dns_lookup (bool) – Optional, Activates/Disables the usage of the DNS lookup to gather the status of the given subject.
  • use_netinfo_lookup (bool) – Optional, Activates/Disables the usage of the network information lookup module to gather the status of the given subject.
  • use_http_code_lookup (bool) – Optional, Activates/Disables the usage of the HTTP status code lookup to gather the status of the given subject.
  • use_reputation_lookup (bool) – Optional, Activates/Disables the usage of the reputation dataset lookup to gather the status of the given subject.
  • do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
  • use_whois_db (bool) – Optional, Activates/Disable the usage of a local database to store the WHOIS datasets.
static is_valid() → bool[source]

Provides the result of the validation.

query_status() → PyFunceble.checker.availability.domain_and_ip.DomainAndIPAvailabilityChecker[source]

Queries the result without anything more.

PyFunceble.checker.availability.ip module

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

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

Provides the IP availability checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.ip.IPAvailabilityChecker(subject: Optional[str] = None, *, use_extra_rules: Optional[bool] = None, use_whois_lookup: Optional[bool] = None, use_dns_lookup: Optional[bool] = None, use_netinfo_lookup: Optional[bool] = None, use_http_code_lookup: Optional[bool] = None, use_reputation_lookup: Optional[bool] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_whois_db: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.availability.base.AvailabilityCheckerBase

Provides the interface for checking the availability of a given IP.

Parameters:
  • subject (str) – Optional, The subject to work with.
  • use_extra_rules (bool) – Optional, Activates/Disables the usage of our own set of extra rules.
  • use_whois_lookup (bool) – Optional, Activates/Disables the usage of the WHOIS lookup to gather the status of the given subject.
  • use_dns_lookup (bool) – Optional, Activates/Disables the usage of the DNS lookup to gather the status of the given subject.
  • use_netinfo_lookup (bool) – Optional, Activates/Disables the usage of the network information lookup module to gather the status of the given subject.
  • use_http_code_lookup (bool) – Optional, Activates/Disables the usage of the HTTP status code lookup to gather the status of the given subject.
  • use_reputation_lookup (bool) – Optional, Activates/Disables the usage of the reputation dataset lookup to gather the status of the given subject.
  • do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
  • use_whois_db (bool) – Optional, Activates/Disable the usage of a local database to store the WHOIS datasets.
static is_valid() → bool[source]

Provides the result of the validation.

query_status() → PyFunceble.checker.availability.ip.IPAvailabilityChecker[source]

Queries the result without anything more.

try_to_query_status_from_reputation() → PyFunceble.checker.availability.ip.IPAvailabilityChecker[source]

Tries to query the status from the reputation lookup.

PyFunceble.checker.availability.params module

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

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

Provides our parameter class. The parameter class is the class that will be provided to end-user. It is only a placeholder and should only be taken as informative.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.params.AvailabilityCheckerParams(do_syntax_check_first: Optional[bool] = None, use_collection: Optional[bool] = None, use_extra_rules: Optional[bool] = None, use_whois_lookup: Optional[bool] = None, use_dns_lookup: Optional[bool] = None, use_netinfo_lookup: Optional[bool] = None, use_http_code_lookup: Optional[bool] = None, use_reputation_lookup: Optional[bool] = None, use_whois_db: Optional[bool] = None)[source]

Bases: PyFunceble.checker.params_base.CheckerParamsBase

Provides the description of an availability checker paramaters.

do_syntax_check_first = None
use_dns_lookup = None
use_extra_rules = None
use_http_code_lookup = None
use_netinfo_lookup = None
use_reputation_lookup = None
use_whois_db = None
use_whois_lookup = None
PyFunceble.checker.availability.status module

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

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

Provides our status class. The status class is the class that will be provided to end-user.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.status.AvailabilityCheckerStatus(subject_kind: Optional[str] = None, subject: Optional[str] = None, idna_subject: Optional[str] = None, netloc: Optional[str] = None, status: Optional[str] = None, status_source: Optional[str] = None, tested_at: Optional[datetime.datetime] = None, params: Optional[PyFunceble.checker.params_base.CheckerParamsBase] = None, checker_type: Optional[str] = 'AVAILABILITY', dns_lookup_record: Optional[PyFunceble.query.record.dns.DNSQueryToolRecord] = None, whois_lookup_record: Optional[PyFunceble.query.record.whois.WhoisQueryToolRecord] = None, domain_syntax: Optional[bool] = None, second_level_domain_syntax: Optional[bool] = None, subdomain_syntax: Optional[bool] = None, ip_syntax: Optional[bool] = None, ipv4_syntax: Optional[bool] = None, ipv6_syntax: Optional[bool] = None, ipv4_range_syntax: Optional[bool] = None, ipv6_range_syntax: Optional[bool] = None, url_syntax: Optional[bool] = None, expiration_date: Optional[str] = None, registrar: Optional[str] = None, whois_record: Optional[str] = None, status_before_extra_rules: Optional[str] = None, status_after_extra_rules: Optional[str] = None, status_source_before_extra_rules: Optional[str] = None, status_source_after_extra_rules: Optional[str] = None, dns_lookup: Optional[Dict[str, Optional[List[str]]]] = None, netinfo: Optional[Dict[str, Optional[List[str]]]] = None, http_status_code: Optional[int] = None)[source]

Bases: PyFunceble.checker.status_base.CheckerStatusBase

Provides the description of an availablity status.

checker_type = 'AVAILABILITY'
dns_lookup = None
dns_lookup_record = None
domain_syntax = None
expiration_date = None
http_status_code = None
ip_syntax = None
ipv4_range_syntax = None
ipv4_syntax = None
ipv6_range_syntax = None
ipv6_syntax = None
is_active() → bool[source]

Checks if the current status is an ACTIVE one.

is_available() → bool[source]

Checks if the current status represent an available subject.

is_inactive() → bool[source]

Checks if the current status is an INACTIVE one.

is_invalid() → bool[source]

Checks if the current status is an INVALID one.

is_special() → bool[source]

Checks if the current status is a SPECIAL one. Meaning that we applied some of our own rules.

netinfo = None
registrar = None
second_level_domain_syntax = None
status_after_extra_rules = None
status_before_extra_rules = None
status_source_after_extra_rules = None
status_source_before_extra_rules = None
subdomain_syntax = None
url_syntax = None
whois_lookup_record = None
whois_record = None
PyFunceble.checker.availability.url module

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

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

Provides the URL availability checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.availability.url.URLAvailabilityChecker(subject: Optional[str] = None, *, use_extra_rules: Optional[bool] = None, use_whois_lookup: Optional[bool] = None, use_dns_lookup: Optional[bool] = None, use_netinfo_lookup: Optional[bool] = None, use_http_code_lookup: Optional[bool] = None, use_reputation_lookup: Optional[bool] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_whois_db: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.availability.base.AvailabilityCheckerBase

Provides the interface for checking the availability of a given URL.

Parameters:
  • subject (str) – Optional, The subject to work with.
  • use_extra_rules (bool) – Optional, Activates/Disables the usage of our own set of extra rules.
  • use_whois_lookup (bool) – Optional, Activates/Disables the usage of the WHOIS lookup to gather the status of the given subject.
  • use_dns_lookup (bool) – Optional, Activates/Disables the usage of the DNS lookup to gather the status of the given subject.
  • use_netinfo_lookup (bool) – Optional, Activates/Disables the usage of the network information lookup module to gather the status of the given subject.
  • use_http_code_lookup (bool) – Optional, Activates/Disables the usage of the HTTP status code lookup to gather the status of the given subject.
  • use_reputation_lookup (bool) – Optional, Activates/Disables the usage of the reputation dataset lookup to gather the status of the given subject.
  • do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
  • use_whois_db (bool) – Optional, Activates/Disable the usage of a local database to store the WHOIS datasets.
static is_valid() → bool[source]

Provides the result of the validation.

query_status() → PyFunceble.checker.availability.url.URLAvailabilityChecker[source]

Queries the result without anything more.

Changed in version 4.1.0b7.dev: DNS Query - first.

subject_propagator() → PyFunceble.checker.availability.url.URLAvailabilityChecker[source]

Propagate the currently set subject.

Warning

You are not invited to run this method directly.

Changed in version 4.1.0b7.dev: DNS Lookup capability.

try_to_query_status_from_dns() → PyFunceble.checker.availability.base.AvailabilityCheckerBase[source]

Tries to query the status from the DNS lookup after switching the idna subject to the url base.

Warning

This method does not answer as you may expect.

Indeed, if a DNS lookup failed, this method will overwrite the standard response by setting the status to INACTIVE and the status source to DNSLOOKUP.

New in version 4.1.0b7: DNS Lookup as a “down” switcher.

try_to_query_status_from_http_status_code() → PyFunceble.checker.availability.url.URLAvailabilityChecker[source]

Tries to query the status from the network information.

try_to_query_status_from_reputation() → PyFunceble.checker.availability.url.URLAvailabilityChecker[source]

Tries to query the status from the reputation lookup.

Module contents

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

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

Provides everything related to the core of the availablity checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.checker.reputation package
Submodules
PyFunceble.checker.reputation.base module

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

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

Provides the base of all reputation checker classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.reputation.base.ReputationCheckerBase(subject: Optional[str] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.base.CheckerBase

Provides the base of all our reputation checker classes.

Parameters:
  • subject (str) – Optional, The subject to work with.
  • do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
dns_query_tool = None
domain_syntax_checker = None
get_status() → Optional[PyFunceble.checker.reputation.status.ReputationCheckerStatus][source]

Provides the current state of the status.

Note

This method will automatically query status using the PyFunceble.checker.base.CheckerBase.query_status() if the PyFunceble.checker.status_base.CheckerStatusBase.status attribute is not set.

ip_syntax_checker = None
ipv4_reputation_query_tool = None
static is_valid() → bool[source]

Provides the result of the validation.

params = None
query_a_record() → Optional[List[str]][source]

Queries all the A record.

query_common_checker() → PyFunceble.checker.reputation.base.ReputationCheckerBase[source]

Queries the common checkers.

query_status() → PyFunceble.checker.reputation.base.ReputationCheckerBase[source]

Queries the status and for for more action.

should_we_continue_test(status_post_syntax_checker: str) → bool[source]

Checks if we are allowed to continue a standard testing.

status = None
subject_propagator() → PyFunceble.checker.base.CheckerBase[source]

Propagate the currently set subject.

Warning

You are not invited to run this method directly.

try_to_query_status_from_collection() → PyFunceble.checker.reputation.base.ReputationCheckerBase[source]

Tries to get and set the status from the Collection API.

try_to_query_status_from_dns_lookup() → PyFunceble.checker.reputation.base.ReputationCheckerBase[source]

Tries to query the status from the DNS lookup.

try_to_query_status_from_syntax_lookup() → PyFunceble.checker.reputation.base.ReputationCheckerBase[source]

Tries to query the status from the syntax.

url_syntax_checker = None
PyFunceble.checker.reputation.domain module

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

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

Provides domain reputation checker classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.reputation.domain.DomainReputationChecker(subject: Optional[str] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.reputation.base.ReputationCheckerBase

Provides the domain reputation checker classes.

Parameters:
  • subject (str) – Optional, The subject to work with.
  • do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
query_a_record() → Optional[List[str]][source]

Queries all the A record.

PyFunceble.checker.reputation.domain_and_ip module

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

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

Provides the domains and IP reputation checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.reputation.domain_and_ip.DomainAndIPReputationChecker(subject: Optional[str] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.reputation.base.ReputationCheckerBase

Provides the interface for checking the reputation of an IP or domain.

Parameters:
  • subject (str) – Optional, The subject to work with.
  • do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
query_status() → PyFunceble.checker.reputation.domain_and_ip.DomainAndIPReputationChecker[source]

Queries the result without anything more.

PyFunceble.checker.reputation.ip module

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

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

Provides domain reputation checker classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.reputation.ip.IPReputationChecker(subject: Optional[str] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.reputation.base.ReputationCheckerBase

Provides the IP reputation checker.

Parameters:
  • subject (str) – Optional, The subject to work with.
  • do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
query_a_record() → Optional[List[str]][source]

Queries all the A record.

PyFunceble.checker.reputation.params module

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

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

Provides our parameter class. The parameter class is the class that will be provided to end-user. It is only a placeholder and should only be taken as informative.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.reputation.params.ReputationCheckerParams(do_syntax_check_first: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.params_base.CheckerParamsBase

Provides the description of a reputation checker paramaters.

PyFunceble.checker.reputation.status module

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

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

Provides our status class. The status class is the class that will be provided to end-user.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.reputation.status.ReputationCheckerStatus(subject_kind: Optional[str] = None, subject: Optional[str] = None, idna_subject: Optional[str] = None, netloc: Optional[str] = None, status: Optional[str] = None, status_source: Optional[str] = None, tested_at: Optional[datetime.datetime] = None, params: Optional[PyFunceble.checker.params_base.CheckerParamsBase] = None, checker_type: Optional[str] = 'REPUTATION', dns_lookup_record: Optional[PyFunceble.query.record.dns.DNSQueryToolRecord] = None, domain_syntax: Optional[bool] = None, second_level_domain_syntax: Optional[bool] = None, subdomain_syntax: Optional[bool] = None, ip_syntax: Optional[bool] = None, ipv4_syntax: Optional[bool] = None, ipv6_syntax: Optional[bool] = None, ipv4_range_syntax: Optional[bool] = None, ipv6_range_syntax: Optional[bool] = None, url_syntax: Optional[bool] = None, dns_lookup: Optional[List[str]] = None)[source]

Bases: PyFunceble.checker.status_base.CheckerStatusBase

Provides the description of an availablity status.

checker_type = 'REPUTATION'
dns_lookup = None
dns_lookup_record = None
domain_syntax = None
has_bad_reputation() → bool[source]

Checks if the current status represent an available subject.

ip_syntax = None
ipv4_range_syntax = None
ipv4_syntax = None
ipv6_range_syntax = None
ipv6_syntax = None
is_malicious() → bool[source]

Checks if the current status is an MALICIOUS one.

is_sane() → bool[source]

Checks if the current status is an SANE one.

second_level_domain_syntax = None
subdomain_syntax = None
url_syntax = None
PyFunceble.checker.reputation.url module

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

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

Provides URL reputation checker classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.reputation.url.URLReputationChecker(subject: Optional[str] = None, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.reputation.base.ReputationCheckerBase

Provides the URL reputation checker.

Parameters:
  • subject (str) – Optional, The subject to work with.
  • do_syntax_check_first (bool) – Optional, Activates/Disables the check of the status before the actual status gathering.
query_a_record() → Optional[List[str]][source]

Queries all the A record.

Module contents

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

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

Provides everything related to the core of the reputation checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.checker.syntax package
Submodules
PyFunceble.checker.syntax.base module

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

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

Provides the base of all syntax checker classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.syntax.base.SyntaxCheckerBase(subject: Optional[str] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None)[source]

Bases: PyFunceble.checker.base.CheckerBase

Provides the base of all our syntax checker classes.

Parameters:subject (str) – Optional, The subject to work with.
db_session = None
get_status() → Optional[PyFunceble.checker.syntax.status.SyntaxCheckerStatus][source]

Provides the current state of the status.

Note

This method will automatically query status using the PyFunceble.checker.base.CheckerBase.query_status() if the PyFunceble.checker.status_base.CheckerStatusBase.status attribute is not set.

is_valid() → bool[source]

Provides the result of the validation.

params = None
query_status() → PyFunceble.checker.syntax.base.SyntaxCheckerBase[source]

Queries the status.

status = None
subject_propagator() → PyFunceble.checker.base.CheckerBase[source]

Propagate the currently set subject.

Warning

You are not invited to run this method directly.

PyFunceble.checker.syntax.domain module

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

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

Provides the general domain syntax checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.syntax.domain.DomainSyntaxChecker(subject: Optional[str] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None)[source]

Bases: PyFunceble.checker.syntax.domain_base.DomainSyntaxCheckerBase, PyFunceble.checker.syntax.base.SyntaxCheckerBase

Provides an interface to check the syntax of a domain.

Parameters:subject (str) – Optional, The subject to work with.
is_valid() → bool[source]

Validate the given subject if exists.

is_valid_second_level() → bool[source]

Checks if the given subject is a valid second level demain.

is_valid_subdomain() → bool[source]

Checks if the given subject is a valid subdomain

second_level_checker = None
subdomain_checker = None
subject_propagator() → PyFunceble.checker.syntax.domain.DomainSyntaxChecker[source]

Propagate the currently set subject.

Warning

You are not invited to run this method directly.

PyFunceble.checker.syntax.domain_and_ip module

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

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

Provides the domains and IP syntax checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.syntax.domain_and_ip.DomainAndIPSyntaxChecker(subject: Optional[str] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None)[source]

Bases: PyFunceble.checker.syntax.base.SyntaxCheckerBase

Provides the interface for checking the syntax of an IP or domain.

Parameters:subject (str) – Optional, The subject to work with.
query_status() → PyFunceble.checker.syntax.domain_and_ip.DomainAndIPSyntaxChecker[source]

Queries the result without anything more.

PyFunceble.checker.syntax.domain_base module

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

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

Provides the base of all domain syntax checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.syntax.domain_base.DomainSyntaxCheckerBase(subject: Optional[str] = None)[source]

Bases: PyFunceble.checker.base.CheckerBase

Provides an interface to check the syntax of a second domain.

Parameters:subject (str) – Optional, The subject to work with.
SPECIAL_USE_DOMAIN_NAMES_EXTENSIONS = ['onion']

Specifies the extension which are specified as “Special-Use Domain Names” and supported by our project.

Type:list
find_last_point_index()[source]

Try to find the index of the last point after the execution of the decorated method.

get_extension() → Optional[str][source]

Provides the extension to work with (if exists).

static get_last_point_index(subject: str) → Optional[int][source]

Provides the index of the last point of the given subject.

get_subject_without_suffix(subject: str, extension: str) → Optional[Tuple[Optional[int], Optional[str]]][source]

Provides the given subject without the suffix.

Parameters:
  • subject – The subject to work with.
  • extension – The extension previously extracted.
iana_dataset = None
is_valid() → bool[source]

Validate the given subject.

last_point_index = None

Saves the index of the last point.

public_suffix_dataset = None
reset_last_point_index()[source]

Resets the last point index before executing the decorated method.

subject

Provides the current state of the _subject attribute.

PyFunceble.checker.syntax.ip module

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

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

Provides the IP (v4 + v6) syntax checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.syntax.ip.IPSyntaxChecker(subject: Optional[str] = None)[source]

Bases: PyFunceble.checker.syntax.base.SyntaxCheckerBase

Provides an interface to check the syntax of an IP (v6 or v4).

Parameters:subject (str) – Optional, The subject to work with.
ipv4_checker = None
ipv6_checker = None
is_reserved() → bool[source]

Checks if the given subject is a reserved IP.

is_reserved_v4() → bool[source]

Checks if the given subject is a reserved IPv4.

is_reserved_v6() → bool[source]

Checks if the given subject is a reserved IPv6.

is_valid() → bool[source]

Validate the given subject.

is_valid_range() → bool[source]

Checks if the given subject is an IP range.

is_valid_v4() → bool[source]

Checks if the given subject is a valid IPv4.

is_valid_v4_range() → bool[source]

Checks if the given subject is an IPv4 range.

is_valid_v6() → bool[source]

Checks if the given subject is a valid IPv6.

is_valid_v6_range() → bool[source]

Checks if the given subject is an IPv6 range.

subject_propagator() → PyFunceble.checker.syntax.ip.IPSyntaxChecker[source]

Propagate the currently set subject.

Warning

You are not invited to run this method directly.

PyFunceble.checker.syntax.ipv4 module

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

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

Provides the IPv4 syntax checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.syntax.ipv4.IPv4SyntaxChecker(subject: Optional[str] = None, *, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.base.CheckerBase

Provides an interface to check the syntax of an IPv4.

Parameters:subject (str) – Optional, The subject to work with.
is_reserved() → bool[source]

Checks if the given subject is a reserved IPv4.

is_valid() → bool[source]

Validate the given subject.

is_valid_range() → bool[source]

Checks if the given subject is an IPv4 range

PyFunceble.checker.syntax.ipv6 module

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

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

Provides the IPv6 syntax checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.syntax.ipv6.IPv6SyntaxChecker(subject: Optional[str] = None, *, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.base.CheckerBase

Provides an interface to check the syntax of an IPv6.

Parameters:subject (str) – Optional, The subject to work with.
is_reserved() → bool[source]

Checks if the given subject is a reserved IPv6.

is_valid() → bool[source]

Validate the given subject.

is_valid_range() → bool[source]

Checks if the given subject is an IPv6 range.

PyFunceble.checker.syntax.params module

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

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

Provides our parameter class. The parameter class is the class that will be provided to end-user. It is only a placeholder and should only be taken as informative.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.syntax.params.SyntaxCheckerParams(do_syntax_check_first: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: PyFunceble.checker.params_base.CheckerParamsBase

Provides the description of a syntax checker paramaters.

PyFunceble.checker.syntax.second_lvl_domain module

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

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

Provides the second level domain syntax checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.syntax.second_lvl_domain.SecondLvlDomainSyntaxChecker(subject: Optional[str] = None)[source]

Bases: PyFunceble.checker.syntax.domain_base.DomainSyntaxCheckerBase

Provides an interface to check the syntax of a second domain.

Parameters:subject (str) – Optional, The subject to work with.
REGEX_VALID_DOMAIN = '^(?=.{0,253}$)(([a-z0-9][a-z0-9-]{0,61}[a-z0-9]|[a-z0-9])\\.)+((?=.*[^0-9])([a-z0-9][a-z0-9-]{0,61}[a-z0-9](?:\\.)?|[a-z0-9](?:\\.)?))$'
REGEX_VALID_RELAXED_DOMAIN = '^(?=.{0,253}$)(([a-z0-9][a-z0-9_-]{0,61}[a-z0-9_-]|[a-z0-9])\\.)+((?=.*[^0-9])([a-z0-9][a-z0-9-]{0,61}[a-z0-9](?:\\.)?|[a-z0-9](?:\\.)?))$'
is_valid() → bool[source]

Validate the given subject.

Warning

A valid domain may also be a valid subdomain.

If you precisely want to check a subdomain please refer to the right checker (not this one :-) )!

last_point_index = None

Saves the index of the last point.

PyFunceble.checker.syntax.status module

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

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

Provides our status class. The status class is the class that will be provided to end-user.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.syntax.status.SyntaxCheckerStatus(subject_kind: Optional[str] = None, subject: Optional[str] = None, idna_subject: Optional[str] = None, netloc: Optional[str] = None, status: Optional[str] = None, status_source: Optional[str] = None, tested_at: Optional[datetime.datetime] = None, params: Optional[PyFunceble.checker.params_base.CheckerParamsBase] = None, checker_type: Optional[str] = 'SYNTAX')[source]

Bases: PyFunceble.checker.status_base.CheckerStatusBase

Provides the description of a syntax check status.

checker_type = 'SYNTAX'
is_invalid() → bool[source]

Checks if the current status is invalid.

is_valid() → bool[source]

Checks if the current status is valid.

PyFunceble.checker.syntax.subdomain module

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

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

Provides the subdomain syntax checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.syntax.subdomain.SubDomainSyntaxChecker(subject: Optional[str] = None)[source]

Bases: PyFunceble.checker.syntax.domain_base.DomainSyntaxCheckerBase

Provides an interface to check the syntax of a subdomain.

Parameters:subject (str) – Optional, The subject to work with.
REGEX_VALID_SUBDOMAIN = '^(?=.{0,253}$)(([a-z0-9_][a-z0-9-_]{0,61}[a-z0-9_-]|[a-z0-9])\\.)+((?=.*)([a-z0-9][a-z0-9-]{0,61}[a-z0-9](?:\\.)?|[a-z0-9](?:\\.)?))$'
is_valid() → bool[source]

Validate the given subject if exists.

PyFunceble.checker.syntax.url module

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

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

Provides the URL syntax checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.syntax.url.URLSyntaxChecker(subject: Optional[str] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None)[source]

Bases: PyFunceble.checker.syntax.base.SyntaxCheckerBase

Provides an interface to check the syntax of a URL.

Parameters:subject (str) – Optional, The subject to work with.
static get_hostname_from_url(url: str) → Optional[str][source]

Extract the hostname part of the given URL.

New in version 4.1.0b7.

is_valid() → bool[source]

Validate the given subject.

Changed in version 4.1.0b5.dev: URL with scheme and port are no longer INVALID.

Changed in version 4.1.0b7.dev: Hostname taken from get_hostname_from_url

subject_propagator() → PyFunceble.checker.base.CheckerBase[source]

Propagate the currently set subject.

Warning

You are not invited to run this method directly.

Module contents

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

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

Provides everything related to the core of the syntax checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.checker.utils package
Submodules
PyFunceble.checker.utils.whois module

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

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

Provides some utilities related to the WHOIS query.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.checker.utils.whois.get_whois_dataset_object(*, db_session: Optional[sqlalchemy.orm.session.Session] = None) → Union[PyFunceble.dataset.base.DatasetBase, PyFunceble.dataset.csv_base.CSVDatasetBase, PyFunceble.dataset.db_base.DBDatasetBase][source]

Provides the whois dataset object to work with.

Parameters:

db_session – A database session to use.

Raises:
  • ValueError – When the given database type is unkown.
  • RuntimeError – When the configuration was not loaded yet.
Module contents

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

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

Provides some utilities related to the checkers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Submodules
PyFunceble.checker.base module

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

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

Provides the base of all checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.base.CheckerBase(subject: Optional[str] = None, *, do_syntax_check_first: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None, use_collection: Optional[bool] = None)[source]

Bases: object

Provides the base of all checker.

Parameters:
  • subject (str) – Optional, The subject to work with.
  • do_syntax_check_first (bool) –

    Optional, Forces the checker to first perform a syntax check,

    Warning

    This does not apply to the syntax checker - itself.

STD_DO_SYNTAX_CHECK_FIRST = False
STD_USE_COLLECTION = False
collection_query_tool = None
db_session = None
do_syntax_check_first

Provides the current state of the do_syntax_check_first attribute.

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.
get_status() → Optional[PyFunceble.checker.status_base.CheckerStatusBase][source]

Provides the current state of the status.

Note

This method will automatically query status using the PyFunceble.checker.base.CheckerBase.query_status() if the PyFunceble.checker.status_base.CheckerStatusBase.status attribute is not set.

guess_and_set_use_collection() → PyFunceble.checker.base.CheckerBase[source]

Try to guess and set the value of the use_collection attribute.

idna_subject

Provides the current state of the _idna_subject attribute.

is_valid() → bool[source]

Provides the result of the validation.

params = None
propagate_subject()[source]

Propagates the subject to the object that need it after launching the decorated method.

query_common_checker() → PyFunceble.checker.base.CheckerBase[source]

Queries the common checkers.

Warning

Be sure to use setup your status first.

query_status() → PyFunceble.checker.base.CheckerBase[source]

Queries the status.

query_status_if_missing()[source]

Queries the status if it’s missing.

set_do_syntax_check_first(value: bool) → PyFunceble.checker.base.CheckerBase[source]

Sets the value which allow us to do a syntax check first.

Parameters:value – The subject to set.
set_idna_subject(value: str) → PyFunceble.checker.base.CheckerBase[source]

Sets the subject to work with.

Parameters:value – The subject to set.
set_subject(value: str) → PyFunceble.checker.base.CheckerBase[source]

Sets the subject to work with.

Parameters:value – The subject to set.
set_use_collection(value: bool) → PyFunceble.checker.base.CheckerBase[source]

Sets the value which authorizes the usage of the Collection.

Parameters:value – The value to set.
status = None
subject

Provides the current state of the _subject attribute.

subject_propagator() → PyFunceble.checker.base.CheckerBase[source]

Propagate the currently set subject.

Warning

Be sure to use setup your status first.

update_status_date_after_query()[source]

Updates the status dates after running the decorated method.

url2netloc = None
use_collection

Provides the current value of the _use_collection attribute.

PyFunceble.checker.complex_json_encoder module

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

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

Provides our very own complex JSON encoder. The purpose of this encoder compared to others is that it was built for the conversion of records or statuses provided by the checker(s).

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.complex_json_encoder.ComplexJsonEncoder(*, skipkeys=False, ensure_ascii=True, check_circular=True, allow_nan=True, sort_keys=False, indent=None, separators=None, default=None)[source]

Bases: json.encoder.JSONEncoder

Provides our very own complex JSON encoder.

default(o: Any) → Any[source]

Implements our very own conversion.

PyFunceble.checker.params_base module

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

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

Provides the base of all our params classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.params_base.CheckerParamsBase(do_syntax_check_first: Optional[bool] = None, use_collection: Optional[bool] = None)[source]

Bases: object

Provides the base of all parameters classes.

do_syntax_check_first = None
to_dict() → dict[source]

Converts the current object to dict.

to_json() → str[source]

Converts the current object to JSON.

use_collection = None
PyFunceble.checker.status_base module

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

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

Provides the base of all our status classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.checker.status_base.CheckerStatusBase(subject_kind: Optional[str] = None, subject: Optional[str] = None, idna_subject: Optional[str] = None, netloc: Optional[str] = None, status: Optional[str] = None, status_source: Optional[str] = None, tested_at: Optional[datetime.datetime] = None, params: Optional[PyFunceble.checker.params_base.CheckerParamsBase] = None)[source]

Bases: object

Provides the base of all status classes.

idna_subject = None
netloc = None
params = None
status = None
status_source = None
subject = None
subject_kind = None
tested_at = None
to_dict() → dict[source]

Converts the current object to dict.

to_json() → str[source]

Converts the current object to JSON.

Module contents

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

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

Provides the checkers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli package
Subpackages
PyFunceble.cli.continuous_integration package
Submodules
PyFunceble.cli.continuous_integration.base module

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

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

Provides the base of all our CI classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.continuous_integration.base.ContinuousIntegrationBase(*, authorized: Optional[bool] = None, git_email: Optional[str] = None, git_name: Optional[str] = None, git_branch: Optional[str] = None, git_distribution_branch: Optional[str] = None, token: Optional[str] = None, command: Optional[str] = None, end_command: Optional[str] = None, commit_message: Optional[str] = None, end_commit_message: Optional[str] = None, max_exec_minutes: Optional[int] = None)[source]

Bases: object

Provides the base of all continuous integration methods.

Parameters:
  • authorized – The authorization to run.
  • git_email – The email to apply while initilizing the git repository for push.
  • git_name – The name to apply while initilizing the git repository for push.
  • git_branch – The branch to use while testing.
  • git_distribution_branch – The branch to push the results into.
  • token – The token to apply while initilizing the git repository for push.
  • command – The command to execute before each push (except the latest one).
  • end_command – The commant to execute at the very end.
  • commit_message – The commit message to apply before each push (except the latest one).
  • end_commit_message – The commit message to apply at the very end.
  • max_exec_minutes – The maximum of minutes to apply before considering the current session as finished.
STD_AUTHORIZED = False
STD_COMMAND = None
STD_COMMIT_MESSAGE = 'PyFunceble - AutoSave'
STD_END_COMMAND = None
STD_END_COMMIT_MESSAGE = 'PyFunceble - Results'
STD_GIT_BRANCH = 'master'
STD_GIT_DISTRIBUTION_BRANCH = 'master'
STD_GIT_EMAIL = None
STD_GIT_NAME = None
STD_MAX_EXEC_MINUTES = 15
apply_commit() → None[source]

Apply the commit and push.

Side effect:
It runs the declared command to execute.
apply_end_commit() → None[source]

Apply the “end” commit and push.

Side effect:
It runs the declared command to execute.
authorized

Provides the currently state of the _authorized attribute.

bypass() → None[source]

Stops everything if the latest commit message match any of those:

  • [PyFunceble skip] (case insensitive)
  • [PyFunceble-skip] (case insensitive)
  • end_commit_marker
command

Provides the current state of the _command attribute.

commit_message

Provides the current state of the _commit_message attribute.

end_command

Provides the current state of the _end_command attribute.

end_commit_marker = '[ci skip]'
end_commit_message

Provides the current state of the _end_commit_message attribute.

ensure_git_branch_is_given()[source]

Ensures that the Git Branch is given before launching the decorated method.

Raises:PyFunceble.cli.continuous_integration.exceptions.GitBranchNotFound – When the Git Branch is not found.
ensure_git_distribution_branch_is_given()[source]

Ensures that the Git distribution Branch is given before launching the decorated method.

Raises:PyFunceble.cli.continuous_integration.exceptions.GitDistributionBranchNotFound – When the Git distribution Branch is not found.
ensure_git_email_is_given()[source]

Ensures that the Git Email is given before launching the decorated method.

Raises:PyFunceble.cli.continuous_integration.exceptions.GitEmailNotFound – When the Git Email is not found.
ensure_git_name_is_given()[source]

Ensures that the Git Name is given before launching the decorated method.

Raises:PyFunceble.cli.continuous_integration.exceptions.GitNameNotFound – When the Git Name is not found.
ensure_start_time_is_given()[source]

Ensures that the starting time is given before launching the decorated method.

Raises:PyFunceble.cli.continuous_integration.exceptions.StartTimeNotFound – When the token is not found.
ensure_token_is_given()[source]

Ensures that the token is given before launching the decorated method.

Raises:PyFunceble.cli.continuous_integration.exceptions.TokenNotFound – When the token is not found.
static exec_command(command: str, allow_stdout: bool) → None[source]

Exceutes the given command.

Parameters:
  • command – The command to execute.
  • allow_stdout – Allows us to return the command output to stdout.
execute_if_authorized()[source]

Executes the decorated method only if we are authorized to process. Otherwise, apply the given default.

expected_end_time = None
fix_permissions() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

A method to overwrite when custom rules for permissions are needed.

Note

This method is automatically called by the methods who apply commits.

static get_remote_destination()[source]

Provides the remote destination to use.

Raises:PyFunceble.cli.continuous_integration.exceptions.RemoteURLNotFound – When we could not determine the remote destination.
git_branch

Provides the current state of the _git_branch attribute.

git_distribution_branch

Provides the current state of the _git_distribution_branch attribute.

git_email

Provides the currently state of the _git_email attribute.

git_initialized = False
git_name

Provides the current state of the _git_name attribute.

guess_all_settings() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Try to guess all settings.

guess_and_set_authorized() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Tries to guess the authorization.

guess_and_set_command() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Tries to guess and set the command to execute.

guess_and_set_commit_message() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Tries to guess and set the commit message to apply.

guess_and_set_end_command() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Tries to guess and set the command to execute at the very end.

guess_and_set_end_commit_message() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Tries to guess and set the commit message to apply at the very end.

guess_and_set_git_branch() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Tries to guess and set the Git Branch.

guess_and_set_git_distribution_branch() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Tries to guess and set the Git distribution Branch.

guess_and_set_git_email() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Tries to guess and set the Git Email.

guess_and_set_git_name() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Tries to guess and set the Git Name.

guess_and_set_max_exec_minutes() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Tries to guess and set the maximum execution time.

guess_and_set_token() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Tries to guess and set the token.

init() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Initiate our infrastructure for the current CI engine.

The purpose of this method is to be able to have some custom init based on the CI we are currently on.

The init method should be manually started before runing any further action.

Warning

We assume that we are aware that you should run this method first.

init_git() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Initiate the git repository.

init_git_remote_with_token() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Initiates the git remote URL with the help of the given token.

is_authorized() → bool[source]

Checks if the current object is authorized to run.

is_time_exceeded() → bool[source]

Checks if we exceeded the allocated time we have.

max_exec_minutes

Provides the current state of the _max_exec_minutes attribute.

push_changes(branch: str, *, exit_it: bool = True) → None[source]

Pushes the changes.

Parameters:
  • branch – The branch to push.
  • exit_it – Exits after the push ?
Raises:

PyFunceble.cli.continuous_integration.exceptions.StopExecution – When the exit_it is set to True.

set_authorized(value: bool) → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Sets the value of the authorized attribute.

Parameters:value – The value to set.
set_command(value: str) → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Sets the command to work with.

Parameters:value – The command to set.
set_commit_message(value: str) → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Sets the commit message to apply to all commits except the final one.

Parameters:value – The message to set.
set_end_command(value: str) → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Sets the command to execute at the really end of the process with.

Parameters:value – The command to set.
set_end_commit_message(value: str) → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Sets the commit message to apply to the final one.

Parameters:value – The command to set.
set_git_branch(value: str) → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Sets the Git Branch to use.

Parameters:value – The value to set.
set_git_distribution_branch(value: str) → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Sets the Git distribution Branch to use.

Parameters:value – The value to set.
set_git_email(value: str) → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Sets the Git Email to use.

Parameters:value – The value to set.
set_git_name(value: str) → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Sets the Git Name to use.

Parameters:value – The value to set.
set_max_exec_minutes(value: str) → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Sets the maximum waiting time before considering the time as exceeded.

Parameters:value – The command to set.
set_start_time() → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Sets the starting time to now.

set_token(value: str) → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

Sets the token to use.

Parameters:value – The value to set.
start_time = None
token

Provides the current state of the _token attribute.

PyFunceble.cli.continuous_integration.exceptions module

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

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

Provides the exception related to the CI integration.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
exception PyFunceble.cli.continuous_integration.exceptions.ContinuousIntegrationException[source]

Bases: PyFunceble.exceptions.PyFuncebleException

Describes an exception related to the continuous integration.

exception PyFunceble.cli.continuous_integration.exceptions.GitBranchNotFound[source]

Bases: PyFunceble.cli.continuous_integration.exceptions.ContinuousIntegrationException

Describes a missing git branch.

exception PyFunceble.cli.continuous_integration.exceptions.GitDistributionBranchNotFound[source]

Bases: PyFunceble.cli.continuous_integration.exceptions.ContinuousIntegrationException

Describes a missing git distribution branch.

exception PyFunceble.cli.continuous_integration.exceptions.GitEmailNotFound[source]

Bases: PyFunceble.cli.continuous_integration.exceptions.ContinuousIntegrationException

Describes a missing Git Email.

exception PyFunceble.cli.continuous_integration.exceptions.GitNameNotFound[source]

Bases: PyFunceble.cli.continuous_integration.exceptions.ContinuousIntegrationException

Describes a missing Git Name.

exception PyFunceble.cli.continuous_integration.exceptions.RemoteURLNotFound[source]

Bases: PyFunceble.cli.continuous_integration.exceptions.ContinuousIntegrationException

Describes a missing or unknown remote URL.

exception PyFunceble.cli.continuous_integration.exceptions.StartTimeNotFound[source]

Bases: PyFunceble.cli.continuous_integration.exceptions.ContinuousIntegrationException

Describes a missing start time.

exception PyFunceble.cli.continuous_integration.exceptions.StopExecution[source]

Bases: PyFunceble.cli.continuous_integration.exceptions.ContinuousIntegrationException

Informs upstream - or interacting interface - that we pushed the changes and that they need stop everything they plan to do with PyFunceble.

exception PyFunceble.cli.continuous_integration.exceptions.TokenNotFound[source]

Bases: PyFunceble.cli.continuous_integration.exceptions.ContinuousIntegrationException

Describes a missing (Git?(lab|hub)) Token.

PyFunceble.cli.continuous_integration.github_actions module

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

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

Provides the CI engine and detection tool for the GitHub Actions.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.continuous_integration.github_actions.GitHubActions(*, authorized: Optional[bool] = None, git_email: Optional[str] = None, git_name: Optional[str] = None, git_branch: Optional[str] = None, git_distribution_branch: Optional[str] = None, token: Optional[str] = None, command: Optional[str] = None, end_command: Optional[str] = None, commit_message: Optional[str] = None, end_commit_message: Optional[str] = None, max_exec_minutes: Optional[int] = None)[source]

Bases: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase

Provides the interface which detects and work under the GitHub Actions infrastructure.

end_commit_marker = '[GHA skip]'
guess_and_set_authorized() → PyFunceble.cli.continuous_integration.github_actions.GitHubActions[source]

Tries to guess the authorization.

guess_and_set_token() → PyFunceble.cli.continuous_integration.github_actions.GitHubActions[source]

Tries to guess and set the token.

PyFunceble.cli.continuous_integration.gitlab_ci module

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

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

Provides the CI engine and detection tool for the GitLab CI.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.continuous_integration.gitlab_ci.GitLabCI(*, authorized: Optional[bool] = None, git_email: Optional[str] = None, git_name: Optional[str] = None, git_branch: Optional[str] = None, git_distribution_branch: Optional[str] = None, token: Optional[str] = None, command: Optional[str] = None, end_command: Optional[str] = None, commit_message: Optional[str] = None, end_commit_message: Optional[str] = None, max_exec_minutes: Optional[int] = None)[source]

Bases: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase

Provides the interface which detects and work under the GitLab CI infrastructure.

guess_and_set_authorized() → PyFunceble.cli.continuous_integration.gitlab_ci.GitLabCI[source]

Tries to guess the authorization.

guess_and_set_token() → PyFunceble.cli.continuous_integration.gitlab_ci.GitLabCI[source]

Tries to guess and set the token.

init_git_remote_with_token() → PyFunceble.cli.continuous_integration.gitlab_ci.GitLabCI[source]

Initiates the git remote URL with the help of the given token.

PyFunceble.cli.continuous_integration.jenkins module

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

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

Provides the CI engine and detection tool for Jenkins.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.continuous_integration.jenkins.Jenkins(*, authorized: Optional[bool] = None, git_email: Optional[str] = None, git_name: Optional[str] = None, git_branch: Optional[str] = None, git_distribution_branch: Optional[str] = None, token: Optional[str] = None, command: Optional[str] = None, end_command: Optional[str] = None, commit_message: Optional[str] = None, end_commit_message: Optional[str] = None, max_exec_minutes: Optional[int] = None)[source]

Bases: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase

Provides the interface which detects and work under several Jenkins infrastructure.

guess_and_set_authorized() → PyFunceble.cli.continuous_integration.jenkins.Jenkins[source]

Tries to guess the authorization.

guess_and_set_token() → PyFunceble.cli.continuous_integration.jenkins.Jenkins[source]

Tries to guess and set the token.

PyFunceble.cli.continuous_integration.travis_ci module

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

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

Provides the CI engine and detection tool for the Travis CI.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.continuous_integration.travis_ci.TravisCI(*, authorized: Optional[bool] = None, git_email: Optional[str] = None, git_name: Optional[str] = None, git_branch: Optional[str] = None, git_distribution_branch: Optional[str] = None, token: Optional[str] = None, command: Optional[str] = None, end_command: Optional[str] = None, commit_message: Optional[str] = None, end_commit_message: Optional[str] = None, max_exec_minutes: Optional[int] = None)[source]

Bases: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase

Provides the interface which detects and work under the Travis CI infrastructure.

guess_and_set_authorized() → PyFunceble.cli.continuous_integration.travis_ci.TravisCI[source]

Tries to guess the authorization.

guess_and_set_token() → PyFunceble.cli.continuous_integration.travis_ci.TravisCI[source]

Tries to guess and set the token.

PyFunceble.cli.continuous_integration.utils module

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

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

Provides some utilities related to the CI.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.continuous_integration.utils.ci_object(*args, **kwargs) → PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase[source]

A placeholder which provides the CI object to use.

Module contents

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

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

Provides everything we may need for continuous integration aka autosaving and auto commiting.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.entry_points package
Subpackages
PyFunceble.cli.entry_points.pyfunceble package
Submodules
PyFunceble.cli.entry_points.pyfunceble.argsparser module

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

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

Provides our very own argument parser

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.entry_points.pyfunceble.argsparser.OurArgumentParser(prog=None, usage=None, description=None, epilog=None, parents=[], formatter_class=<class 'argparse.HelpFormatter'>, prefix_chars='-', fromfile_prefix_chars=None, argument_default=None, conflict_handler='error', add_help=True, allow_abbrev=True)[source]

Bases: argparse.ArgumentParser

Overwrites some behavior of the default argument parser.

parse_args(args: Optional[Sequence[str]] = None, namespace: Optional[argparse.Namespace] = None) → argparse.Namespace[source]
PyFunceble.cli.entry_points.pyfunceble.cli module

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

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

Provides the endpoint of the PyFunceble CLI tool

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.entry_points.pyfunceble.cli.add_arguments_to_parser(parser: Union[argparse.ArgumentParser, argparse._ArgumentGroup], arguments: List[Tuple[List[str], dict]]) → None[source]

Adds the given argument into the given parser.

PyFunceble.cli.entry_points.pyfunceble.cli.ask_authorization_to_merge_config(missing_key: Optional[str] = None) → bool[source]

Asks the end-user for the authorization to merge the upstream configuration and - finally - return the new authorization status.

Parameters:missing_key – The name of a missing key. If not given, a more generic message will be given to end-user.
PyFunceble.cli.entry_points.pyfunceble.cli.get_ci_group_data() → List[Tuple[List[str], dict]][source]

Provides the argument of the CI group data.

PyFunceble.cli.entry_points.pyfunceble.cli.get_configured_value(entry: str, *, negate=False) → Any[source]

Provides the currently configured value.

Parameters:
  • entry

    An entry to check.

    multilevel should be separated with a point.

  • negate – Allows us to negate the result from the configuration.
Raises:

ValueError – When the given entry is not found.

PyFunceble.cli.entry_points.pyfunceble.cli.get_database_control_group_data() → List[Tuple[List[str], dict]][source]

Provides the arguments of the database group.

PyFunceble.cli.entry_points.pyfunceble.cli.get_default_group_data() → List[Tuple[List[str], dict]][source]

Provides the argument of the default group.

PyFunceble.cli.entry_points.pyfunceble.cli.get_dns_control_group_data() → List[Tuple[List[str], dict]][source]

Provides the argument of the DNS control group.

PyFunceble.cli.entry_points.pyfunceble.cli.get_filtering_group_data() → List[Tuple[List[str], dict]][source]

Provides the argument of the filtering group.

PyFunceble.cli.entry_points.pyfunceble.cli.get_multiprocessing_group_data() → List[Tuple[List[str], dict]][source]

Provides the argument of the multiprocessing group data.

PyFunceble.cli.entry_points.pyfunceble.cli.get_output_control_group_data() → List[Tuple[List[str], dict]][source]

Provides the argument of the output group.

PyFunceble.cli.entry_points.pyfunceble.cli.get_proxy_control_group_data() → List[Tuple[List[str], dict]][source]

Provides the argument of the proxy control group.

PyFunceble.cli.entry_points.pyfunceble.cli.get_source_group_data() → List[Tuple[List[str], dict]][source]

Provides the arguments of the source group.

PyFunceble.cli.entry_points.pyfunceble.cli.get_test_control_group_data() → List[Tuple[List[str], dict]][source]

Provides the argument of the test control data group.

PyFunceble.cli.entry_points.pyfunceble.cli.tool() → None[source]

Provides the CLI of PyFunceble.

Module contents

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

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

Provides (a bit more that “usual”) what is needed by the PyFunceble CLI tool.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Submodules
PyFunceble.cli.entry_points.clean module

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

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

Provides the endpoints related to the cleanup of the data we produce.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.entry_points.clean.cleaner() → None[source]

Provides the CLI for the public file generation.

PyFunceble.cli.entry_points.iana module

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

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

Provides the endpoints related to our own version of the iana database.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.entry_points.iana.generator() → None[source]

Provides the CLI for the IANA file generation.

PyFunceble.cli.entry_points.production module

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

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

Provides the endpoints related to our production preparation.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.entry_points.production.producer() → None[source]

Provides the CLI for the production preparator.

PyFunceble.cli.entry_points.public_suffix module

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

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

Provides the endpoints related to our own version of the public suffix file.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.entry_points.public_suffix.generator() → None[source]

Provides the CLI for the public file generation.

Module contents

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

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

Provides all our entry points.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.filesystem package
Subpackages
PyFunceble.cli.filesystem.dir_structure package
Submodules
PyFunceble.cli.filesystem.dir_structure.backup module

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

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

Provides an interface for the backup of the directory structure.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.filesystem.dir_structure.backup.DirectoryStructureBackup(parent_dirname: Optional[str] = None, source_file: Optional[str] = None)[source]

Bases: PyFunceble.cli.filesystem.dir_structure.base.DirectoryStructureBase

Provides the base of all dir structure classes.

get_backup_data() → dict[source]

Provides the data which acts as a backup.

start() → PyFunceble.cli.filesystem.dir_structure.backup.DirectoryStructureBackup[source]

Starts the backup process.

store_backup() → PyFunceble.cli.filesystem.dir_structure.backup.DirectoryStructureBackup[source]

Stores the backup at the current destination.

PyFunceble.cli.filesystem.dir_structure.base module

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

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

Provides the base of all directory structure classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.filesystem.dir_structure.base.DirectoryStructureBase(parent_dirname: Optional[str] = None, source_file: Optional[str] = None)[source]

Bases: PyFunceble.cli.filesystem.dir_base.FilesystemDirBase

Provides the base of all dir structure classes.

cleanup() → PyFunceble.cli.filesystem.dir_structure.base.DirectoryStructureBase[source]

Cleans the output directory.

get_backup_data() → dict[source]

Provides the data to manipulate.

get_path_without_base_dir(full_path: str) → str[source]

Given a full path, we remove the base dir.

set_source_file(value: str) → PyFunceble.cli.filesystem.dir_structure.base.DirectoryStructureBase[source]

Sets the value of the source file to use.

Parameters:value – The value to set.
source_file

Provides the current state of the _source_file attribute.

start() → PyFunceble.cli.filesystem.dir_structure.base.DirectoryStructureBase[source]

Starts the whole process.

std_source_file = None
PyFunceble.cli.filesystem.dir_structure.restore module

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

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

Provides an interface for the backup of the directory structure.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.filesystem.dir_structure.restore.DirectoryStructureRestoration(parent_dirname: Optional[str] = None, source_file: Optional[str] = None)[source]

Bases: PyFunceble.cli.filesystem.dir_structure.base.DirectoryStructureBase

Provides the base of all dir structure classes.

get_backup_data() → dict[source]

Stores the backup at the current destination.

restore_from_backup() → PyFunceble.cli.filesystem.dir_structure.restore.DirectoryStructureRestoration[source]

Restores or reconstruct the output directory.

start() → PyFunceble.cli.filesystem.dir_structure.restore.DirectoryStructureRestoration[source]

Starts the restoration process.

Module contents

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

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

Provides everything related to the generation of backup of the directory structure.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.filesystem.printer package
Submodules
PyFunceble.cli.filesystem.printer.base module

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

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

Provides the base of all our printers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.filesystem.printer.base.PrinterBase(template_to_use: Optional[str] = None, *, dataset: Optional[Dict[str, str]] = None)[source]

Bases: object

Provides the base of all printer class.

Printer classes are classes which derivate from this class. their objectives should be the same: Unify and simplify the way to print something to a given destination.

HEADERS = {'amount': 'Amount', 'checker_type': 'Checker', 'days': 'Days', 'expiration_date': 'Expiration Date', 'hours': 'Hours', 'http_status_code': 'HTTP Code', 'idna_subject': 'Subject', 'ip': 'IP', 'minutes': 'Minutes', 'percentage': 'Percentage', 'registrar': 'Registrar', 'seconds': 'Seconds', 'status': 'Status', 'status_source': 'Source'}
STD_LENGTH = {'amount': 12, 'checker_type': 13, 'days': 2, 'expiration_date': 17, 'hours': 2, 'http_status_code': 10, 'idna_subject': 100, 'minutes': 2, 'percentage': 12, 'registrar': 30, 'seconds': 6, 'status': 11, 'status_source': 10}
STD_UNKNOWN = 'Unknown'
TEMPLATES = {'all': <string.Template object>, 'execution_time': <string.Template object>, 'hosts': <string.Template object>, 'less': <string.Template object>, 'percentage': <string.Template object>, 'plain': <string.Template object>, 'registrar': <string.Template object>, 'simple': <string.Template object>}
dataset

Provides the current state of the _dataset attribute.

ensure_dataset_is_given()[source]

Ensures that the dataset to write is given before launching the decorated method.

Raises:TypeError – When the current self.template_to_use is not set.
ensure_template_to_use_is_given()[source]

Ensures that the template to use is given before launching the decorated method.

Raises:TypeError – When the current self.template_to_use is not set.
get_header_to_print() → str[source]

Provides the template header to print.

get_line_to_print() → str[source]

Provides the line to print.

print_header() → None[source]

Prints the header.

print_interpolated_line() → None[source]

Prints the line where we are suppose to write it.

set_dataset(value: Dict[str, str]) → PyFunceble.cli.filesystem.printer.base.PrinterBase[source]

Sets the dataset to apply to the template.

Parameters:value – The value to set.
set_template_to_use(value: str) → PyFunceble.cli.filesystem.printer.base.PrinterBase[source]

Sets the template to use.

Parameters:value – The value to set.
template_to_use

Provides the current state of the _template_to_use attribute.

PyFunceble.cli.filesystem.printer.file module

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

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

Provides the file printer.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.filesystem.printer.file.FilePrinter(template_to_use: Optional[str] = None, *, dataset: Optional[Dict[str, str]] = None, destination: Optional[str] = None)[source]

Bases: PyFunceble.cli.filesystem.printer.base.PrinterBase

Provides the file printer.

STD_FILE_GENERATION = '# Generated by PyFunceble (v4.2.0.) / https://pyfunceble.github.io\n'
allow_coloration = True
destination

Provides the current state of the _destination attribute.

ensure_destination_is_given()[source]

Ensures that the destination is given before launching the decorated method.

Raises:TypeError – When the current self.template_to_use is not set.
file_helper = <PyFunceble.helpers.file.FileHelper object>
static get_generation_date_line() → str[source]

Provides the line which informs of the date a file was generated.

print_interpolated_line() → None[source]

Prints the interpolated line into the destination.

propagate_destination()[source]

Propagates the new value of the destination just after launching the decorated method.

set_destination(value: str) → PyFunceble.cli.filesystem.printer.file.FilePrinter[source]

Sets the destination to use.

Parameters:value – The value to set.
PyFunceble.cli.filesystem.printer.stdout module

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

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

Provides the stdout printer.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.filesystem.printer.stdout.StdoutPrinter(template_to_use: Optional[str] = None, *, dataset: Optional[Dict[str, str]] = None, allow_coloration: Optional[bool] = None)[source]

Bases: PyFunceble.cli.filesystem.printer.base.PrinterBase

Provides the stdout printer.

BACKGROUND_COLORATED = ['all', 'less']
FOREGROUND_COLORATED = ['percentage', 'simple']
STATUS2BACKGROUND_COLOR = {'ACTIVE': '\x1b[30m\x1b[42m', 'INACTIVE': '\x1b[30m\x1b[41m', 'INVALID': '\x1b[30m\x1b[46m', 'MALICIOUS': '\x1b[30m\x1b[41m', 'SANE': '\x1b[30m\x1b[42m', 'VALID': '\x1b[30m\x1b[42m'}
STATUS2FORGROUND_COLOR = {'ACTIVE': '\x1b[1m\x1b[32m', 'INACTIVE': '\x1b[1m\x1b[31m', 'INVALID': '\x1b[1m\x1b[36m', 'MALICIOUS': '\x1b[1m\x1b[31m', 'SANE': '\x1b[1m\x1b[32m', 'VALID': '\x1b[1m\x1b[32m'}
STD_ALLOW_COLORATION = True
STD_FILE_HEADER = '# Generated by PyFunceble (v4.2.0.) / https://pyfunceble.github.io\n'
allow_coloration

Provides the current state of the _allow_coloration attribute.

guess_allow_coloration() → PyFunceble.cli.filesystem.printer.stdout.StdoutPrinter[source]

Try to guess and set the allow_coloration attribute.

print_interpolated_line()[source]

Prints the interpolated line into the destination.

set_allow_coloration(value: bool) → PyFunceble.cli.filesystem.printer.stdout.StdoutPrinter[source]

Sets the authorization to use the coloration.

Parameters:value – The value to set.
Module contents

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

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

Provides everything related to what we actually print (output) or to a file.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Submodules
PyFunceble.cli.filesystem.cleanup module

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

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

Provides everything related to the cleanup of the filesystem.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.filesystem.cleanup.FilesystemCleanup(parent_dirname: Optional[str] = None, *, db_session: Optional[PyFunceble.database.session.DBSession] = None)[source]

Bases: PyFunceble.cli.filesystem.dir_base.FilesystemDirBase

Provides the interface for the cleanup of the filesystem.

clean_database() → PyFunceble.cli.filesystem.cleanup.FilesystemCleanup[source]

Cleanups the uneeded data that were stored in the database.

Warning

This method cleans everything except the WHOIS records.

clean_output_files() → PyFunceble.cli.filesystem.cleanup.FilesystemCleanup[source]

Cleanups the unneeded files from the output directory.

file_helper = <PyFunceble.helpers.file.FileHelper object>
output_files_to_delete

Provides the list of output files to delete.

start() → PyFunceble.cli.filesystem.cleanup.FilesystemCleanup[source]

Starts the cleanup of everything unneeded.

PyFunceble.cli.filesystem.counter module

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

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

Provides everything related to our counter tracker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.filesystem.counter.FilesystemCounter(parent_dirname: Optional[str] = None, *, db_session: Optional[PyFunceble.database.session.DBSession] = None)[source]

Bases: PyFunceble.cli.filesystem.json_base.FilesystemJSONBase

Provides our counter.

PERCENTAGE_STATUSES = {'AVAILABILITY': ['ACTIVE', 'INACTIVE', 'INVALID'], 'REPUTATION': ['SANE', 'MALICIOUS'], 'SYNTAX': ['VALID', 'INVALID']}
SOURCE_FILE = 'counter.json'
STD_DATASET = {'counter': {'ACTIVE': 0, 'INACTIVE': 0, 'INVALID': 0, 'MALICIOUS': 0, 'SANE': 0, 'VALID': 0, 'total': 0}, 'percentage': {'ACTIVE': 0, 'INACTIVE': 0, 'INVALID': 0, 'MALICIOUS': 0, 'SANE': 0, 'VALID': 0, 'total': 0}}
count(status: PyFunceble.checker.status_base.CheckerStatusBase) → PyFunceble.cli.filesystem.counter.FilesystemCounter[source]

Starts the counting process.

Parameters:status – The status to count into our dataset.
get_dataset_for_printer() → List[Dict[str, Union[str, int]]][source]

Provides the dataset that the printer may understand.

Raises:ValueError – When the current testing mode is not supported (yet?).
get_sorted_dataset() → List[Tuple[str, float]][source]

Provides the datasets in a sorted manner.

PyFunceble.cli.filesystem.dir_base module

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

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

Provides a common base to the manipulation of the output directory.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.filesystem.dir_base.FilesystemDirBase(parent_dirname: Optional[str] = None, *, db_session: Optional[PyFunceble.database.session.DBSession] = None)[source]

Bases: object

Provides a common base for the manipulation of our output directory.

INLINE_DEST = '_inline_'
db_session = None
differ_to_inline

Provides the current state of the _differ_to_inline attribute.

get_output_basedir() → str[source]

Provides the output base directory.

Parameters:create_if_missing – Authorizes the creation of the directory if it’s missing.
parent_dirname

Provides the current state of the _parent_dirname attribute.

set_differ_to_inline(value: bool) → PyFunceble.cli.filesystem.dir_base.FilesystemDirBase[source]

Allows/Disallow the split to the inline directory. The attribute can be set when you want to overwrite the behavior of the get_output_basedir method.

Parm value:The value to set.
set_parent_dirname(value: str) → PyFunceble.cli.filesystem.dir_base.FilesystemDirBase[source]

Sets the parent dirname. The parent dirname is a directory which acts a parent into the output directory.

Parm value:The value to set.
PyFunceble.cli.filesystem.json_base module

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

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

Provides a base for the manipulation of JSON files.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.filesystem.json_base.FilesystemJSONBase(parent_dirname: Optional[str] = None, *, db_session: Optional[PyFunceble.database.session.DBSession] = None)[source]

Bases: PyFunceble.cli.filesystem.dir_base.FilesystemDirBase

A base interface for the manipulation of JSON files.

SOURCE_FILE = None
STD_DATASET = {}
dataset = {}
fetch_dataset() → PyFunceble.cli.filesystem.json_base.FilesystemJSONBase[source]

Fetch the dataset from the source file.

fetch_dataset_beforehand()[source]

Updates the dataset to work with before launching the decorated method.

save_dataset() → PyFunceble.cli.filesystem.json_base.FilesystemJSONBase[source]

Saves the current dataset into it’s final destination.

save_dataset_afterwards()[source]

Saves the dataset after launching the decorated method.

source_file_path = None
update_source_file_path_beforehand()[source]

Updates the source file before launching the decorated method.

PyFunceble.cli.filesystem.registrar_counter module

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

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

Provides everything related to the registrar counter.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.filesystem.registrar_counter.RegistrarCounter(parent_dirname: Optional[str] = None, *, db_session: Optional[PyFunceble.database.session.DBSession] = None)[source]

Bases: PyFunceble.cli.filesystem.json_base.FilesystemJSONBase

Provides our registrar stats counter.

SOURCE_FILE = 'registrar_counter.json'
STD_DATASET = {'counter': {'total': 0}, 'percentage': {'total': 0}}
SUPPORTED_TEST_MODES = ['AVAILABILITY']
count(registrar: str) → PyFunceble.cli.filesystem.registrar_counter.RegistrarCounter[source]

Starts the counting process.

Parameters:registrar – The registrar to count into our dataset.
get_dataset_for_printer(*, limit: Optional[int] = 15) → List[Dict[str, Union[str, int]]][source]

Provides the dataset that the printer may understand.

Parameters:limit

Maximum number of registrars to display.

Warning

If set to None, all registrars will be displayed.

Raises:ValueError – When the current testing mode is not supported (yet?).
PyFunceble.cli.filesystem.status_file module

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

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

Provides everything related to our status file generation.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.filesystem.status_file.StatusFileGenerator(status: Union[PyFunceble.checker.syntax.status.SyntaxCheckerStatus, PyFunceble.checker.availability.status.AvailabilityCheckerStatus, PyFunceble.checker.reputation.status.ReputationCheckerStatus, None] = None, *, allow_hosts_files: Optional[bool] = None, allow_plain_files: Optional[bool] = None, allow_analytic_files: Optional[bool] = None, hosts_ip: Optional[str] = None, allow_unified_file: Optional[bool] = None, parent_dirname: Optional[str] = None, test_dataset: Optional[dict] = None)[source]

Bases: PyFunceble.cli.filesystem.dir_base.FilesystemDirBase

Provides an interface for the generation of the status file from a given status.

STD_ALLOW_ANALYTIC_FILES = True
STD_ALLOW_HOSTS_FILES = True
STD_ALLOW_PLAIN_FILES = True
STD_ALLOW_UNIFIED_FILE = False
STD_HOSTS_IP = '0.0.0.0'
allow_analytic_files

Provides the current state of the _allow_analytic_files attribute.

allow_hosts_files

Provides the current state of the _allow_hosts_files attribute.

allow_plain_files

Provides the current state of the _allow_plain_file attribute.

allow_unified_file

Provides the current state of the allow_unified_file attribute.

ensure_status_is_given()[source]

Ensures that the status is given before launching the decorated method.

Raises:TypeError – When self.status is not set.
file_printer = <PyFunceble.cli.filesystem.printer.file.FilePrinter object>
generate_analytic_file() → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Generates the analytic files.

generate_hosts_file() → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Generates the hosts file.

generate_plain_file() → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Generates the plain file.

generate_splitted_status_file() → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Generates the splitted status file.

generate_unified_status_file() → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Generates the unified status file.

get_output_basedir() → str[source]

Provides the output base directory.

Parameters:create_if_missing – Authorizes the creation of the directory if it’s missing.
guess_all_settings() → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Try to guess all settings.

guess_and_set_allow_analytic_files() → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Tries to guess the value of the allow_analytic_files from the configuration file.

guess_and_set_allow_hosts_files() → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Tries to guess the value of the allow_hosts_files from the configuration file.

guess_and_set_allow_plain_files() → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Tries to guess the value of the allow_plain_files from the configuration file.

guess_and_set_allow_unified_file() → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Tries to guess the value of the allow_unified_file from the configuration file.

guess_and_set_hosts_ip() → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Tries to guess the value of the hosts_ip from the configuration file.

hosts_ip

Provides the current state of the _hosts_ip attribute.

set_allow_analytic_files(value: bool) → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Sets the authorization to generation of analytic files.

Parameters:value – The value to set.
set_allow_hosts_files(value: bool) → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Sets the authorization to generation of hosts files.

Parameters:value – The value to set.
set_allow_plain_files(value: bool) → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Sets the authorization to generation of plain files.

Parameters:value – The value to set.
set_allow_unified_file(value: bool) → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Sets the authorization to generation of the unified status file.

Parameters:value – The value to set.
set_hosts_ip(value: str) → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Sets the hosts IP to use while generating the hosts files.

Parameters:value – The value to set.
set_status(value: PyFunceble.checker.status_base.CheckerStatusBase) → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Sets the status to work with.

Parameters:value – The value to set.
set_test_dataset(value: dict) → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Sets the test dataset which was given to the tester.

Parameters:value – The value to set.
Raises:TypeError – When the given value is not a :py:class`dict`.
start() → PyFunceble.cli.filesystem.status_file.StatusFileGenerator[source]

Starts the generation of everything possible.

status

Provides the current state of the _status attribute.

test_dataset

Provides the current state of the _test_dataset attribute.

Module contents

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

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

Provides everything related to our very own filesystem or output structure.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.migrators package
Subpackages
PyFunceble.cli.migrators.csv_file package
Submodules
PyFunceble.cli.migrators.csv_file.base module

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

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

Provides the base of all CSV file-s migrators.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.csv_file.base.CSVFileMigratorBase(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.base.MigratorBase

Provides the base of all CSV file migrator classes.

FIELDS = None
TO_ADD = None
TO_DELETE = None
ensure_source_file_is_given()[source]

Ensures that the source file is given before launching the decorated method.

Raises:RuntimeError – When the:code:self.source_file is not given.
migrate() → PyFunceble.cli.migrators.base.MigratorBase[source]

Provides the migrator (itself).

source_file = None
start() → PyFunceble.cli.migrators.base.MigratorBase[source]

Starts the migration and everything related to it.

PyFunceble.cli.migrators.csv_file.inactive_source_delete module

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

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

Provides the interface for the deletion of the ‘source’ column from the inactive dataset.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.csv_file.inactive_source_delete.InactiveDatasetDeleteSourceColumnMigrator(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.csv_file.base.CSVFileMigratorBase

Provides the interface for the deletion of the ‘source’ column.

FIELDS = ['idna_subject', 'checker_type', 'destination', 'source', 'tested_at']
TO_ADD = []
TO_DELETE = ['source']
PyFunceble.cli.migrators.csv_file.whois_registrar_add module

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

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

Provides the interface for the addition of the ‘registrar’ column from the whois dataset.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.csv_file.whois_registrar_add.WhoisDatasetAddRegistrarColumnMigrator(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.csv_file.base.CSVFileMigratorBase

Provides the interface for the addition of the ‘registrar’ column.

FIELDS = ['subject', 'idna_subject', 'expiration_date', 'epoch']
TO_ADD = ['registrar']
TO_DELETE = []
Module contents

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

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

Provides the csv file(s) migrators.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.migrators.file_cleanup package
Submodules
PyFunceble.cli.migrators.file_cleanup.base module

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

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

Provides the base of all cleanup migrators.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.file_cleanup.base.FileClenupMigratorBase(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.base.MigratorBase

Provides the base of all file cleanup related migration classes.

ensure_source_file_is_given()[source]

Ensures that the source file is given before launching the decorated method.

Raises:RuntimeError – When the:code:self.source_file is not given.
migrate() → PyFunceble.cli.migrators.file_cleanup.base.FileClenupMigratorBase[source]

Provides the migrator (itself)

source_file = None
start() → PyFunceble.cli.migrators.file_cleanup.base.FileClenupMigratorBase[source]

Starts the migration and everything related to it.

PyFunceble.cli.migrators.file_cleanup.hashes_file module

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

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

Provides the cleaner of the previous - unfamous - hashes file.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.file_cleanup.hashes_file.HashesFileCleanupMigrator(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.file_cleanup.base.FileClenupMigratorBase

Provides the interface for the cleanup of the hashes file.

PyFunceble.cli.migrators.file_cleanup.mining_file module

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

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

Provides the cleaner of the previous - unfamous - mining file.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.file_cleanup.mining_file.MiningFileCleanupMigrator(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.file_cleanup.base.FileClenupMigratorBase

Provides the interface for the cleanup of the mining file.

PyFunceble.cli.migrators.file_cleanup.production_config_file module

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

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

Provides the cleaner of the previous .PyFunceble_production.yaml file.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.file_cleanup.production_config_file.ProductionConfigFileCleanupMigrator(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.file_cleanup.base.FileClenupMigratorBase

Provides the interface for the cleanup of the .PyFunceble_production.yaml file.

Module contents

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

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

Provides the file cleanup migrators.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.migrators.json2csv package
Submodules
PyFunceble.cli.migrators.json2csv.base module

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

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

Provides the base of all JSON 2 CSV migrators.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.json2csv.base.JSON2CSVMigratorBase(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.base.MigratorBase

Provides the base of all JSON to CSV related classes.

dataset = None
ensure_dataset_is_given()[source]

Ensures that the dataset is given before launching the decorated method.

Raises:RuntimeError – When the:code:self.source_file is not given.
ensure_source_file_is_given()[source]

Ensures that the source file is given before launching the decorated method.

Raises:RuntimeError – When the:code:self.source_file is not given.
migrate() → PyFunceble.cli.migrators.json2csv.base.JSON2CSVMigratorBase[source]

Provides the migrator (itself)

source_file = None
start() → PyFunceble.cli.migrators.json2csv.base.JSON2CSVMigratorBase[source]

Starts the migration and everything related to it.

PyFunceble.cli.migrators.json2csv.inactive module

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

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

Provides the our inactive DB migrator.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.json2csv.inactive.InactiveJSON2CSVMigrator(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.json2csv.base.JSON2CSVMigratorBase

The migrator of the inactive database dile.

dataset = None
migrate() → PyFunceble.cli.migrators.json2csv.inactive.InactiveJSON2CSVMigrator[source]

Starts the migration.

PyFunceble.cli.migrators.json2csv.whois module

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

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

Provides the our whois DB migrator.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.json2csv.whois.WhoisJSON2CSVMigrator(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.json2csv.base.JSON2CSVMigratorBase

The migrator of the inactive database dile.

dataset = <PyFunceble.dataset.whois.csv.CSVWhoisDataset object>
migrate() → PyFunceble.cli.migrators.json2csv.whois.WhoisJSON2CSVMigrator[source]

Provides the migration logic.

Module contents

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

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

Provides the JSON to CSV migrators.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.migrators.mariadb package
Submodules
PyFunceble.cli.migrators.mariadb.base module

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

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

Provides the base of all mariadb related migrations.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.mariadb.base.MariaDBMigratorBase(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.db_base.DBMigratorBase

Provides the base of all our mariadb migration.

authorized

Provides the authorization to process.

execute_if_authorized()[source]

Executes the decorated method only if we are authorized to process. Otherwise, apply the given default.

get_rows(statement: str, limit: int = 20) → Generator[Tuple[str, int], dict, None][source]

Run the given statement with a defined limit, and yield each row.

Warning

If you don’t delete the given rows, this method will be infinite.

migrate() → PyFunceble.cli.migrators.mariadb.base.MariaDBMigratorBase[source]

Provides the migration (itself).

start() → PyFunceble.cli.migrators.mariadb.base.MariaDBMigratorBase[source]

Starts the migration if wanted.

PyFunceble.cli.migrators.mariadb.file_and_status module

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

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

Provides the migrator of the pyfunceble_file and pyfunceble_status tables.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.mariadb.file_and_status.FileAndStatusMigrator(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.mariadb.base.MariaDBMigratorBase

Provides the interface which provides the migration of the pyfunceble_file and pyfunceble_status.

authorized

Provides the authorization to process.

migrate() → PyFunceble.cli.migrators.mariadb.file_and_status.FileAndStatusMigrator[source]

Provides the migration (itself).

PyFunceble.cli.migrators.mariadb.whois_record_idna_subject module

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

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

Provides our WHOIS record migrator.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.mariadb.whois_record_idna_subject.WhoisRecordIDNASubjectMigrator(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.mariadb.base.MariaDBMigratorBase

Provides the interface which provides the completion of the missing IDNA subject column.

authorized

Provides the authorization to process.

migrate() → PyFunceble.cli.migrators.mariadb.whois_record_idna_subject.WhoisRecordIDNASubjectMigrator[source]

Provides the migration (itself).

Module contents

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

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

Provides all our mariadb related migrations.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Submodules
PyFunceble.cli.migrators.alembic module

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

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

Provides our very own alembic interface.

Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
Special thanks:
https://pyfunceble.github.io/special-thanks.html
Contributors:
https://pyfunceble.github.io/contributors.html
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.alembic.Alembic(db_session: sqlalchemy.orm.session.Session)[source]

Bases: object

Provides our very own alambic handler.

alembic_config = None
authorized

Provides the authorization to process.

configure() → PyFunceble.cli.migrators.alembic.Alembic[source]

Configure our alembic configuration based on what we need.

db_session = None
downgrade(revision: str = 'head') → PyFunceble.cli.migrators.alembic.Alembic[source]

Upgrades the database structure.

Parameters:revision – The revision to apply.
execute_if_authorized()[source]

Executes the decorated method only if we are authorized to process. Otherwise, apply the given default.

is_revision_different(revision: str) → bool[source]

Checks if the given revision is already set.

Parameters:revision – The revision to check
migration_directory

Provides the location of our migration directory.

migrator_base = None
upgrade(revision: str = 'head') → PyFunceble.cli.migrators.alembic.Alembic[source]

Upgrades the database structure.

Parameters:revision – The revision to apply.
PyFunceble.cli.migrators.base module

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

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

Provides the base of our migrator classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.base.MigratorBase(print_action_to_stdout: bool = False)[source]

Bases: object

Provides the base of all classes.

continuous_integration = None
db_session = None
done = False
print_action_to_stdout = False
start() → PyFunceble.cli.migrators.base.MigratorBase[source]

Starts the migration.

PyFunceble.cli.migrators.db_base module

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

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

Provides the base of all our database migration.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.migrators.db_base.DBMigratorBase(print_action_to_stdout: bool = False)[source]

Bases: PyFunceble.cli.migrators.base.MigratorBase

Provides the base of all our database migration.

authorized

Provides the authorization to run.

does_table_exists(table_name: str) → bool[source]

Checks if the table exists.

Parameters:table_name – The name of the table to check.
execute_if_authorized()[source]

Executes the decorated method only if we are authorized to process. Otherwise, apply the given default.

start() → PyFunceble.cli.migrators.base.MigratorBase[source]

Starts the migration.

Module contents

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

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

Provides our system migrators.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.processes package
Subpackages
PyFunceble.cli.processes.workers package
Submodules
PyFunceble.cli.processes.workers.base module

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

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

Provides the base of all our workers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.workers.base.WorkerBase(input_queue: Optional[queue.Queue], output_queue: Optional[queue.Queue] = None, global_exit_event: Optional[multiprocessing.context.BaseContext.Event] = None, *, name: Optional[str] = None, daemon: Optional[bool] = None, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, configuration: Optional[dict] = None)[source]

Bases: multiprocessing.context.Process

Provides the base of all our workers.

Parameters:
  • input_queue – The input queue to read.
  • output_queue – The output queue to write.
BREAKOFF = 2.0
MINING_WAIT_TIME = 60
STD_NAME = 'pyfunceble_base_worker'
accept_waiting_delay = None
add_to_input_queue(data: Any, *, worker_name: Optional[str] = None, destination_worker: Optional[str] = None) → PyFunceble.cli.processes.workers.base.WorkerBase[source]

Adds the given data to the current queue.

Parameters:
  • data – The data to add into the queue.
  • destination_worker – The name of the worker which is supposed to read the message.
add_to_output_queue(data: Any, *, worker_name: Optional[str] = None, destination_worker: Optional[str] = None) → PyFunceble.cli.processes.workers.base.WorkerBase[source]

Adds the given data to the output queue queue.

Parameters:data – The data to add into the queue.
concurrent_worker_names = None
continuous_integration = None
db_session = None
exception

Provides the exception of the current worker.

exit_it = None
global_exit_event = None
input_queue = None
output_queue = None
run() → None[source]

Method to be run in sub-process; can be overridden in sub-class

send_stop_message = None
share_waiting_message(*, overall: bool = False, ignore_current_worker: bool = False, apply_breakoff: bool = False) → PyFunceble.cli.processes.workers.base.WorkerBase[source]

Shares a waiting message to both input and output queues. The idea is to keep our worker awake when necessary. This functionality is really important when running the mining worker because sometime the flow is so long, that we may need some time.

Parameters:
  • overall – Shares the message multiple time to specific destination in our current stack.
  • ignore_current_worker – Doesn’t share the message with ourself.
  • apply_breakoff – Activates the breakoff (sleep) before starting to share the message.
target(consumed: Any) → Optional[Tuple[Any, ...]][source]

This the target that is run to process something. This method should return a result which will pu send to the output queue.

terminate() → None[source]

Terminate our worker.

PyFunceble.cli.processes.workers.chancy_producer module

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

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

Provides our producer worker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.workers.chancy_producer.ChancyProducerWorker(input_queue: Optional[queue.Queue], output_queue: Optional[queue.Queue] = None, global_exit_event: Optional[multiprocessing.context.BaseContext.Event] = None, *, name: Optional[str] = None, daemon: Optional[bool] = None, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, configuration: Optional[dict] = None)[source]

Bases: PyFunceble.cli.processes.workers.producer.ProducerWorker

Provides our chancy producer worker.

Warning

This chancy producer does not provide any guarantee. The flow that keep PyFunceble safe are here unleashed.

USE AT YOUR OWN RISK. GOOD LUCK!

STD_NAME = 'pyfunceble_chancy_producer_worker'
target(consumed: Any) → Optional[Tuple[Any, ...]][source]

This the target that is run to process something. This method should return a result which will pu send to the output queue.

PyFunceble.cli.processes.workers.chancy_tester module

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

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

Provides our chancy tester worker. The chancy tester worker is a worker that abstract from the standard tester worker. It just get rid of the walls between some of the component of our data workflow.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.workers.chancy_tester.ChancyTesterWorker(input_queue: Optional[queue.Queue], output_queue: Optional[queue.Queue] = None, global_exit_event: Optional[multiprocessing.context.BaseContext.Event] = None, *, name: Optional[str] = None, daemon: Optional[bool] = None, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, configuration: Optional[dict] = None)[source]

Bases: PyFunceble.cli.processes.workers.tester.TesterWorker

Provides our chancy tester worker. The chancy worker breaks the walls between some of the core component of our data workflow.

Warning

This chancy tester does not provide any guarantee. The flow that keep PyFunceble safe are here unleashed.

USE AT YOUR OWN RISK. GOOD LUCK!

STD_NAME = 'pyfunceble_chancy_tester_worker'
target(consumed: dict) → Optional[Tuple[Any, ...]][source]

The actually wall destructor.

Parameters:consummed – The data that needs to be tested.
PyFunceble.cli.processes.workers.dir_files_sorter module

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

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

Provides our directory files sorter worker. This is the description of a single directory file sorter worker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.workers.dir_files_sorter.DireFileSorterWorker(input_queue: Optional[queue.Queue], output_queue: Optional[queue.Queue] = None, global_exit_event: Optional[multiprocessing.context.BaseContext.Event] = None, *, name: Optional[str] = None, daemon: Optional[bool] = None, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, configuration: Optional[dict] = None)[source]

Bases: PyFunceble.cli.processes.workers.file_sorter_base.FileSorterWorkerBase

Provides our directory files sorter worker. The objective of this worker is to provides a single worker (or process if you prefer) which will be used to handle the sorting of the content of a submitted directory.

Expected (input) message:

{
    "directory": str,
    "remove_duplicates": bool,
    "write_header": bool
}

Expected (output) message:

None
STD_NAME = 'pyfunceble_dir_files_sorter_worker'
static get_files_to_sort(directory: str) → List[str][source]

Provides the list of files to sort.

Parameters:directory – The directory to start from.
target(consumed: Any) → Optional[Tuple[Any, ...]][source]

This the target that is run to process something. This method should return a result which will pu send to the output queue.

PyFunceble.cli.processes.workers.file_sorter module

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

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

Provides our file sorter worker. This is the description of a file sorter worker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.workers.file_sorter.FileSorterWorker(input_queue: Optional[queue.Queue], output_queue: Optional[queue.Queue] = None, global_exit_event: Optional[multiprocessing.context.BaseContext.Event] = None, *, name: Optional[str] = None, daemon: Optional[bool] = None, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, configuration: Optional[dict] = None)[source]

Bases: PyFunceble.cli.processes.workers.file_sorter_base.FileSorterWorkerBase

Provides our file sorter worker. The objective of this worker is to provides a single worker (or process if you prefer) which will be used to handle the sorting of the content of a given file.

Expected (input) message:

{
    "file": str,
    "remove_duplicates": bool,
    "write_header": bool
}

Expected (output) message:

None
STD_NAME = 'pyfunceble_file_sorter_worker'
target(consumed: Any) → Optional[Tuple[Any, ...]][source]

This the target that is run to process something. This method should return a result which will pu send to the output queue.

PyFunceble.cli.processes.workers.file_sorter_base module

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

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

Provides our file sorter worker base. This is the base of all our file sorter.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.workers.file_sorter_base.FileSorterWorkerBase(input_queue: Optional[queue.Queue], output_queue: Optional[queue.Queue] = None, global_exit_event: Optional[multiprocessing.context.BaseContext.Event] = None, *, name: Optional[str] = None, daemon: Optional[bool] = None, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, configuration: Optional[dict] = None)[source]

Bases: PyFunceble.cli.processes.workers.base.WorkerBase

Provides our the base of all our file sorters.

FILE_BUFFER_SIZE = 65536
MAX_LINES = 32000
classmethod process_file_sorting(file: str, remove_duplicates: bool = True, write_header: bool = True, sorting_key: Any = None) → None[source]

Process the sorting of the given file.

The idea is to split the file piece by piece and at the end join all sorted files. For that job, we create a temporary directory which will store the temporary files.

Parameters:
  • file – The file to sort.
  • remove_duplicates – Activates the deletion of duplicates.
  • write_header

    Activates the writing of the PyFunceble related header.

    Warning

    When this is set to True, we assume that the header itself was already given. Meaning that the first 2 commented lines will be excluded from the sorting and regenerated.

  • sorting_key

    The sorting key to apply while sorting.

    This is the lambda/function that goes into the key argument of the sorted function.

PyFunceble.cli.processes.workers.migrator module

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

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

Provides our migrator (base) worker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.workers.migrator.MigratorWorker(input_queue: Optional[queue.Queue], output_queue: Optional[queue.Queue] = None, global_exit_event: Optional[multiprocessing.context.BaseContext.Event] = None, *, name: Optional[str] = None, daemon: Optional[bool] = None, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, configuration: Optional[dict] = None)[source]

Bases: PyFunceble.cli.processes.workers.base.WorkerBase

Provides our migrator (base) worker. The objective of this worker is to provides a single worker (or process if you prefer) which will be used to handle the mining of dataset to test.

STD_NAME = 'pyfunceble_migrator_worker'
run() → None[source]

Method to be run in sub-process; can be overridden in sub-class

PyFunceble.cli.processes.workers.miner module

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

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

Provides our miner worker. This is the description of a single miner worker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.workers.miner.MinerWorker(input_queue: Optional[queue.Queue], output_queue: Optional[queue.Queue] = None, global_exit_event: Optional[multiprocessing.context.BaseContext.Event] = None, *, name: Optional[str] = None, daemon: Optional[bool] = None, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, configuration: Optional[dict] = None)[source]

Bases: PyFunceble.cli.processes.workers.base.WorkerBase

Provides our miner worker. The objective of this worker is to provides a single worker (or process if you prefer) which will be used to handle the mining of dataset to test.

INACTIVE_STATUSES = ('INACTIVE', 'INVALID')
STD_NAME = 'pyfunceble_miner_worker'
static mine_from(subject: str) → Optional[List[str]][source]

Given the subject to work from, try to get the related subjects.

Parameters:subject – The URL to start from.
target(consumed: Tuple[dict, PyFunceble.checker.status_base.CheckerStatusBase]) → None[source]

This the target that is run to process something. This method should return a result which will pu send to the output queue.

url2netloc = None
PyFunceble.cli.processes.workers.producer module

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

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

Provides our producer worker. This is the description of a single producer worker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.workers.producer.ProducerWorker(input_queue: Optional[queue.Queue], output_queue: Optional[queue.Queue] = None, global_exit_event: Optional[multiprocessing.context.BaseContext.Event] = None, *, name: Optional[str] = None, daemon: Optional[bool] = None, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, configuration: Optional[dict] = None)[source]

Bases: PyFunceble.cli.processes.workers.base.WorkerBase

Provides our producer worker. The objective of this worker is to provides a single worker (or process if you prefer) which will be used to handle the production of output to stdout or files.

INACTIVE_STATUSES = ('INACTIVE', 'INVALID')
STD_NAME = 'pyfunceble_producer_worker'
collection_query_tool = None
continue_dataset = None
counter = None
file_printer = None
header_already_printed = None
inactive_dataset = None
registrar_counter = None
run_continue_backup(test_dataset: dict, test_result: PyFunceble.checker.status_base.CheckerStatusBase) → None[source]

Runs the backup or update of the auto-continue dataset storage.

run_counter(test_dataset: dict, test_result: PyFunceble.checker.status_base.CheckerStatusBase) → None[source]

Runs the counter of the current file.

run_ignored_file_printer(test_dataset: dict, test_result: str) → None[source]

Runs the analytic behind the file printer.

Warning

Thie method assume that the givne dataset is ignored from the normal file printer.

run_inactive_backup(test_dataset: dict, test_result: PyFunceble.checker.status_base.CheckerStatusBase) → None[source]

Runs the backup or update of the Inactive dataset storage.

The idea is that if the status is OK (active), we just remove it from the dataset storage. Otherwise, we just keep it in there :-)

run_status_file_printer(test_dataset: dict, test_result: PyFunceble.checker.status_base.CheckerStatusBase) → None[source]

Runs the status file printer.

run_stdout_printer(test_result: PyFunceble.checker.status_base.CheckerStatusBase) → None[source]

Runs the stdout printer (if necessary).

Parameters:test_result – The rest result dataset.
run_whois_backup(test_result: PyFunceble.checker.status_base.CheckerStatusBase) → None[source]

Runs the backup or update of the WHOIS record in our dataset storage.

Parameters:test_result – The test result.
should_we_block_status_file_printer(test_dataset: dict, test_result: PyFunceble.checker.status_base.CheckerStatusBase) → bool[source]

Checks if we should block the file printer.

The reason behindn this is that we don’t want to generate an output when a subject was already into the inactive database.

static should_we_ignore(test_result: PyFunceble.checker.status_base.CheckerStatusBase) → bool[source]

Checks if we should ignore the given datasets.

Parameters:test_result – The test result to check.
static should_we_print_status_to_stdout(status: str) → bool[source]

Checks if we are allows to print the given status (to stdout).

Parameters:status – The status to check.
status_file_generator = None
stdout_printer = None
target(consumed: Any) → Optional[Tuple[Any, ...]][source]

This the target that is run to process something. This method should return a result which will pu send to the output queue.

whois_dataset = None
PyFunceble.cli.processes.workers.tester module

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

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

Provides our tester worker. This is the description of a single tester worker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.workers.tester.TesterWorker(input_queue: Optional[queue.Queue], output_queue: Optional[queue.Queue] = None, global_exit_event: Optional[multiprocessing.context.BaseContext.Event] = None, *, name: Optional[str] = None, daemon: Optional[bool] = None, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, configuration: Optional[dict] = None)[source]

Bases: PyFunceble.cli.processes.workers.base.WorkerBase

Provides our tester worker. The objective of this worker is to provides a single worker (or process if you prefer) which will be used to handle the tests.

STD_NAME = 'pyfunceble_tester_worker'
continue_dataset = None
inactive_dataset = None
initiated_testing_objects = {}
known_testing_objects = {}
static should_be_ignored(subject: str) → bool[source]

Checks if the given subject should be ignored.

target(consumed: dict) → Optional[Tuple[Any, ...]][source]

This the target that is run to process something. This method should return a result which will pu send to the output queue.

testing_object = None
Module contents

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

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

Provides all our standalone workers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Submodules
PyFunceble.cli.processes.base module

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

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

Provides the base of all multiprocessing jobs.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.base.ProcessesManagerBase(manager: Optional[multiprocessing.context.BaseContext.Manager] = None, max_worker: Optional[int] = None, *, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, input_queue: Optional[queue.Queue] = None, output_queue: Optional[queue.Queue] = None, daemon: bool = False, generate_input_queue: bool = True, generate_output_queue: bool = True, output_queue_num: int = 1, output_workers_count: Optional[int] = None)[source]

Bases: object

Provides the base of all classes.

CPU_COUNT = 2
STD_MAX_WORKER = 1
WORKER_OBJ = None
add_to_all_input_queues(data: Any, *, worker_name: Optional[str] = None, include_destination: bool = False) → PyFunceble.cli.processes.base.ProcessesManagerBase[source]

Adds the given data to the input queues.

Parameters:
  • data – The data to add into the queue.
  • include_destination – Authorizes the addition of the destination into the message.
add_to_all_output_queues(data: Any, *, worker_name: Optional[str] = None) → PyFunceble.cli.processes.base.ProcessesManagerBase[source]

Adds the given data to the output queues.

Parameters:
  • data – The data to add into the queue.
  • worker_name – The name of the worker that is sending the message.
add_to_input_queue(data: Any, *, worker_name: Optional[str] = None) → PyFunceble.cli.processes.base.ProcessesManagerBase[source]

Adds the given data to the current queue.

Parameters:data – The data to add into the queue.
add_to_output_queue(data: Any, *, worker_name: Optional[str] = None) → PyFunceble.cli.processes.base.ProcessesManagerBase[source]

Adds the given data to the output queue.

Parameters:data – The data to add into the queue.
continuous_integration = None
create() → PyFunceble.cli.processes.base.ProcessesManagerBase[source]

Creates the defined amount of worker.

create_workers_if_missing()[source]

Creates the workers if they are missing before launching the decorated method.

daemon = None
ensure_worker_obj_is_given()[source]

Ensures that the worker is properly declared before launching the decorated method.

global_exit_event = None
ignore_if_running()[source]

Ignore the launching of the decorated method if the workers are running.

input_datasets = []

Use this variable if you want to differ the addition in the input queue.

input_queue = None

The input queue. Dataset will be given through this.

is_running() → bool[source]

Checks if a worker is running.

manager = None
max_worker

Provides the number of maximum worker we are allowed to generate.

output_datasets = []

Use this variable if you want to differ the addition in the output queue.

output_queue = None

The output queue. This is where the result of a worker will be put.

send_stop_signal(*, worker_name: Optional[str] = None) → PyFunceble.cli.processes.base.ProcessesManagerBase[source]

Sends a stop message to the input queue.

set_max_worker(value: int) → PyFunceble.cli.processes.base.ProcessesManagerBase[source]

Sets the number of maximum worker we are authorized to generate.

Parameters:value – The value to set.
start() → PyFunceble.cli.processes.base.ProcessesManagerBase[source]

Starts all - previously - created workers.

terminate() → PyFunceble.cli.processes.base.ProcessesManagerBase[source]

Terminates all workers and send a stop message to the declared output queues - which are implicitly dependend of this process “pool”.

wait() → PyFunceble.cli.processes.base.ProcessesManagerBase[source]

Wait until all workers are done.

PyFunceble.cli.processes.chancy_producer module

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

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

Provides the chancy producer manager.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.chancy_producer.ChancyProducerProcessesManager(manager: Optional[multiprocessing.context.BaseContext.Manager] = None, max_worker: Optional[int] = None, *, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, input_queue: Optional[queue.Queue] = None, output_queue: Optional[queue.Queue] = None, daemon: bool = False, generate_input_queue: bool = True, generate_output_queue: bool = True, output_queue_num: int = 1, output_workers_count: Optional[int] = None)[source]

Bases: PyFunceble.cli.processes.base.ProcessesManagerBase

Provides the chancy producer manager.

Warning

The chancy tester shouldn’t be used without any recommendation from a developer or someone in charge of the source code.

It can harm and produce output overflow. You should rely on this ONLY if you believe in your own luck.

WORKER_OBJ

alias of PyFunceble.cli.processes.workers.chancy_producer.ChancyProducerWorker

PyFunceble.cli.processes.chancy_tester module

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

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

Provides the chancy tester manager.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.chancy_tester.ChancyTesterProcessesManager(manager: Optional[multiprocessing.context.BaseContext.Manager] = None, max_worker: Optional[int] = None, *, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, input_queue: Optional[queue.Queue] = None, output_queue: Optional[queue.Queue] = None, daemon: bool = False, generate_input_queue: bool = True, generate_output_queue: bool = True, output_queue_num: int = 1, output_workers_count: Optional[int] = None)[source]

Bases: PyFunceble.cli.processes.base.ProcessesManagerBase

Provides the chancy tester manager.

Warning

The chancy tester shouldn’t be used without any recommendation from a developer or someone in charge of the source code.

It can harm and produce output overflow. You should rely on this ONLY if you believe in your own luck.

WORKER_OBJ

alias of PyFunceble.cli.processes.workers.chancy_tester.ChancyTesterWorker

PyFunceble.cli.processes.dir_files_sorter module

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

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

Provides the directory files sorter manager.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.dir_files_sorter.DirFileSorterProcessesManager(manager: Optional[multiprocessing.context.BaseContext.Manager] = None, max_worker: Optional[int] = None, *, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, input_queue: Optional[queue.Queue] = None, output_queue: Optional[queue.Queue] = None, daemon: bool = False, generate_input_queue: bool = True, generate_output_queue: bool = True, output_queue_num: int = 1, output_workers_count: Optional[int] = None)[source]

Bases: PyFunceble.cli.processes.base.ProcessesManagerBase

Provides the directory files sorter manager.

WORKER_OBJ

alias of PyFunceble.cli.processes.workers.dir_files_sorter.DireFileSorterWorker

PyFunceble.cli.processes.file_sorter module

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

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

Provides the file sorter manager.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.file_sorter.FileSorterProcessesManager(manager: Optional[multiprocessing.context.BaseContext.Manager] = None, max_worker: Optional[int] = None, *, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, input_queue: Optional[queue.Queue] = None, output_queue: Optional[queue.Queue] = None, daemon: bool = False, generate_input_queue: bool = True, generate_output_queue: bool = True, output_queue_num: int = 1, output_workers_count: Optional[int] = None)[source]

Bases: PyFunceble.cli.processes.base.ProcessesManagerBase

Provides the file sorter manager.

WORKER_OBJ

alias of PyFunceble.cli.processes.workers.file_sorter.FileSorterWorker

PyFunceble.cli.processes.migrator module

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

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

Provides the migrator manager.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.migrator.MigratorProcessesManager(manager: Optional[multiprocessing.context.BaseContext.Manager] = None, max_worker: Optional[int] = None, *, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, input_queue: Optional[queue.Queue] = None, output_queue: Optional[queue.Queue] = None, daemon: bool = False, generate_input_queue: bool = True, generate_output_queue: bool = True, output_queue_num: int = 1, output_workers_count: Optional[int] = None)[source]

Bases: PyFunceble.cli.processes.base.ProcessesManagerBase

Provides the migrator manager.

WORKER_OBJ

alias of PyFunceble.cli.processes.workers.migrator.MigratorWorker

create() → PyFunceble.cli.processes.base.ProcessesManagerBase[source]

Creates the defined amount of worker.

static csv_file_add_registrar_column_target(continuous_integration: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase) → None[source]

Provides the target for the addition of the registrar column.

static csv_file_delete_source_column_target(continuous_integration: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase) → None[source]

Provides the target for the deletion of the source column.

static hashes_file_cleanup_target(continuous_integration: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase) → None[source]

Provides the target for the cleanup of the hashes file.

static json2csv_inactive_target(continuous_integration: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase) → None[source]

Provides the target for the inactive database migrator.

static json2csv_whois_target(continuous_integration: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase) → None[source]

Provides the target for the whois database migrator.

static mariadb_file_and_status_target(continuous_integration: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase, *, db_session: Optional[sqlalchemy.orm.session.Session] = None) → None[source]

Provides the target for the migration of the pyfunceble_file and pyfunceble_status tables.

static mariadb_whois_record_idna_subject_target(continuous_integration: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase, *, db_session: Optional[sqlalchemy.orm.session.Session] = None) → None[source]

Provides the target for the whois addition of the missing idna_subject column.

static mining_file_cleanup_target(continuous_integration: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase) → None[source]

Provides the target for the cleanup of the mining file.

static production_config_file_cleanup_target(continuous_integration: PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase) → None[source]

Provides the target for the cleanup of the production configuration file.

start() → PyFunceble.cli.processes.base.ProcessesManagerBase[source]

Starts all - previously - created workers.

PyFunceble.cli.processes.miner module

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

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

Provides the miner manager.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.miner.MinerProcessesManager(manager: Optional[multiprocessing.context.BaseContext.Manager] = None, max_worker: Optional[int] = None, *, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, input_queue: Optional[queue.Queue] = None, output_queue: Optional[queue.Queue] = None, daemon: bool = False, generate_input_queue: bool = True, generate_output_queue: bool = True, output_queue_num: int = 1, output_workers_count: Optional[int] = None)[source]

Bases: PyFunceble.cli.processes.base.ProcessesManagerBase

Provides the miner manager.

WORKER_OBJ

alias of PyFunceble.cli.processes.workers.miner.MinerWorker

PyFunceble.cli.processes.producer module

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

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

Provides the producer manager.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.producer.ProducerProcessesManager(manager: Optional[multiprocessing.context.BaseContext.Manager] = None, max_worker: Optional[int] = None, *, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, input_queue: Optional[queue.Queue] = None, output_queue: Optional[queue.Queue] = None, daemon: bool = False, generate_input_queue: bool = True, generate_output_queue: bool = True, output_queue_num: int = 1, output_workers_count: Optional[int] = None)[source]

Bases: PyFunceble.cli.processes.base.ProcessesManagerBase

Provides the producer manager.

WORKER_OBJ

alias of PyFunceble.cli.processes.workers.producer.ProducerWorker

PyFunceble.cli.processes.tester module

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

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

Provides the tester manager.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.processes.tester.TesterProcessesManager(manager: Optional[multiprocessing.context.BaseContext.Manager] = None, max_worker: Optional[int] = None, *, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, input_queue: Optional[queue.Queue] = None, output_queue: Optional[queue.Queue] = None, daemon: bool = False, generate_input_queue: bool = True, generate_output_queue: bool = True, output_queue_num: int = 1, output_workers_count: Optional[int] = None)[source]

Bases: PyFunceble.cli.processes.base.ProcessesManagerBase

Provides the tester manager.

WORKER_OBJ

alias of PyFunceble.cli.processes.workers.tester.TesterWorker

Module contents

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

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

Provides all our the logic behind our multiprocessing mechanism.

Note

Our processes submodules or class does not extends the multiprocessing module. They are just there to clarify our workflow for future contributors :-)

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.scripts package
Submodules
PyFunceble.cli.scripts.iana module

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

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

Provides our iana file generator.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.scripts.iana.IanaDBGenerator(destination: Optional[str] = None)[source]

Bases: object

Provides an interface for the generation of the iana database file.

IANA_WHOIS_SERVER = 'whois.iana.org'

The WHOIS server provided by the IANA.

MANUAL_SERVER = {'bm': 'whois.afilias-srs.net', 'bz': 'whois.afilias-grs.net', 'cd': 'chois.nic.cd', 'cm': 'whois.netcom.cm', 'fj': 'whois.usp.ac.fj', 'ga': 'whois.my.ga', 'int': 'whois.iana.org', 'ipiranga': ' whois.nic.ipiranga', 'lc': 'whois2.afilias-grs.net', 'now': ' whois.nic.now', 'pharmacy': ' whois.nic.pharmacy', 'piaget': ' whois.nic.piaget', 'ps': 'whois.pnina.ps', 'rw': 'whois.ricta.org.rw', 'shaw': 'whois.afilias-srs.net', 'xn--1ck2e1b': 'whois.nic.xn--1ck2e1b', 'xn--2scrj9c': 'whois.inregistry.net', 'xn--3hcrj9c': 'whois.inregistry.net', 'xn--45br5cyl': 'whois.inregistry.net', 'xn--45brj9c': 'whois.inregistry.net', 'xn--8y0a063a': 'whois.nic.xn--8y0a063a', 'xn--bck1b9a5dre4c': 'whois.nic.xn--bck1b9a5dre4c', 'xn--cck2b3b': 'whois.nic.xn--cck2b3b', 'xn--czr694b': 'whois.nic.xn--czr694b', 'xn--e1a4c': 'whois.eu', 'xn--eckvdtc9d': 'whois.nic.xn--eckvdtc9d', 'xn--fct429k': 'whois.nic.xn--fct429k', 'xn--fpcrj9c3d': 'whois.inregistry.net', 'xn--fzc2c9e2c': 'whois.nic.lk', 'xn--g2xx48c': 'whois.nic.xn--g2xx48c', 'xn--gckr3f0f': 'whois.nic.xn--gckr3f0f', 'xn--gecrj9c': 'whois.inregistry.net', 'xn--gk3at1e': 'whois.nic.xn--gk3at1e', 'xn--h2breg3eve': 'whois.inregistry.net', 'xn--h2brj9c': 'whois.inregistry.net', 'xn--h2brj9c8c': 'whois.inregistry.net', 'xn--imr513n': 'whois.nic.xn--imr513n', 'xn--jvr189m': 'whois.nic.xn--jvr189m', 'xn--kpu716f': 'whois.nic.xn--kpu716f', 'xn--mgba3a3ejt': 'whois.nic.xn--mgba3a3ejt', 'xn--mgbb9fbpob': 'whois.nic.xn--mgbb9fbpob', 'xn--mgbbh1a': 'whois.inregistry.net', 'xn--mgbbh1a71e': 'whois.inregistry.net', 'xn--mgbgu82a': 'whois.inregistry.net', 'xn--nyqy26a': 'whois.nic.xn--nyqy26a', 'xn--otu796d': 'whois.nic.xn--otu796d', 'xn--pbt977c': 'whois.nic.xn--pbt977c', 'xn--rhqv96g': 'whois.nic.xn--rhqv96g', 'xn--rovu88b': 'whois.nic.xn--rovu88b', 'xn--rvc1e0am3e': 'whois.inregistry.net', 'xn--s9brj9c': 'whois.inregistry.net', 'xn--ses554g': 'whois.registry.knet.cn', 'xn--wgbh1c': 'whois.dotmasr.eg', 'xn--xkc2al3hye2a': 'whois.nic.lk', 'xn--xkc2dl3a5ee0h': 'whois.inregistry.net', 'za': 'whois.registry.net.za'}

Provides the upstream link.

database = {}

An internal storage map.

destination

Provides the current state of the _destination attribute.

get_extension_and_referrer_from_block(block: str) → Tuple[Optional[str], Optional[str]][source]

Given an HTML block, we try to extract an extension and it’s underlying referrer (WHOIS server).

The referrer is extracted from the official IANA page, and guessed if missing.

Parameters:block – The block to parse.
get_referrer_from_extension(extension: str) → Optional[str][source]

Given an extension, tries to get or guess its extension.

set_destination(value: str) → PyFunceble.cli.scripts.iana.IanaDBGenerator[source]

Sets the destination to write.

Parameters:value – The value to set.
start(max_workers: Optional[int] = None) → PyFunceble.cli.scripts.iana.IanaDBGenerator[source]

Starts the generation of the dataset file.

Parameters:max_workers – The maximal number of workers we are allowed to use.
PyFunceble.cli.scripts.production module

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

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

Provides some of our scripts.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.scripts.production.ProductionPrep(branch: Optional[str] = None)[source]

Bases: object

Provides an interface for the production file modification. The idea is that we always have 2 branches: the dev and the master branch.

We want to fix all the URL to point to the right one, so this interface just provides everything needed for that job.

Another important part is the cleanup of the production environment. What is meant is the cleanup of the output/ directory and the construction of the dir_structure file.

Warning

This class assumes that you know what you are doing. Meaning that you should run this only if your are developing PyFunceble.

AVAILABLE_BRANCHES = ['dev', 'master']
VERSION_FILE_PATH = '/home/docs/./PyFunceble/version.yaml'
branch

Provides the current state of the _branch attribute.

dict_helper = <PyFunceble.helpers.dict.DictHelper object>
ensure_branch_is_given()[source]

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

Raises:TypeError – When the self.branch is not set.
file_helper = <PyFunceble.helpers.file.FileHelper object>
previous_version = None

Provides the previous version (from version_file_content)

regex_helper = <PyFunceble.helpers.regex.RegexHelper object>
set_branch(value: str) → PyFunceble.cli.scripts.production.ProductionPrep[source]

Sets the branch to act with.

Parameters:value – The value to set.
should_be_deprecated(previous_version: str) → bool[source]

Checks if we should deprecates the current version.

start() → PyFunceble.cli.scripts.production.ProductionPrep[source]

Starts the production process.

static update_code_format() → PyFunceble.cli.scripts.production.ProductionPrep[source]

Updates the format of the source code using black.

update_code_urls() → PyFunceble.cli.scripts.production.ProductionPrep[source]

Updates all URL in the source code.

update_dir_structure_file() → PyFunceble.cli.scripts.production.ProductionPrep[source]

Updates the directory structure.

update_docs_urls() → PyFunceble.cli.scripts.production.ProductionPrep[source]

Updates all URL in the documentation files.

static update_documentation() → PyFunceble.cli.scripts.production.ProductionPrep[source]

Updates the code documentation.

Raises:RuntimeError – When one of the wanted directory is not found.
update_setup_py() → PyFunceble.cli.scripts.production.ProductionPrep[source]

Updates content of setup.py.

Raises:FileNotFoundError – When the setup.py file does not exists.
update_urls(file: str) → PyFunceble.cli.scripts.production.ProductionPrep[source]

Updates the common URLS which are in the given file.

Parameters:file – The file to work with.
Raises:FileNotFoundError – When the given file is not found.
update_version_file() → PyFunceble.cli.scripts.production.ProductionPrep[source]

Updates the version file.

version_file_content = None

A copy of the local version file.

version_utility = <PyFunceble.utils.version.VersionUtility object>
PyFunceble.cli.scripts.public_suffix module

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

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

Provides our public suffix file generator.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.scripts.public_suffix.PublicSuffixGenerator(destination: Optional[str] = None)[source]

Bases: object

Provides an interface for the generation of the public suffix file.

COMMENT_SIGN = ['//', '!']

The sign which we should consider as comment.

Provides the upstream stream.

database = {}

An internal storage of our map.

destination

Provides the current state of the _destination attribute.

parse_line(line: str) → dict[source]

Parses and provides the dataset to save.

set_destination(value: str) → PyFunceble.cli.scripts.public_suffix.PublicSuffixGenerator[source]

Sets the destination to write.

Parameters:value – The value to set.
start(max_workers: Optional[int] = None)[source]

Starts the generation of the dataset file.

wildacrd2subject = <PyFunceble.converter.wildcard2subject.Wildcard2Subject object>
Module contents

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

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

Provides some of our scripts.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.system package
Submodules
PyFunceble.cli.system.base module

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

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

Provides the base of all our subclasses related to the system management.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.system.base.SystemBase(args: Optional[argparse.Namespace] = None)[source]

Bases: object

Provides the base of all system classes. The idea is that every system classes will have access to the argument given by end-user.

Each of them will have a start method which will run a set of predefined action. But the start method -in comparison to previous versions - starts on purpose.

Parameters:args – The arguments from argparse.ArgumentParser.
args

Provides the current state of the _args attribute.

ensure_args_is_given()[source]

Ensures that the self.args attribute is given before launching the decorated method.

set_args(value: argparse.Namespace) → PyFunceble.cli.system.base.SystemBase[source]

Sets the given args.

Parameters:value – The arguments to work with.
start() → PyFunceble.cli.system.base.SystemBase[source]

Provides a launcher for a brunch of predefined actions defined by the current object.

PyFunceble.cli.system.integrator module

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

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

Provides our very own argument parser. Take this as a splitter which runs some actions against other resource before returning the arguments.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.system.integrator.SystemIntegrator(args: Optional[argparse.Namespace] = None)[source]

Bases: PyFunceble.cli.system.base.SystemBase

Provides our system integrator. The idea is that we given an argparse Namespace, we should be able to parse it into our system.

To simplify the trick and headache in the CLI management, I explicitely mapped the dest argument to what we are supposed to have in the flatten version of the configuration. That way, we only need to compare against the flatten version instead of looping over all possible levels of the configuration tree.

check_config() → PyFunceble.cli.system.integrator.SystemIntegrator[source]

Checks or do some sanity check of the configuration.

This method will basically check that the common mistakes while mixing configuration and CLI arguments are not found.

Warning

The messages are not directly printed, but rather stored in the PyFunceble.cli.storage.EXTRA_MESSAGES list.

init_logger() → PyFunceble.cli.system.integrator.SystemIntegrator[source]

Initiate the loggers. In fact, before this moment, in a normal case the logger was not properly initiated. To avoid multiple management place, I took it to the essential.

Warning

If you plan to play with the logger on your own, be sure to follow the same procedure.

inject_into_config() → PyFunceble.cli.system.integrator.SystemIntegrator[source]

Injects the configuration variables into the configuration after comparing each value with the current one.

start() → PyFunceble.cli.system.integrator.SystemIntegrator[source]

Starts a group of actions provided by this interface.

PyFunceble.cli.system.launcher module

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

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

Provides the system launcher. From here, it’s all about real testing.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.system.launcher.SystemLauncher(args: Optional[argparse.Namespace] = None)[source]

Bases: PyFunceble.cli.system.base.SystemBase

Provides the system tests launcher.

adblock_inputline2subject = <PyFunceble.converter.adblock_input_line2subject.AdblockInputLine2Subject object>
checker_type = None
ci_stop_in_the_middle_if_time_exceeded() → PyFunceble.cli.system.launcher.SystemLauncher[source]

Stops our processes as soon as the time is exceeded.

cidr2subject = <PyFunceble.converter.cidr2subject.CIDR2Subject object>
continue_dataset = None
continuous_integration = None
counter = <PyFunceble.cli.filesystem.counter.FilesystemCounter object>
db_session = None
dir_files_sorter_process_manager = None
execution_time_holder = None
file_preloader = None
file_printer = <PyFunceble.cli.filesystem.printer.file.FilePrinter object>
fill_protocol() → PyFunceble.cli.system.launcher.SystemLauncher[source]

Fills the protocol with the information about what we are supposed to test.

fill_to_test_queue_from_protocol() → PyFunceble.cli.system.launcher.SystemLauncher[source]

Read the protocol and fill the testing queue.

generate_waiting_files() → PyFunceble.cli.system.launcher.SystemLauncher[source]

Generates all the files that needs to be generated when all status are proceeses.

inactive_dataset = None
inputline2subject = <PyFunceble.converter.input_line2subject.InputLine2Subject object>
migrator_process_manager = None
miner_process_manager = None
static print_home_ascii() → None[source]

Prints our ASCII home logo.

producer_process_manager = None
registrar_counter = <PyFunceble.cli.filesystem.registrar_counter.RegistrarCounter object>
remove_unwanted_files() → PyFunceble.cli.system.launcher.SystemLauncher[source]

Deletes some unwanted files that needs to be deleted when all status are processed.

rpz_inputline2subject = <PyFunceble.converter.rpz_input_line2subject.RPZInputLine2Subject object>
rpz_policy2subject = <PyFunceble.converter.rpz_policy2subject.RPZPolicy2Subject object>
run_ci_end_saving_instructions() → PyFunceble.cli.system.launcher.SystemLauncher[source]

Runns our CI END “saving” instructions.

The instructions executed by this method are the one we execute before ending a testing session under one of the supported CI engines.

The purpose of this method is to make our instructions available to everybody instead of hiding them into the start method. :-)

Warning

This is the standard “end” instructions. Do not call this method if you are trying to run an action after the CI execution time exceeded.

run_ci_saving_instructions() → PyFunceble.cli.system.launcher.SystemLauncher[source]

Runns our CI “saving” instructions.

The instructions executed by this method are the one we execute before ending a testing session under one of the supported CI engines.

The purpose of this method is to make our instructions available to everybody instead of hiding them into the start method. :-)

Warning

This is the standard “end” instructions. Do not call this method if you are trying to run an action after the CI execution time exceeded.

run_standard_end_instructions() → PyFunceble.cli.system.launcher.SystemLauncher[source]

Runns our standard “end” instructions.

The instructions executed by this method are the one we execute normally.

The purpose of this method is to make our standard end instructions available to everybody instead of hiding them into the start method. :-)

Warning

This is the standard “end” instructions. Do not call this method if you are trying to run an action after the CI execution time exceeded.

sessions_id = {}
start() → PyFunceble.cli.system.launcher.SystemLauncher[source]

Provides a launcher for a brunch of predefined actions defined by the current object.

stdout_printer = <PyFunceble.cli.filesystem.printer.stdout.StdoutPrinter object>
stop_and_wait_for_all_manager() → PyFunceble.cli.system.launcher.SystemLauncher[source]

Sends our stop signal and wait until all managers are finished.

subject2complements = <PyFunceble.converter.subject2complements.Subject2Complements object>
tester_process_manager = None
testing_protocol = []

Saves the protocol which we are going to generate. The protocol will saves a set of information about what to test, what kind of output to produce and most importantly where.

url2netloc = <PyFunceble.converter.url2netloc.Url2Netloc object>
wildcard2subject = <PyFunceble.converter.wildcard2subject.Wildcard2Subject object>
Module contents

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

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

Provides our system handlers. Actually, every success CLI parsing will ends in on of the submodules.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.utils package
Submodules
PyFunceble.cli.utils.sort module

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

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

Provides some utilities related to the sorting mechanism.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.utils.sort.get_best_sorting_key() → Callable[[Any], List[Union[int, Any]]][source]

Provides the best sorting key from the configuration.

PyFunceble.cli.utils.sort.hierarchical(element: Any) → List[Union[int, Any]][source]

Provides the key to use for the hierarchical sorting.

Parameters:element – The element to format.
PyFunceble.cli.utils.sort.standard(element: Any) → List[Union[int, Any]][source]

Provides the key to use for the standard sorting.

Parameters:element – The element to format.
PyFunceble.cli.utils.stdout module

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

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

Provides some utilities related to the CLI stdout.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.utils.stdout.get_template_to_use() → str[source]

Provides the template to use.

PyFunceble.cli.utils.stdout.print_single_line(value: str = '.', end: str = '', *, force: bool = False) → None[source]

Prints the given value in the current line.

Parameters:
  • value – The default value
  • end – Same as the end argument of the built-in print function.
  • force – Forces the printing.
PyFunceble.cli.utils.stdout.print_thanks() → None[source]

Randomly prints our thanks message.

PyFunceble.cli.utils.testing module

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

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

Provides some testing related utilities

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.utils.testing.get_continue_databaset_object(db_session: Optional[sqlalchemy.orm.session.Session] = None) → Union[PyFunceble.dataset.base.DatasetBase, PyFunceble.dataset.csv_base.CSVDatasetBase, PyFunceble.dataset.db_base.DBDatasetBase][source]

Provides the continue object to work with.

Parameters:db_session – A database session to use.
Raises:ValueError – When the given database type is unkown.
PyFunceble.cli.utils.testing.get_destination_from_origin(origin: str) → str[source]

Given the origin, we provides the destination.

PyFunceble.cli.utils.testing.get_inactive_dataset_object(db_session: Optional[sqlalchemy.orm.session.Session] = None) → Union[PyFunceble.dataset.base.DatasetBase, PyFunceble.dataset.csv_base.CSVDatasetBase, PyFunceble.dataset.db_base.DBDatasetBase][source]

Provides the inactive object to work with.

Parameters:db_session – A database session to use.
Raises:ValueError – When the given database type is unkown.
PyFunceble.cli.utils.testing.get_subjects_from_line(line: str, checker_type: str, *, adblock_inputline2subject: Optional[PyFunceble.converter.adblock_input_line2subject.AdblockInputLine2Subject] = None, wildcard2subject: Optional[PyFunceble.converter.wildcard2subject.Wildcard2Subject] = None, rpz_policy2subject: Optional[PyFunceble.converter.rpz_policy2subject.RPZPolicy2Subject] = None, rpz_inputline2subject: Optional[PyFunceble.converter.rpz_input_line2subject.RPZInputLine2Subject] = None, inputline2subject: Optional[PyFunceble.converter.input_line2subject.InputLine2Subject] = None, subject2complements: Optional[PyFunceble.converter.subject2complements.Subject2Complements] = None, url2netloc: Optional[PyFunceble.converter.url2netloc.Url2Netloc] = None, cidr2subject: Optional[PyFunceble.converter.cidr2subject.CIDR2Subject] = None) → List[str][source]

Provides the list of subject to test.

PyFunceble.cli.utils.testing.get_testing_mode() → str[source]

Tries to provides the testing mode to apply to the CLI.

PyFunceble.cli.utils.version module

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

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

Provides the version comparison tool.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.utils.version.get_local_version() → box.box.Box[source]

Provides the state of the local version file.

PyFunceble.cli.utils.version.get_upstream_version() → box.box.Box[source]

Provides the state of the upstream version.

PyFunceble.cli.utils.version.handle_deprecated_version(upstream_version: box.box.Box) → bool[source]

Checks if the current version (local) is deprecated and provides a message to the end-user.

Returns:True if local is deprecated. False otherwise.
PyFunceble.cli.utils.version.handle_force_update(upstream_version: box.box.Box) → None[source]

Checks if we should force the end-user to update.

PyFunceble.cli.utils.version.handle_greater_version(upstream_version: box.box.Box) → None[source]

Checks if the current version (local) is more recent than the upstream one and provides a message.

Returns:True if local is greater. False otherwise.
PyFunceble.cli.utils.version.handle_messages(upstream_version: box.box.Box) → None[source]

Handles and prints the upstream messages.

PyFunceble.cli.utils.version.handle_older_version(upstream_version: box.box.Box) → bool[source]

Checks if the current version (local) is older than the upstream one and provides a message to the end-user.

Returns:True if local is older. False otherwise.
PyFunceble.cli.utils.version.print_central_messages(check_force_update: bool = False) → None[source]

Collect all possible messages from upstream and downstream and print them.

Module contents

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

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

Provides some utilities related to the CLI.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Submodules
PyFunceble.cli.credential_loader module

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

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

Provides our credential loader.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.credential_loader.CredentialLoader(db_type: Optional[str] = None)[source]

Bases: object

Provides our creadential loader.

The idea is to have an interface which provides the credential to use but at the same time load and initiate the credential interface after loading it from the user input or the environment variables.

Parameters:db_type – The database type to load the credential for.
DB_TYPE2OBJ = {'csv': None, 'mariadb': <class 'PyFunceble.database.credential.mariadb.MariaDBCredential'>, 'mysql': <class 'PyFunceble.database.credential.mysql.MySQLCredential'>, 'postgresql': <class 'PyFunceble.database.credential.postgresql.PostgreSQLCredential'>}
ask_for_info(var_name: str, default: Any) → str[source]

Asks the credential to the end-user.

Parameters:
  • var_name – The name of the part to ask for example host or password.
  • default – The default value to return if the user don’t give us anything.
authorized

Provides the authorization to run.

credential = None

The credential (itself).

db_type

Provides the current state of the _db_type attribute.

ensure_db_type_is_given()[source]

Ensure that the db type is given before launching the decorated method.

Raises:TypeError – When the db type is not given.
execute_if_authorized()[source]

Executes the decorated method only if we are authorized to process. Otherwise, apply the given default.

get_uri() → str[source]

Provides the URI to use.

is_already_loaded() → bool[source]

Checks if the credential was already loaded.

set_credential_var(var_name: str, value: Any) → PyFunceble.cli.credential_loader.CredentialLoader[source]

Sets the given var_name of the credential object with the given value.

Parameters:
  • var_name – The name of the variable to set.
  • value – The value of to set.
set_db_type(value: str) → PyFunceble.cli.credential_loader.CredentialLoader[source]

Sets the database type to work with.

Parameters:value – The value to set.
start(*, ignore_cli: bool = True) → PyFunceble.cli.credential_loader.CredentialLoader[source]

Starts the loading of the credential.

Parameters:ignore_cli – Ignore questions to end-user.
start_if_not_started()[source]

Launches the start method before launching the decorated method.

PyFunceble.cli.execution_time module

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

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

Provides the interface for the generation of the execution time.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.execution_time.ExecutionTime(authorized: Optional[bool] = None)[source]

Bases: object

Provides the interface for the execution time.

Parameters:authorized – The authorization to run.
STD_AUTHORIZED = False
authorized

Provides the currently state of the _authorized attribute.

end_time = None
execute_if_authorized()[source]

Executes the decorated method only if we are authorized to process. Otherwise, apply the given default.

get_info() → dict[source]

Provides the information to work with.

guess_and_set_authorized() → PyFunceble.cli.execution_time.ExecutionTime[source]

Try to guess and set the authorization from the configuration file.

set_authorized(value: bool) → PyFunceble.cli.execution_time.ExecutionTime[source]

Sets the value of the authorized attribute.

Parameters:value – The value to set.
set_end_time() → PyFunceble.cli.execution_time.ExecutionTime[source]

Sets the starting time to now.

set_start_time() → PyFunceble.cli.execution_time.ExecutionTime[source]

Sets the starting time to now.

static split_difference(start: datetime.datetime, end: datetime.datetime) → dict[source]

Calculates the difference between the two datetime object.

Parameters:
  • start – The starting time.
  • end – The ending time.
Raises:

TypeError – When the given start or end is not a datetime.datetime.

start_time = None
PyFunceble.cli.facility module

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

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

Provides some loader that we may need later.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.factory module

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

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

Provides everything which doesn’t get through the door of the facility.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.file_preloader module

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

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

Provides the interface for the preloading of a given file.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.cli.file_preloader.FilePreloader(*, authorized: Optional[bool] = None, protocol: Optional[dict] = None, continuous_integration: Optional[PyFunceble.cli.continuous_integration.base.ContinuousIntegrationBase] = None, checker_type: Optional[str] = None, adblock_inputline2subject: Optional[PyFunceble.converter.adblock_input_line2subject.AdblockInputLine2Subject] = None, wildcard2subject: Optional[PyFunceble.converter.wildcard2subject.Wildcard2Subject] = None, rpz_policy2subject: Optional[PyFunceble.converter.rpz_policy2subject.RPZPolicy2Subject] = None, rpz_inputline2subject: Optional[PyFunceble.converter.rpz_input_line2subject.RPZInputLine2Subject] = None, inputline2subject: Optional[PyFunceble.converter.input_line2subject.InputLine2Subject] = None, subject2complements: Optional[PyFunceble.converter.subject2complements.Subject2Complements] = None, url2netloc: Optional[PyFunceble.converter.url2netloc.Url2Netloc] = None, continue_dataset: Optional[PyFunceble.dataset.autocontinue.base.ContinueDatasetBase] = None, inactive_dataset: Optional[PyFunceble.dataset.inactive.base.InactiveDatasetBase] = None, cidr2subject: Optional[PyFunceble.converter.cidr2subject.CIDR2Subject] = None)[source]

Bases: object

Provides an interface for the file preloading. The main idea behind this interface is to read all lines of the given file parse each lines into something our autocontinue dataset understand.

Once everything preloaded in the autocontinue dataset, one can use the PyFunceble.dataset.autocontinue.base.ContinueDataset.get_to_test() to get the next subject to test.

By doing this, we don’t have to re-read a file completely once we are sure that the hash of the file didn’t changed.

Parameters:
  • authorized – The authorization to launch. If None is given, we will try to guess the best value.
  • protocol – The protocol describing the file to test.
STD_AUTHORIZED = False
adblock_inputline2subject = None
authorized

Provides the current state of the _authorized attribute.

checker_type = None
cidr2subject = None
continue_dataset = None
continuous_integration = None
does_preloader_description_file_exists() → bool[source]

Checks if our preloader file exists.

ensure_protocol_is_given()[source]

Ensures that the protocol is given before launching the decorated method.

Raises:RuntimeError – When the protocol is not declared yet.
execute_if_authorized()[source]

Executes the decorated method only if we are authorized to process. Otherwise, apply the given default.

Warning

If None is given as default value, this method will return the self object.

guess_and_set_authorized() → PyFunceble.cli.file_preloader.FilePreloader[source]

Try to guess and set the value of the _authorized attribute.

inputline2subject = None
protocol

Provides the current state of the _file_path attribute.

rpz_inputline2subject = None
rpz_policy2subject = None
set_authorized(value: bool) → PyFunceble.cli.file_preloader.FilePreloader[source]

Sets the value of the _authorized attribute.

Parameters:value – The value to set.
set_protocol(value: dict) → PyFunceble.cli.file_preloader.FilePreloader[source]

Sets the value of the _protocol attribute.

Parameters:value – The value to set.
start(print_dots: bool = False) → PyFunceble.cli.file_preloader.FilePreloader[source]

Starts the pre-loading of the currently set file path.

subject2complements = None
url2netloc = None
wildcard2subject = None
PyFunceble.cli.storage module

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

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

Provides the common storage location for all entry points.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.storage_facility module

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

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

Provides some facilities for the storage module.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.cli.storage_facility.get_output_directory() → str[source]

Provides the location of the output directory.

Module contents

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

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

Provides everything related to the CLI usage.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.config package
Submodules
PyFunceble.config.compare module

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

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

Provides the configuration comparision interface.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.config.compare.ConfigComparison(*, local_config: Optional[dict] = None, upstream_config: Optional[dict] = None)[source]

Bases: object

Provides an interface for comparing 2 configuration.

DELETED_CORE = ['dns_lookup_over_tcp', 'generate_json', 'header_printed', 'iana_whois_server', 'idna_conversion', 'logs', 'maximal_processes', 'multiprocess_merging_mode', 'multiprocess', 'no_http_codes', 'outputs', 'shadow_file', 'status', 'store_whois_record', 'unified']
NEW_STATUS_CODES = {'potentially_down': [451], 'potentially_up': [308, 403, 418, 421, 422, 423, 424, 426, 428, 431, 506, 507, 508, 510, 511], 'up': [102, 207, 208, 226, 429]}
OLD_TO_NEW = {'adblock': 'cli_decoding.adblock', 'aggressive': 'cli_decoding.adblock_aggressive', 'auto_continue': 'cli_testing.autocontinue', 'ci': 'cli_testing.ci.active', 'ci_autosave_commit': 'cli_testing.ci.commit_message', 'ci_autosave_final_commit': 'cli_testing.ci.end_commit_message', 'ci_autosave_minutes': 'cli_testing.ci.max_exec_minutes', 'ci_branch': 'cli_testing.ci.branch', 'ci_distribution_branch': 'cli_testing.ci.distribution_branch', 'command': 'cli_testing.ci.command', 'command_before_end': 'cli_testing.ci.end_command', 'cooldown_time': 'cli_testing.cooldown_time', 'custom_ip': 'cli_testing.hosts_ip', 'days_between_db_retest': 'cli_testing.days_between.db_retest', 'days_between_inactive_db_clean': 'cli_testing.days_between.db_clean', 'db_type': 'cli_testing.db_type', 'debug': 'debug.active', 'dns_server': 'dns.server', 'filter': 'cli_testing.file_filter', 'generate_complements': 'cli_testing.complements', 'generate_hosts': 'cli_testing.file_generation.hosts', 'hierarchical_sorting': 'cli_testing.sorting_mode.hierarchical', 'inactive_database': 'cli_testing.inactive_db', 'less': 'cli_testing.display_mode.less', 'local': 'cli_testing.local_network', 'mining': 'cli_testing.mining', 'no_files': 'cli_testing.file_generation.no_file', 'plain_list_domain': 'cli_testing.file_generation.plain', 'print_dots': 'cli_testing.display_mode.dots', 'quiet': 'cli_testing.display_mode.dots', 'reputation': 'lookup.reputation', 'rpz': 'cli_decoding.rpz', 'show_execution_time': 'cli_testing.display_mode.execution_time', 'show_percentage': 'cli_testing.display_mode.percentage', 'simple': 'cli_testing.display_mode.simple', 'syntax': 'cli_testing.testing_mode.syntax', 'timeout': 'lookup.timeout', 'use_reputation_data': 'lookup.reputation', 'whois_database': 'cli_testing.whois_db', 'wildcard': 'cli_decoding.wildcard'}
OLD_TO_NEW_NEGATE = {'no_special': 'lookup.special', 'no_whois': 'lookup.whois', 'split': 'cli_testing.file_generation.unified_results'}
dict_helper = <PyFunceble.helpers.dict.DictHelper object>
get_merged() → dict[source]

Provides the merged configuration.

is_local_identical() → bool[source]

Checks if the local configuration is identical to the upstream one.

local_config

Provides the current state of the _local_config.

set_local_config(value: dict) → PyFunceble.config.compare.ConfigComparison[source]

Sets the local configuration to work with.

set_upstream_config(value: dict) → PyFunceble.config.compare.ConfigComparison[source]

Sets the upstram configuration to work with.

upstream_config

Provides the current state of the _upstream_config.

PyFunceble.config.loader module

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

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

Provides the configuration loader.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.config.loader.ConfigLoader(merge_upstream: Optional[bool] = None)[source]

Bases: object

Provides the interface which loads and updates the configuration (if needed).

Parameters:merge_upstream

Authorizes the merging of the upstream configuration.

Note

If value is set to None (default), we fallback to the PYFUNCEBLE_AUTO_CONFIGURATION environment variable.

static conditional_switch(config: dict) → dict[source]

Given the configuration that we are going to load, switches some of setting.

Parameters:config – The configuration we are going to load.
config_file_exist() → bool[source]

Checks if the config file exists.

custom_config

Provides the current state of the _custom_config attribute.

default_config_file_exist() → bool[source]

Checks if the default configuration file exists.

destroy() → PyFunceble.config.loader.ConfigLoader[source]

Destroys everything loaded.

dict_helper = <PyFunceble.helpers.dict.DictHelper object>
classmethod download_dynamic_infrastructure_files() → PyFunceble.config.loader.ConfigLoader[source]

Downloads all the dynamicly (generated) infrastructure files.

Note

Downloaded if missing:
  • The IANA dump file.
  • The Public Suffix dump file.
file_helper = <PyFunceble.helpers.file.FileHelper object>
get_config_file_content() → dict[source]

Provides the content of the configuration file or the one already loaded.

get_configured_value(entry: str) → Any[source]

Provides the currently configured value.

Parameters:

entry

An entry to check.

multilevel should be separated with a point.

Raises:
  • RuntimeError – When the configuration is not loaded yet.
  • ValueError – When the given entry is not found.
install_missing_infrastructure_files() → PyFunceble.config.loader.ConfigLoader[source]

Installs the missing files (when needed).

Note

Installed if missing:
  • The configuration file.
  • The directory structure file.
static is_already_loaded() → bool[source]

Checks if the configuration was already loaded.

merge_upstream

Provides the current state of the _merge_upstream attribute.

path_to_config = None
path_to_default_config = None
path_to_overwrite_config = None
reload_config()[source]

Reload the configuration (if it was already loaded) after launching the decorated method.

set_custom_config(value: dict) → PyFunceble.config.loader.ConfigLoader[source]

Sets the custom configuration to set after loading.

Side Effect:
Directly inject into the configuration variables if it was already loaded.
set_merge_upstream(value: bool) → PyFunceble.config.loader.ConfigLoader[source]

Updates the value of _merge_upstream attribute.

start() → PyFunceble.config.loader.ConfigLoader[source]

Starts the loading processIs.

Module contents

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

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

Provides the configuration related submodules.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.converter.adblock_input_line2subject.AdblockInputLine2Subject(data_to_convert: Optional[Any] = None, aggressive: bool = False, *, regex_helper: Optional[PyFunceble.helpers.regex.RegexHelper] = None)[source]

Bases: PyFunceble.converter.base.ConverterBase

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

aggressive

Provides the state of the _aggressive attribute.

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

Provides the current state of the _data_to_convert attribute.

static extract_base(subject: Union[str, List[str]]) → Union[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.

set_aggressive(value: bool) → PyFunceble.converter.adblock_input_line2subject.AdblockInputLine2Subject[source]

Provides a way to activate/deactivate the aggressive decoding.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.converter.base.ConverterBase(data_to_convert: Optional[Any] = None)[source]

Bases: object

Provides the base of all converter class.

convert(data: Any) → Optional[Any][source]

Converts the given dataset.

data_to_convert

Provides the current state of the _data_to_convert attribute.

get_converted() → Optional[Any][source]

Provides the converted data.

set_data_to_convert(value: Any) → PyFunceble.converter.base.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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.converter.cidr2subject.CIDR2Subject(data_to_convert: Optional[Any] = None, *, ip_syntax_checker: Optional[PyFunceble.checker.syntax.ip.IPSyntaxChecker] = None)[source]

Bases: PyFunceble.converter.base.ConverterBase

Converts/Extracts the subjects of from the given CIDR.

convert(data: Any) → List[str][source]

Converts the given dataset.

Parameters:data – The data to convert.
data_to_convert

Provides the current state of the _data_to_convert attribute.

get_converted() → List[str][source]

Provides the subject-s to test.

ip_syntax_checker = 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.converter.input_line2subject.InputLine2Subject(data_to_convert: Optional[Any] = None)[source]

Bases: PyFunceble.converter.base.ConverterBase

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

COMMENT = '#'
NSLOOKUP_SPACE = '\\032'
PARTICULAR_COMMENT = ['!']
SPACE = ' '
TAB = '\t'
convert(data: Any) → List[str][source]

Converts the given dataset.

Parameters:data – The data to convert.
data_to_convert

Provides the current state of the _data_to_convert attribute.

get_converted() → List[str][source]

Provides the subject to test.

PyFunceble.converter.internal_url module

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

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

Provides a way to convert our internal 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.converter.internal_url.InternalUrlConverter(data_to_convert: Optional[Any] = None)[source]

Bases: PyFunceble.converter.base.ConverterBase

Converter of the internal URLs.

Note

The internal URLs are actually the URL that has nothing to do with what we are going to test.

They are only relevant for the software itself.

convert(data: Any) → str[source]

Converts the given dataset.

Parameters:data – The data to convert.
data_to_convert

Provides the current state of the _data_to_convert attribute.

get_converted() → str[source]

Provides the converted data (after conversion)

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.converter.rpz_input_line2subject.RPZInputLine2Subject(data_to_convert: Optional[Any] = None)[source]

Bases: PyFunceble.converter.input_line2subject.InputLine2Subject

Converts/Extracts the subject from the given RPZ inputline.

COMMENT = [';', '//', '#']
SPECIAL = ['$', '@']
convert(data: Any) → 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.converter.rpz_policy2subject.RPZPolicy2Subject(data_to_convert: Optional[Any] = None, soas: Optional[List[str]] = None, soa: Optional[str] = None, *, wildcard2subject: Optional[PyFunceble.converter.wildcard2subject.Wildcard2Subject] = None)[source]

Bases: PyFunceble.converter.rpz_input_line2subject.RPZInputLine2Subject

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

CLEANUP_MARKERS = ['.rpz-nsdname']
IP_MARKERS = ['.rpz-client-ip', '.rpz-ip', '.rpz-nsip']
convert(data: Any) → Optional[str][source]

Converts the given dataset.

Parameters:data – The data to convert.
get_converted() → Optional[str][source]

Provides the converted data.

classmethod get_matching_cleanup_marker(subject: str) → Optional[str][source]

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

classmethod get_matching_ip_marker(subject: str) → Optional[str][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) → PyFunceble.converter.rpz_policy2subject.RPZPolicy2Subject[source]

Sets the current SOA.

Parameters:value – The value to set.
set_soas(value: List[str]) → PyFunceble.converter.rpz_policy2subject.RPZPolicy2Subject[source]

Sets the current SOAs.

Parameters:value – The value to set.
soa

Provides the currently set SOA.

soas

Provides the currently set SOAs.

wilcard2subject = 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.converter.subject2complements.Subject2Complements(data_to_convert: Optional[Any] = None, *, include_given: Optional[bool] = False)[source]

Bases: PyFunceble.converter.base.ConverterBase

Converts a given wildcard into a testable subject.

convert(data: Any) → List[str][source]

Converts the given dataset.

Parameters:data – The data to convert.
data_to_convert

Provides the current state of the _data_to_convert attribute.

get_converted() → List[str][source]

Provides the converted data.

include_given

Provides the state of the _include_given attribute.

set_include_given(value: bool) → PyFunceble.converter.subject2complements.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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.converter.url2netloc.Url2Netloc(data_to_convert: Optional[Any] = None)[source]

Bases: PyFunceble.converter.base.ConverterBase

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

convert(data: Any) → str[source]

Converts the given dataset.

Parameters:data – The data to convert.
data_to_convert

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) → Optional[urllib.parse.ParseResult][source]

Parses the URL.

parse_url() → PyFunceble.converter.url2netloc.Url2Netloc[source]

Parses the URL.

parsed_url = 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.converter.wildcard2subject.Wildcard2Subject(data_to_convert: Optional[Any] = None)[source]

Bases: PyFunceble.converter.base.ConverterBase

Converts a given wildcard into a testable subject.

WILDCARD = '*.'
convert(data: Any) → str[source]

Converts the given dataset.

Parameters:data – The data to convert.
data_to_convert

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.data package
Subpackages
PyFunceble.data.alembic package
Subpackages
PyFunceble.data.alembic.mysql package
Subpackages
PyFunceble.data.alembic.mysql.versions package
Submodules
PyFunceble.data.alembic.mysql.versions.35c79626ecb9_fix_some_columns module

Fix some columns

Revision ID: 35c79626ecb9 Revises: ade87195b0a0 Create Date: 2020-08-21 11:42:07.044762

PyFunceble.data.alembic.mysql.versions.35c79626ecb9_fix_some_columns.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.35c79626ecb9_fix_some_columns.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.3a4c55a9320d_add_continue_table module

Add continue table.

Revision ID: 3a4c55a9320d Revises: 3d6f4a33cdb2 Create Date: 2020-12-13 22:52:56.968513

PyFunceble.data.alembic.mysql.versions.3a4c55a9320d_add_continue_table.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.3a4c55a9320d_add_continue_table.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.3d6f4a33cdb2_add_inactive_table module

Add inactive table.

Revision ID: 3d6f4a33cdb2 Revises: 7bcf7fa64ba1 Create Date: 2020-12-13 19:45:41.893657

PyFunceble.data.alembic.mysql.versions.3d6f4a33cdb2_add_inactive_table.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.3d6f4a33cdb2_add_inactive_table.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.45713fea8097_deletion_uneeded_columns_from_whois_ module

Deletion uneeded columns from whois record

Revision ID: 45713fea8097 Revises: e04e8301d1a2 Create Date: 2020-12-07 12:36:04.818466

PyFunceble.data.alembic.mysql.versions.45713fea8097_deletion_uneeded_columns_from_whois_.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.45713fea8097_deletion_uneeded_columns_from_whois_.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.459a0d7b8f09_add_idna_subject_column_into_whois module

Add idna_subject column into whois record

Revision ID: 459a0d7b8f09 Revises: 45713fea8097 Create Date: 2020-12-07 12:37:52.018637

PyFunceble.data.alembic.mysql.versions.459a0d7b8f09_add_idna_subject_column_into_whois.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.459a0d7b8f09_add_idna_subject_column_into_whois.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.6f4729deaf03_delete_inactive_source_column module

Delete inactive.source column

Revision ID: 6f4729deaf03 Revises: 95dc17ddd729 Create Date: 2021-02-13 12:21:00.493002

PyFunceble.data.alembic.mysql.versions.6f4729deaf03_delete_inactive_source_column.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.6f4729deaf03_delete_inactive_source_column.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.7bcf7fa64ba1_rename_created_to_created_at_and module

Rename created to created_at and modified_to_modified_at

Revision ID: 7bcf7fa64ba1 Revises: 83ada95132bf Create Date: 2020-12-08 17:34:59.349943

PyFunceble.data.alembic.mysql.versions.7bcf7fa64ba1_rename_created_to_created_at_and.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.7bcf7fa64ba1_rename_created_to_created_at_and.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.83ada95132bf_delete_the_file_table module

Delete the file table.

Revision ID: 83ada95132bf Revises: 459a0d7b8f09 Create Date: 2020-12-07 12:49:48.797794

PyFunceble.data.alembic.mysql.versions.83ada95132bf_delete_the_file_table.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.83ada95132bf_delete_the_file_table.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.912bbcb77a6c_add_registrar_column module

Add registrar column

Revision ID: 912bbcb77a6c Revises: 6f4729deaf03 Create Date: 2021-12-04 23:52:11.861732

PyFunceble.data.alembic.mysql.versions.912bbcb77a6c_add_registrar_column.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.912bbcb77a6c_add_registrar_column.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.95dc17ddd729_introduction_of_the_session_id_column module

Introduction of the session_id column

Revision ID: 95dc17ddd729 Revises: bef7bcaac3f2 Create Date: 2020-12-23 02:26:21.647125

PyFunceble.data.alembic.mysql.versions.95dc17ddd729_introduction_of_the_session_id_column.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.95dc17ddd729_introduction_of_the_session_id_column.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.ade87195b0a0_base module

Base

Revision ID: ade87195b0a0 Revises: Create Date: 2020-08-15 20:12:26.768419

PyFunceble.data.alembic.mysql.versions.ade87195b0a0_base.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.ade87195b0a0_base.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.bef7bcaac3f2_make_id_a_bigint module

Make id a bigint.

Revision ID: bef7bcaac3f2 Revises: 3a4c55a9320d Create Date: 2020-12-16 19:09:41.212679

PyFunceble.data.alembic.mysql.versions.bef7bcaac3f2_make_id_a_bigint.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.bef7bcaac3f2_make_id_a_bigint.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.d8893cd406db_allow_whois_record_to_be_empty_null module

Allow whois record to be empty/NULL

Revision ID: d8893cd406db Revises: 35c79626ecb9 Create Date: 2020-08-22 17:27:52.087506

PyFunceble.data.alembic.mysql.versions.d8893cd406db_allow_whois_record_to_be_empty_null.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.d8893cd406db_allow_whois_record_to_be_empty_null.upgrade()[source]
PyFunceble.data.alembic.mysql.versions.e04e8301d1a2_deletion_of_the_mined_table module

Deletion of the mined table

Revision ID: e04e8301d1a2 Revises: d8893cd406db Create Date: 2020-12-07 12:33:43.650514

PyFunceble.data.alembic.mysql.versions.e04e8301d1a2_deletion_of_the_mined_table.downgrade()[source]
PyFunceble.data.alembic.mysql.versions.e04e8301d1a2_deletion_of_the_mined_table.upgrade()[source]
Module contents

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

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

Provides the alembic migrations files.

Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
Special thanks:
https://pyfunceble.github.io/special-thanks.html
Contributors:
https://pyfunceble.github.io/contributors.html
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Submodules
PyFunceble.data.alembic.mysql.env module
Module contents

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

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

Provides the alembic data.

Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
Special thanks:
https://pyfunceble.github.io/special-thanks.html
Contributors:
https://pyfunceble.github.io/contributors.html
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.data.alembic.postgresql package
Subpackages
PyFunceble.data.alembic.postgresql.versions package
Submodules
PyFunceble.data.alembic.postgresql.versions.a32ac5d66eee_initial_version module

Initial Version

Revision ID: a32ac5d66eee Revises: Create Date: 2022-12-28 07:20:50.310072

PyFunceble.data.alembic.postgresql.versions.a32ac5d66eee_initial_version.downgrade()[source]
PyFunceble.data.alembic.postgresql.versions.a32ac5d66eee_initial_version.upgrade()[source]
Module contents

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

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

Provides the alembic migrations files.

Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
Special thanks:
https://pyfunceble.github.io/special-thanks.html
Contributors:
https://pyfunceble.github.io/contributors.html
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Submodules
PyFunceble.data.alembic.postgresql.env module
Module contents

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

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

Provides the alembic data.

Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
Special thanks:
https://pyfunceble.github.io/special-thanks.html
Contributors:
https://pyfunceble.github.io/contributors.html
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Module contents

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

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

Provides the alembic data.

Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
Special thanks:
https://pyfunceble.github.io/special-thanks.html
Contributors:
https://pyfunceble.github.io/contributors.html
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.data.infrastructure package
Module contents
Module contents
PyFunceble.database package
Subpackages
PyFunceble.database.credential package
Submodules
PyFunceble.database.credential.base module

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

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

Provides the base of all our credential holders.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.database.credential.base.CredentialBase(*, host: Optional[str] = None, port: Optional[int] = None, name: Optional[str] = None, username: Optional[str] = None, password: Optional[str] = None, charset: Optional[str] = None)[source]

Bases: object

Provides the base of all our credential holder.

STD_CHARSET = 'utf8mb4'
STD_HOST = 'localhost'
STD_NAME = 'pyfunceble'
STD_PASSWORD = 'PyFunceble:15_93le'
STD_PORT = 3306
STD_USERNAME = 'pyfunceble'
VAR2ENV = {'charset': 'PYFUNCEBLE_DB_CHARSET', 'host': 'PYFUNCEBLE_DB_HOST', 'name': 'PYFUNCEBLE_DB_NAME', 'password': 'PYFUNCEBLE_DB_PASSWORD', 'port': 'PYFUNCEBLE_DB_PORT', 'username': 'PYFUNCEBLE_DB_USERNAME'}

Maps our credential variable with environment variable.

charset

Provides the current state of the _charset attribute.

dotenv_locations = []

Provides the location of the dotenv to work with.

Warning

The order is important. The last one in the list will be taken as default if everything else is not found in the filesystem.

ensure_protocol_is_given()[source]

Ensures that the protocol is given before launching the decorated method.

Raises:ValueError – When the protocol is not given.
get_dot_env_file() → str[source]

Provides the dotenv file to work with.

get_uri() → str[source]

Provides the SQLAlchemy URI.

host

Provides the current state of the _host attribute.

name

Provides the current state of the _name attribute.

password

Provides the current state of the _password attribute.

port

Provides the current state of the _port attribute.

protocol = None
set_charset(value: str) → PyFunceble.database.credential.base.CredentialBase[source]

Sets the charset to use.

Parameters:value – The value to set.
set_host(value: str) → PyFunceble.database.credential.base.CredentialBase[source]

Sets the hosts to interact with.

Parameters:value – The value to set.
set_name(value: str) → PyFunceble.database.credential.base.CredentialBase[source]

Sets the name of the database to interact with.

Parameters:value – The value to set.
set_password(value: str) → PyFunceble.database.credential.base.CredentialBase[source]

Sets the password to use to authenticate ourselves.

Parameters:value – The value to set.
set_port(value: int) → PyFunceble.database.credential.base.CredentialBase[source]

Sets the port to interact with.

Parameters:value – The value to set.
set_username(value: str) → PyFunceble.database.credential.base.CredentialBase[source]

Sets the username to use to authenticate ourselves.

Parameters:value – The value to set.
username

Provides the current state of the _username attribute.

PyFunceble.database.credential.mariadb module

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

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

Provides our mariadb credential holder.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.database.credential.mariadb.MariaDBCredential(*, host: Optional[str] = None, port: Optional[int] = None, name: Optional[str] = None, username: Optional[str] = None, password: Optional[str] = None, charset: Optional[str] = None)[source]

Bases: PyFunceble.database.credential.base.CredentialBase

Provides our MariaDB credential holder.

protocol = 'mysql+pymysql'
PyFunceble.database.credential.mysql module

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

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

Provides our mysql credential holder.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.database.credential.mysql.MySQLCredential(*, host: Optional[str] = None, port: Optional[int] = None, name: Optional[str] = None, username: Optional[str] = None, password: Optional[str] = None, charset: Optional[str] = None)[source]

Bases: PyFunceble.database.credential.base.CredentialBase

Provides our MySQL credential holder.

protocol = 'mysql+pymysql'
PyFunceble.database.credential.postgresql module

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

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

Provides our postgresql credential holder.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.database.credential.postgresql.PostgreSQLCredential(*, host: Optional[str] = None, port: Optional[int] = None, name: Optional[str] = None, username: Optional[str] = None, password: Optional[str] = None, charset: Optional[str] = None)[source]

Bases: PyFunceble.database.credential.base.CredentialBase

Provides our PostgreSQL credential holder.

STD_CHARSET = 'utf8'
get_uri() → str[source]

Provides the SQLAlchemy URI.

protocol = 'postgresql+psycopg2'
Module contents

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

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

Provides everything related to our credential holders.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.database.schemas package
Submodules
PyFunceble.database.schemas.autocontinue module

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

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

Provides the schema of our “whois_record” table.

Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
Special thanks:
https://pyfunceble.github.io/special-thanks.html
Contributors:
https://pyfunceble.github.io/contributors.html
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.database.schemas.autocontinue.Continue(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api.Base

Provides the schema of our continue table.

checker_type
created_at
destination
id
idna_subject
modified_at
session_id
source
tested_at
PyFunceble.database.schemas.inactive module

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

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

Provides the schema of our “whois_record” table.

Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
Special thanks:
https://pyfunceble.github.io/special-thanks.html
Contributors:
https://pyfunceble.github.io/contributors.html
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.database.schemas.inactive.Inactive(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api.Base

Provides the schema of our inactive table.

checker_type
created_at
destination
id
idna_subject
modified_at
tested_at
PyFunceble.database.schemas.status module

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

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

Provides the schema of our “status” table.

Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
Special thanks:
https://pyfunceble.github.io/special-thanks.html
Contributors:
https://pyfunceble.github.io/contributors.html
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.database.schemas.status.Status(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api.Base

Provides the schema our status table.

created_at
domain_syntax_validation
expiration_date
file_id
http_status_code
id
ipv4_range_syntax_validation
ipv4_syntax_validation
ipv6_range_syntax_validation
ipv6_syntax_validation
is_complement
modified_at
status
status_source
subdomain_syntax_validation
test_completed
tested
tested_at
url_syntax_validation
PyFunceble.database.schemas.whois_record module

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

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

Provides the schema of our “whois_record” table.

Author:
Nissar Chababy, @funilrys, contactTATAfunilrysTODTODcom
Special thanks:
https://pyfunceble.github.io/special-thanks.html
Contributors:
https://pyfunceble.github.io/contributors.html
Project link:
https://github.com/funilrys/PyFunceble
Project documentation:
https://pyfunceble.readthedocs.io/en/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.database.schemas.whois_record.WhoisRecord(**kwargs)[source]

Bases: sqlalchemy.orm.decl_api.Base

Provides the schema of our whois_record table.

created_at
epoch
expiration_date
id
idna_subject
modified_at
registrar
subject
Module contents

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

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

Provides all our schemas in one place!

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.database.sqlalchemy package
Submodules
PyFunceble.database.sqlalchemy.all_schemas module

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

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

Provides all our schemas.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.database.sqlalchemy.base_schema module

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

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

Provides the base of all our schemas.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.database.sqlalchemy.base_schema.OurSchemaBase[source]

Bases: object

Provides the base of all our schema.

created_at = Column(None, DateTime(), table=None, nullable=False, default=CallableColumnDefault(<function datetime.utcnow>))
id = Column(None, BigInteger(), table=None, primary_key=True, nullable=False)
modified_at = Column(None, DateTime(), table=None, onupdate=CallableColumnDefault(<function datetime.utcnow>), default=CallableColumnDefault(<function datetime.utcnow>))
to_dict() → dict[source]

Converts the current object to dict.

Module contents

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

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

Provides everything related to everything we do with SQLAlchemy.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Submodules
PyFunceble.database.session module

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

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

Provides our database session interface.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.database.session.DBSession[source]

Bases: object

Provides our very own database session interface and handler.

authorized

Provides the authorization to operate.

close() → PyFunceble.database.session.DBSession[source]

Closes the session if exists.

credential = None
current_session = None
ensure_credential_is_given()[source]

Ensures that a credential object is set before launching the decorated method.

Raises:TypeError – When credential is not correct.
execute_if_authorized()[source]

Executes the decorated method only if we are authorized to process. Otherwise, apply the given default.

get_db_session() → PyFunceble.database.session.DBSession[source]

Provides a new session.

get_new_pool_session() → sqlalchemy.orm.session.sessionmaker[source]

Create and return a new session.

get_new_session() → sqlalchemy.orm.session.sessionmaker[source]

Creates and returns a new session.

Warning

This method generate a new session without any pool of connections.

init_db_sessions() → PyFunceble.database.session.DBSession[source]

Initiate the global session to work with.

query(*args, **kwargs) → Any[source]

Makes a query.

Module contents

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

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

Provides everything related to the structure and connection with external databases.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.dataset package
Subpackages
PyFunceble.dataset.autocontinue package
Submodules
PyFunceble.dataset.autocontinue.base module

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

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

Provides the base of everything related to the continue logic(s).

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.autocontinue.base.ContinueDatasetBase(*, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None)[source]

Bases: PyFunceble.dataset.db_base.DBDatasetBase

Provides the base of all continue related interface.

COMPARISON_FIELDS = ['idna_subject', 'checker_type', 'session_id']
FIELDS = ['idna_subject', 'checker_type', 'destination', 'source', 'tested_at', 'session_id']
get_to_test(session_id: str) → Generator[Tuple[str], str, None][source]

Provides the next subject to test.

This method provides the dataset directly from the autocontinue dataset. This method only compare the tested_at field. If it older than 20 years, that means that we still have to test the subject.

Parameters:session_id – The session ID to work with.
PyFunceble.dataset.autocontinue.csv module

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

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

Provides the interface for the CSV management.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.autocontinue.csv.CSVContinueDataset(*, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None, base_directory: Optional[str] = None)[source]

Bases: PyFunceble.dataset.csv_base.CSVDatasetBase, PyFunceble.dataset.autocontinue.base.ContinueDatasetBase

Provides the interface for the management of the continue CSV file.

base_directory

Provides the current state of the _base_directory attribute.

cleanup() → PyFunceble.dataset.autocontinue.csv.CSVContinueDataset[source]

Deletes the source file (completely).

get_to_test(session_id: str) → Generator[Tuple[str], str, None][source]

Provides the next subject to test.

This method provides the dataset directly from the autocontinue dataset. This method only compare the tested_at field. If it older than 20 years, that means that we still have to test the subject.

Parameters:session_id – The session ID to work with.
set_base_directory(value: str) → PyFunceble.dataset.autocontinue.csv.CSVContinueDataset[source]

Sets the given base directory.

Parameters:value – The value to set.
source_file = None
update_source_file_afterwards()[source]

Updates the source file before launching the decorated method.

PyFunceble.dataset.autocontinue.sql module

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

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

Provides the interface for the MariaDB management.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.autocontinue.sql.SQLDBContinueDataset(*, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None)[source]

Bases: PyFunceble.dataset.sql_base.SQLDBDatasetBase, PyFunceble.dataset.autocontinue.base.ContinueDatasetBase

Provides the interface for the management and the Continue dataset unser mariadb.

ORM_OBJ

alias of PyFunceble.database.schemas.autocontinue.Continue

cleanup(*, session_id: str) → PyFunceble.dataset.autocontinue.sql.SQLDBContinueDataset[source]

Cleanups the dataset. Meaning that we delete every entries which are needed anymore.

Parameters:
  • source – The source to delete.
  • session_id – The session ID to cleanup.
get_to_test(session_id: str) → Generator[Tuple[str], str, None][source]

Provides the next subject to test.

This method provides the dataset directly from the autocontinue dataset. This method only compare the tested_at field. If it older than 20 years, that means that we still have to test the subject.

Parameters:session_id – The session ID to work with.
Module contents

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

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

Provides everything related to the continue logic(s).

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.dataset.inactive package
Submodules
PyFunceble.dataset.inactive.base module

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

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

Provides the base of all Inactive related dataset.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.inactive.base.InactiveDatasetBase(*, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None)[source]

Bases: PyFunceble.dataset.db_base.DBDatasetBase

Provides the base of all inactive related interface.

COMPARISON_FIELDS = ['idna_subject', 'checker_type', 'destination']
FIELDS = ['idna_subject', 'checker_type', 'destination', 'tested_at']
get_to_retest(destination: str, checker_type: str, *, min_days: Optional[int] = 1) → Generator[Tuple[str, str, Optional[int]], dict, None][source]

Provides the next row to restest.

PyFunceble.dataset.inactive.csv module

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

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

Provides the interface for the inactive db CSV management.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.inactive.csv.CSVInactiveDataset(*, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None)[source]

Bases: PyFunceble.dataset.csv_base.CSVDatasetBase, PyFunceble.dataset.inactive.base.InactiveDatasetBase

Provides the interface for the management of the inactive CSV file.

get_to_retest(destination: str, checker_type: str, *, min_days: Optional[int]) → Generator[Tuple[str, str, Optional[int]], dict, None][source]

Provides the next row to restest.

PyFunceble.dataset.inactive.sql module

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

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

Provides the interface for the inactive DB (mariadb) management.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.inactive.sql.SQLDBInactiveDataset(*, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None)[source]

Bases: PyFunceble.dataset.sql_base.SQLDBDatasetBase, PyFunceble.dataset.inactive.base.InactiveDatasetBase

Provides tht interface for the management and the WHOIS dataset under mariadb.

ORM_OBJ

alias of PyFunceble.database.schemas.inactive.Inactive

get_to_retest(destination: str, checker_type: str, *, min_days: Optional[int]) → Generator[Tuple[str, str, Optional[int]], dict, None][source]

Provides the next row to restest.

Module contents

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

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

Provides everything related to the inactive database logic(s).

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.dataset.whois package
Submodules
PyFunceble.dataset.whois.base module

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

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

Provides the base of all WHOIS related dataset.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.whois.base.WhoisDatasetBase(*, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None)[source]

Bases: PyFunceble.dataset.db_base.DBDatasetBase

Provides the base of all Whois related interface.

COMPARISON_FIELDS = ['subject', 'idna_subject']
FIELDS = ['subject', 'idna_subject', 'expiration_date', 'epoch', 'registrar']
get_filtered_row(row: Union[dict, PyFunceble.database.schemas.whois_record.WhoisRecord]) → dict[source]

Removes all unkowns fields (not declared) from the given row.

Parameters:row – The row to work with.
static is_expired(row: Union[dict, PyFunceble.database.schemas.whois_record.WhoisRecord]) → bool[source]

Given a row, we look if the row is expired.

PyFunceble.dataset.whois.csv module

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

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

Provides the interface for the WHOIS DB CSV management.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.whois.csv.CSVWhoisDataset(*, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None)[source]

Bases: PyFunceble.dataset.csv_base.CSVDatasetBase, PyFunceble.dataset.whois.base.WhoisDatasetBase

Provides the interface for the management of the WHOIS (db) CSV file.

cleanup() → PyFunceble.dataset.whois.csv.CSVWhoisDataset[source]

Cleanups the dataset. Meaning that we delete every entries which are in the past.

get_content() → Generator[Optional[dict], None, None][source]

Provides a generator which provides the next line to read.

remove(row: dict) → PyFunceble.dataset.csv_base.CSVDatasetBase[source]

Removes the given dataset from the CSV file.

Parameters:row – The row or dataset to add.
Raises:TypeError – When the given row is not a :py:class`dict`.
update(row: dict, *, ignore_if_exist: bool = False) → PyFunceble.dataset.whois.csv.CSVWhoisDataset[source]

Adds the given dataset into the database if it does not exists. Update otherwise.

..note::
This should be the prefered method for introduction of new dataset.
..warning::
This method do nothing if the row is expired.
Parameters:
  • row – The row or dataset to manipulate.
  • ignore_if_exist – Ignores the insertion/update if the row already exists.
Raises:

TypeError – When the given row is not a :py:class`dict`.

PyFunceble.dataset.whois.sql module

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

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

Provides the interface for the WHOIS DB (sql) management.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.whois.sql.SQLDBWhoisDataset(*, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None)[source]

Bases: PyFunceble.dataset.sql_base.SQLDBDatasetBase, PyFunceble.dataset.whois.base.WhoisDatasetBase

Provides the interface for the management of the WHOIS database under (mariadb).

ORM_OBJ

alias of PyFunceble.database.schemas.whois_record.WhoisRecord

cleanup() → PyFunceble.dataset.whois.sql.SQLDBWhoisDataset[source]

Cleanups the dataset. Meaning that we delete every entries which are in the past.

get_content() → Generator[dict, None, None][source]

Provides a generator which provides the next dataset to read.

update(row: Union[dict, PyFunceble.database.schemas.whois_record.WhoisRecord], *, ignore_if_exist: bool = False) → PyFunceble.dataset.whois.sql.SQLDBWhoisDataset[source]

Adds the given dataset into the database if it does not exists. Update otherwise.

..note::
This should be the prefered method for introduction of new dataset.
..warning::
This method do nothing if the row is expired.
Parameters:row – The row or dataset to manipulate.
Raises:TypeError – When the given row is not a :py:class`dict`.
Module contents

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

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

Provides everything related to the whois database logic(s).

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Submodules
PyFunceble.dataset.base module

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

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

Provides the base of all datasets classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.base.DatasetBase[source]

Bases: object

Provides the base of all dataset.

DOWNLOADER = None
STORAGE_INDEX = None
ensure_source_file_exists()[source]

Ensures that the source file exists before running the decorated method.

Raises:
get_content() → Optional[dict][source]

Provides the cached or the real contend of the dataset (after caching)

Raises:FileNotFoundError – When the declared file does not exists.
source_file = None
PyFunceble.dataset.csv_base module

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

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

Provides the base of all CSV storeed datasets.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.csv_base.CSVDatasetBase(*, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None)[source]

Bases: PyFunceble.dataset.db_base.DBDatasetBase

Provides the base of all CSV dataset.

add(row: dict) → PyFunceble.dataset.csv_base.CSVDatasetBase[source]

Adds the given dataset into the CSV file.

Parameters:row – The row or dataset to add.
Raises:TypeError – When the given row is not a :py:class`dict`.
are_equal(read_row: dict, row: dict) → bool[source]

Compares the given read_row to the row.

Parameters:
  • read_row – The row read from the dataset infrastructure.
  • row – The row given by the testing infrastructure.
exists(row: dict) → bool[source]

Checks if the given dataset exists in our dataset.

Parameters:row – The row or dataset to check.
get_content() → Generator[Optional[dict], None, None][source]

Provides a generator which provides the next line to read.

get_csv_writer() → Tuple[csv.DictWriter, io.open][source]

Provides the standard and initiated CSV Dict writer along with the file that was open with it.

get_filtered_comparision_row(row: dict)[source]

Makes the given row ready for comparison.

get_filtered_content(filter_map: dict) → Generator[Optional[dict], None, None][source]

Provides a generator which provides the next line to read.

Parameters:filter_map – A dictionary representing what we need to filter.
Raises:TypeError – When the given filter_map is not a dict.
remove(row: dict) → PyFunceble.dataset.csv_base.CSVDatasetBase[source]

Removes the given dataset from the CSV file.

Parameters:row – The row or dataset to add.
Raises:TypeError – When the given row is not a :py:class`dict`.
update(row: dict, *, ignore_if_exist: bool = False) → PyFunceble.dataset.db_base.DBDatasetBase[source]

Adds the given dataset into the database if it does not exists. Update otherwise.

Parameters:
  • row – The row or dataset to manipulate.
  • ignore_if_exist – Ignore the insertion/update if the row already exists.
Raises:

TypeError – When the given row is not a :py:class`dict`.

PyFunceble.dataset.db_base module

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

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

Provides the base of all datasets which acts as database interface.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.db_base.DBDatasetBase(*, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None)[source]

Bases: PyFunceble.dataset.base.DatasetBase

Provides the base of all datasets which acts as database interface.

COMPARISON_FIELDS = []
FIELDS = []
STD_AUTHORIZED = False
STD_REMOVE_UNNEEDED_FIELDS = True
add(row: dict) → PyFunceble.dataset.db_base.DBDatasetBase[source]

Adds the given dataset into the database.

Parameters:row – The row or dataset to add.
Raises:TypeError – When the given row is not a :py:class`dict`.
are_equal(read_row: dict, row: dict) → bool[source]

Compares the given read_row to the row.

Parameters:
  • read_row – The row read from the dataset infrastructure.
  • row – The row given by the testing infrastructure.
authorized

Provides the current state of the _authorized attribute.

cleanup() → PyFunceble.dataset.db_base.DBDatasetBase[source]

Cleanups the dataset.

execute_if_authorized()[source]

Executes the decorated method only if we are authorized to process. Otherwise, apply the given default.

exists(row: dict) → bool[source]

Checks if the given dataset exists in our dataset.

Parameters:row – The row or dataset to add.
get_content() → Generator[Optional[dict], None, None][source]

Provides a generator which provides the next line to read.

get_filtered_content(filter_map: dict) → Generator[Optional[dict], None, None][source]

Provides a generator which provides the next dataset. to read.

Parameters:filter_map – A dictionary representing what we need to filter.
Raises:TypeError – When the given filter_map is not a dict.
get_filtered_row(row: dict) → dict[source]

Removes all unkowns fields (not declared) from the given row.

Parameters:row – The row to work with.
remove(row: dict) → PyFunceble.dataset.db_base.DBDatasetBase[source]

Removes the given dataset from the database.

Parameters:row – The row or dataset to remove.
Raises:TypeError – When the given row is not a :py:class`dict`.
remove_unneeded_fields

Provides the current state of the _remove_unneeded_fields.

set_authorized(value: bool) → PyFunceble.dataset.db_base.DBDatasetBase[source]

Sets the value of the _authorized attribute.

Parameters:value – The value to set.
set_remove_unneeded_fields(value: bool) → PyFunceble.dataset.db_base.DBDatasetBase[source]

Sets the value of the _remove_unneeded_fields attribute.

Parameters:value – The value to set.
source_file = None
update(row: dict, *, ignore_if_exist: bool = False) → PyFunceble.dataset.db_base.DBDatasetBase[source]

Adds the given dataset into the database if it does not exists. Update otherwise.

Parameters:
  • row – The row or dataset to manipulate.
  • ignore_if_exist – Ignores the insertion/update if the row already exists.
Raises:

TypeError – When the given row is not a :py:class`dict`.

PyFunceble.dataset.iana module

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

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

Provides an interface which let us interact with the IANA database.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.iana.IanaDataset[source]

Bases: PyFunceble.dataset.base.DatasetBase

Provides the dataset handler for the IANA dataset.

DOWNLOADER = <PyFunceble.downloader.iana.IANADownloader object>
STORAGE_INDEX = 'IANA'
get_whois_server(extension: str) → Optional[str][source]

Provides the WHOIS server of the given dataset.

is_extension(extension: str) → bool[source]

Checks if the given extension is registered.

Raises:TypeError – When extension is not a str.
PyFunceble.dataset.ipv4_reputation module

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

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

Provides an interface which let us interact with the IPv4 reputation database.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.ipv4_reputation.IPV4ReputationDataset[source]

Bases: PyFunceble.dataset.base.DatasetBase

Provides the interface for the lookup of the IPv4 reputation.

DOWNLOADER = <PyFunceble.downloader.ipv4_reputation.IPV4ReputationDownloader object>
STORAGE_INDEX = None
get_content() → io.open[source]

Provides a file handler which does let you read the content line by line.

Raises:FileNotFoundError – When the declared file does not exists.
PyFunceble.dataset.public_suffix module

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

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

Provides an interface which let us interact with the Public Suffix List.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.public_suffix.PublicSuffixDataset[source]

Bases: PyFunceble.dataset.base.DatasetBase

Provides the dataset handler for the Public Suffix List dataset.

DOWNLOADER = <PyFunceble.downloader.public_suffix.PublicSuffixDownloader object>
STORAGE_INDEX = 'PUBLIC_SUFFIX'
get_available_suffix(extension: str) → List[str][source]

Provides the available suffix for the extension.

is_extension(extension: str) → bool[source]

Checks if the given extension is registered.

Raises:TypeError – When extension is not a str.
PyFunceble.dataset.sql_base module

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

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

Provides the base of all Mariadb stored datasets.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.sql_base.SQLDBDatasetBase(*, authorized: Optional[bool] = None, remove_unneeded_fields: Optional[bool] = None, db_session: Optional[sqlalchemy.orm.session.Session] = None)[source]

Bases: PyFunceble.dataset.db_base.DBDatasetBase

Provides the base of all SQLDB stored dataset.

ORM_OBJ = None
STD_KEEP_SESSION_OPEN = False
add(row) → PyFunceble.dataset.sql_base.SQLDBDatasetBase[source]

Adds the given dataset into the database.

Parameters:row – The row or dataset to add.
Raises:TypeError – When the given row is not a dict or sqlalchemy schema.
db_session = None
ensure_orm_obj_is_given()[source]

Ensures that the ORM object is given before launching the decorated method.

Raises:RuntimeError – When ORM_OBJ is not declared.
exists(row) → bool[source]

Checks if the given dataset exists in our dataset.

Parameters:row – The row or dataset to check.
Raises:TypeError – When the given row is not a dict or sqlalchemy schema.
get_content() → Generator[dict, None, None][source]

Provides a generator which provides the next dataset to read.

get_existing_row(row)[source]

Returns the matching row.

Parameters:row – The row or dataset to check,
get_existing_row_id(row)[source]

Returns the ID of the existing row.

Parameters:row – The row or dataset to check,
remove(row) → PyFunceble.dataset.sql_base.SQLDBDatasetBase[source]

Removes the given dataset from the database.

Parameters:row – The row or dataset to check.
Raises:TypeError – When the given row is not a dict or sqlalchemy schema.
update(row, *, ignore_if_exist: bool = False) → PyFunceble.dataset.sql_base.SQLDBDatasetBase[source]

Adds the given dataset into the database if it does not exists. Update otherwise.

Note

This should be the preferred method for introduction of new dataset.

Raises:TypeError – When the given row is not a dict or sqlalchemy schema.
PyFunceble.dataset.user_agent module

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

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

Provides an interface which let us interact with the Public Suffix List.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dataset.user_agent.UserAgentDataset[source]

Bases: PyFunceble.dataset.base.DatasetBase

Provides the dataset and infrastructure for the User Agent navigation

DOWNLOADER = <PyFunceble.downloader.user_agents.UserAgentsDownloader object>
STORAGE_INDEX = 'USER_AGENTS'
get_latest() → str[source]

Provides the latest user agent for the given platform.

Side Effect:
It tries to get the platform and browser from the configuration (if exists).
is_supported(browser_short_name: str, platform: str) → bool[source]

Checks if the given browser and platform is supported.

Parameters:
  • browser_short_name – The short name of the browser.
  • platform – The platform name.
Raises:

TypeError – When browser_short_name or platform are not str.

is_supported_browser(browser_short_name: str) → bool[source]

Checks if the given browser is supported.

Raises:TypeError – When browser_short_name is not a str.
prefered_browser = 'chrome'
prefered_platform = 'linux'
set_prefered(browser_short_name: str, platform: str) → PyFunceble.dataset.user_agent.UserAgentDataset[source]

Sets the prefered browser to work with.

Parameters:

browser_short_name – The name of the browser to select.

Pram platform:

The name of the platform to select.

Raises:
Module contents

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

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

Provides all the dataset interaction submodules

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.downloader package
Submodules
PyFunceble.downloader.base module

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

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

Provides the base of all our downloader.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.downloader.base.DownloaderBase[source]

Bases: object

Provides the base of all downloader classes.

The interface is actually simple, but the part which may be hard to understand is the “downtime” part. What we do, is that we save the download time inside a JSON file, so this class provides the base around the download mechanism but also the generation or update of that JSON file.

DOWNLOAD_FREQUENCY = 1

The download frequency (in day).

Example:
if 1 is given, it’s once every 24 hours.

Warning

A frequency of 0 or a negative number will force the download every hour.

DOWNTIME_INDEX = None

Used to set/track the download time of the current file.

all_downtimes = {'iana': {'iso': '2023-05-29T10:02:39.100379', 'timestamp': 1685354559.100379}, 'user_agents': {'iso': '2023-05-29T10:02:39.221362', 'timestamp': 1685354559.221362}}

Stores the download time of all files (self managed).

authorized

Provides the authorization to start the download.

destination

Provides the current state of the _destination attribute.

dict_helper = <PyFunceble.helpers.dict.DictHelper object>

Provides the current state of the _download_link attribute.

get_all_downtimes() → dict[source]

Provides the downloadtime of all files.

get_current_downtime()[source]

Provides the download times of the current DOWN_TIME_INDEX.

is_downtime_set() → bool[source]

Checks if the download time of the current object exists.

is_last_download_expired() → bool[source]

Checks if the last downloaded file is expired (if exists).

save_all_downtimes() → None[source]

Saves the current state of the all downtimes.

set_current_downtime() → PyFunceble.downloader.base.DownloaderBase[source]

Sets the current datetime into our registry.

set_destination(value: str) → PyFunceble.downloader.base.DownloaderBase[source]

Sets the destination.

Parameters:value – The value to set.

Sets the link to download.

Parameters:value – The value to set.
start() → None[source]

Starts the download process.

PyFunceble.downloader.exceptions module

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

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

Provides the exceptions related to the downloader.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
exception PyFunceble.downloader.exceptions.NoDownloadDestinationGiven[source]

Bases: PyFunceble.downloader.exceptions.PyFuncebleDownloaderException

Describes the fact that the download destination was not declared.

exception PyFunceble.downloader.exceptions.NoDownloadLinkGiven[source]

Bases: PyFunceble.downloader.exceptions.PyFuncebleDownloaderException

Describes the fact that no download link was declared.

exception PyFunceble.downloader.exceptions.PyFuncebleDownloaderException[source]

Bases: PyFunceble.exceptions.PyFuncebleException

Describes the downloader (related) exceptions.

PyFunceble.downloader.iana module

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

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

Provides the downloader of the latest iana database file.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.downloader.iana.IANADownloader[source]

Bases: PyFunceble.downloader.base.DownloaderBase

Provides the downloader of our iana file.

DOWNLOAD_FREQUENCY = 1
DOWNTIME_INDEX = 'iana'
authorized

Provides the authorization to start the download.

PyFunceble.downloader.ipv4_reputation module

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

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

Provides the downloader of the latest user agents database file.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.downloader.ipv4_reputation.IPV4ReputationDownloader[source]

Bases: PyFunceble.downloader.base.DownloaderBase

Provides the downloader of our user agent file.

DOWNLOAD_FREQUENCY = 1
DOWNTIME_INDEX = 'ipv4_reputation'
authorized

Provides the authorization to start the download.

PyFunceble.downloader.public_suffix module

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

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

Provides the downloader of the latest iana database file.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.downloader.public_suffix.PublicSuffixDownloader[source]

Bases: PyFunceble.downloader.base.DownloaderBase

Provides the downloader of our public suffix file.

DOWNLOAD_FREQUENCY = 1
DOWNTIME_INDEX = 'psl'
authorized

Provides the authorization to start the download.

PyFunceble.downloader.user_agents module

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

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

Provides the downloader of the latest user agents database file.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.downloader.user_agents.UserAgentsDownloader[source]

Bases: PyFunceble.downloader.base.DownloaderBase

Provides the downloader of our user agent file.

DOWNLOAD_FREQUENCY = 1
DOWNTIME_INDEX = 'user_agents'
authorized

Provides the authorization to start the download.

Module contents

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

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

Provides all downloaders.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.helpers package
Submodules
PyFunceble.helpers.command module

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

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

Provides the command helpers. This helpers let us run Shell commands.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.helpers.command.CommandHelper(command: Union[str, list, None] = None, *, encoding: Optional[str] = None)[source]

Bases: object

Shell command execution.

Parameters:
  • command (str) – The command to execute.
  • encoding (str) – The encoding to use to decode the shell output.
command

Provides the current state of the _command attribute.

encoding

Provides the current state of the _encoding attribute.

execute(*, raise_on_error: bool = False) → str[source]

Execute the given command.

Parma raise_on_error:
 Raises on error if set to True.
Returns:The output of the command.
Raises:RuntimeError – When the exit code is not equal to 0.
run(rstrip: bool = True) → Generator[str, None, None][source]

Run the given command and yield each line(s) one by one.

Note

The difference between this method and execute() is that execute() wait for the process to end in order to return its output while this method return each line one by one - as they are outputed.

Parameters:rstrip (bool) – Deactivates the rstrip of the output.
run_to_stdout() → None[source]

Run the given command and print each line(s) to stdout.

set_command(value: Union[str, list]) → PyFunceble.helpers.command.CommandHelper[source]

Sets the command to use.

Parameters:value – The command to use/execute.
set_encoding(value: str) → PyFunceble.helpers.command.CommandHelper[source]

Sets the encoding to use.

Parameters:value – The value to set.
PyFunceble.helpers.dict module

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

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

Provides the dict helpers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.helpers.dict.DictHelper(subject: Union[Any, dict, None] = None)[source]

Bases: object

Simplify some dict manipulation.

Parameters:main (dict) – The main dict to work with.
Raises:TypeError – When main is not a dict nor a list (tolarated).
flatten(*, separator: str = '.', previous: Optional[str] = None, data: Optional[Any] = None) → dict[source]

Flatten the current dictionnary.

Parameters:
  • separator – The separator to apply.
  • previous – The previous key we are working with.
  • data – The data to work with. If not given, we fallback to self.subject.
static from_json(json_str: str, return_dict_on_error: bool = True) → Union[List[Any], dict, None][source]

Converts a given JSON string to dict/list.

Parameters:
  • json_str – The JSON string ot convert.
  • return_dict_on_error – Returns a dict instead of a None.
static from_json_file(file_path: str, encoding: str = 'utf-8', return_dict_on_error: bool = True) → Union[List[Any], dict, None][source]

Reads the given file path and convert it’s content to dict/list (tolarated).

Parameters:
  • file_path – The file path.
  • return_dict_on_error – Return a dict instead of a NoneType.
Parma encoding:

The encoding to use.

static from_yaml(yaml_str) → Union[List[Any], dict][source]

Converts the given YAML string to dict/list.

Parameters:yaml_str (str) – The YAML string to convert.
static from_yaml_file(file_path: str, encoding: str = 'utf-8') → Union[List[Any], dict][source]

Converts a given YAML formatted file, into dict/list.

Parameters:
  • file_path – The file path.
  • encoding – The encoding to use.
has_same_keys_as(to_check: dict, loop: bool = False) → bool[source]

Checks if keys are presents in both given dict.

Parameters:
  • to_check – The dict to compare with.
  • loop – DO NOT USE, only used to tell us wen to return the list of dataset or the final result.
remove_key(key_to_remove: Union[str, List[str]]) → Union[Any, dict, None][source]

Remove a given key from a given dictionary.

Parameters:key_to_remove – The key(s) to delete.
Returns:The dict without the given key(s).
rename_key(key_to_rename: dict, strict: bool = True) → dict[source]

Rename the given keys from the given dictionary.

Parameters:
  • key_to_rename

    The key(s) to rename.

    Expected format: {old:new}

  • strict – Tell us if we have to rename the exact index or the index which looks like the given key(s)
Returns:

The well formatted dict.

set_subject(value: Any) → PyFunceble.helpers.dict.DictHelper[source]

Sets the subject to work with.

Parameters:value – The value to set.
subject

Provides the current state of the _subject attribute.

to_json(ensure_ascii: bool = False, indent: int = 4, sort_keys: bool = True, own_class: Optional[json.encoder.JSONEncoder] = None) → str[source]

Converts a given dict to JSON and return the json string.

Parameters:
  • ensure_ascii – Avoids unicode.
  • indent – The indentation to apply.
  • sort_keys – Sort the keys.
  • own_class – A class to use for the conversion to json.
to_json_file(file_path: str, ensure_ascii: bool = False, indent: int = 4, sort_keys: bool = True, encoding: str = 'utf-8', own_class: Optional[json.encoder.JSONEncoder] = None) → None[source]

Converts the given dict to JSON and save the result into a given file path.

Parameters:
  • file_path – The file path.
  • ensure_ascii – Avoids unicode.
  • indent – The indentation to apply.
  • sortkeys – Sorts the keys.
  • encoding – The encoding to apply.
  • own_class – A class to use for the conversion to json.
to_yaml(encoding: str = 'utf-8', default_flow_style: bool = False, indent: int = 4, allow_unicode: bool = True, sort_keys: bool = True) → str[source]

Converts the given dict/list to the YAML format and return the result.

Parameters:
  • encoding (str) – The encoding to use.
  • default_flow_style (bool) – Uses the default flow style.
  • indent (int) – The indentation to apply.
  • allow_unicode (bool) – Allows the decoding of unicode chars.
  • sort_keys (bool) – Sors the keys.
Return type:

dict|list

to_yaml_file(file_path: str, encoding: str = 'utf-8', default_flow_style: bool = False, indent: int = 4, allow_unicode: bool = True, sort_keys: bool = True) → None[source]

Converts the given dict/list to YAML and save the result into a file.

Parameters:
  • file_path – The file path.
  • encoding – The encoding.
  • default_flow_style – Uses the default flow style.
  • indent – The indentation to apply.
  • allow_unicode – Allows the decoding of unicode chars.
  • sort_keys – Sorts the keys.
unflatten(*, separator: str = '.', data: Optional[Any] = None)[source]

Unflatten a previously flatten dictionnary.

Parameters:separator – The separator to split.
PyFunceble.helpers.directory module

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

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

Provides the directory helpers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.helpers.directory.DirectoryHelper(path: Optional[str] = None)[source]

Bases: object

Simplify the directories manipulation.

:param str dir_path the path to work with.

create() → PyFunceble.helpers.directory.DirectoryHelper[source]

Creates the given directory path.

Returns:The output of self.exists after the directory creation.
delete() → PyFunceble.helpers.directory.DirectoryHelper[source]

Deletes the given directory path.

Returns:not self.exists after the directory deletion.
exists() → bool[source]

Checks if the given directory exists.

static get_current(*, with_end_sep: bool = False) → str[source]

Returns the current directory path.

Parameters:with_end_sep (bool) – Add a directory separator at the end.
join_path(*args) → str[source]

Joins the given arguments with the given path.

list_all_files() → List[str][source]

Lists all files of the current path.

list_all_subdirectories() → List[str][source]

Provides the list of all subdirectories of the current path.

path

Provides the current state of the _path attribute.

realpath

Returns the real path of the current path.

set_path(value: str) → PyFunceble.helpers.directory.DirectoryHelper[source]

Sets the directory path to work with.

Parameters:value – The path to set.
PyFunceble.helpers.download module

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

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

Provides the download helpers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.helpers.download.DownloadHelper(url: Optional[str] = None, *, certificate_validation: bool = True, retries: int = 3)[source]

Bases: object

Simplification of the downloads.

Parameters:
  • url (str) –
  • retry (int) – The number of time we have to retry before raising an exception.
certificate_validation

Provides the current state of the certificate_validation attribute.

download_text(*, destination: Optional[str] = None) → str[source]

Download the body of the set url.

Note

if destination is set to None, we only return the output.

Otherwise, we save the output into the given destination, but we also return the output.

Parameters:destination – The download destination.
Raises:UnableToDownload – When could not unable to download the URL.
retries

Provides the current state of the _retries attributes.

set_certificate_validation(value: bool) → PyFunceble.helpers.download.DownloadHelper[source]

Sets the value of the certificate validation.

Parameters:value – The value to set.
set_retries(value: int) → PyFunceble.helpers.download.DownloadHelper[source]

Sets the number of retries we are allowed to perform before raising an exception.

Parameters:value – The number of retry to apply.i
set_url(value: str) → PyFunceble.helpers.download.DownloadHelper[source]

Sets the url to work with.

Parameters:value – The URL to set.
url

Provides the current state of the _url attribute.

PyFunceble.helpers.environment_variable module

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

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

Provides the environment variable helpers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.helpers.environment_variable.EnvironmentVariableHelper(name: Optional[str] = None, env_file_path: Optional[str] = None)[source]

Bases: object

Simplify the way we work with environment variable.

Parameters:name (str) – The name of the environment variable to work with.
delete() → PyFunceble.helpers.environment_variable.EnvironmentVariableHelper[source]

Deletes the given environment variable if exists.

delete_from_env_file() → PyFunceble.helpers.environment_variable.EnvironmentVariableHelper[source]

Deletes the given environment file from the given dotenv file.

Warning

This method also delete the environment variable from the current environment.

env_file_path

Provides the current state of the _env_file_path attribute.

exists() → bool[source]

Checks if the given environment variable name exists.

get_value(*, default: Optional[Any] = None) → Union[Any, str][source]

Returns the value of the given environment variable name (if exists.)

Parameters:default – The default value to return.
get_value_from_env_file(*, default: Optional[Any] = None) → Union[Any, str][source]

Returns the value of the given environment variable if it exists in the given file path.

name

Provides the current state of the _name attribute.

set_env_file_path(value: str) → PyFunceble.helpers.environment_variable.EnvironmentVariableHelper[source]

Sets the location of the environment file to work with.

Parameters:value – The name to set.
set_name(value: str) → PyFunceble.helpers.environment_variable.EnvironmentVariableHelper[source]

Sets the name of the environment variable to work with.

Parameters:value – The name to set.
set_value(value: str) → PyFunceble.helpers.environment_variable.EnvironmentVariableHelper[source]

Sets the given value into the given environment variable name.

Parameters:value (str) – The value to set.
Raises:TypeError – When value is not a value.
set_value_in_env_file(value: str) → PyFunceble.helpers.environment_variable.EnvironmentVariableHelper[source]

Sets the given value and save it into the given dotenv file.

Warning

This method also set the environment variable from the current environment.

Parameters:value – The value to set.
PyFunceble.helpers.exceptions module

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

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

Provides the exceptions related to the helpers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
exception PyFunceble.helpers.exceptions.PyFuncebleHelperException[source]

Bases: PyFunceble.exceptions.PyFuncebleException

Describes the helper (related) exceptions.

exception PyFunceble.helpers.exceptions.UnableToDownload[source]

Bases: PyFunceble.helpers.exceptions.PyFuncebleHelperException

Describes a failing download.

PyFunceble.helpers.file module

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

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

Provides the file helpers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.helpers.file.FileHelper(path: Optional[str] = None)[source]

Bases: object

Simplify the file manipulations.

Parameters:path (str) – The file path to work with.
copy(destination: str) → PyFunceble.helpers.file.FileHelper[source]

Copy the globaly given file path to the given destination.

Parameters:destination (str) – The destination of the copy.
delete() → PyFunceble.helpers.file.FileHelper[source]

Deletes the given file path if it exists.

exists() → bool[source]

Checks if the given file path exists.

get_size() → int[source]

Provides the size (in bytes) of the given file path.

is_empty() → bool[source]

Checks if the given file path is empty.

join_path(*args) → str[source]

Joins the given arguments with the given path.

move(destination) → PyFunceble.helpers.file.FileHelper[source]

Move the globally given file path to the given destination.

Parameters:destination (str) – The destination of the file.
open(*args, **kwargs) → io.open[source]

A wrapper for the built-in open function.

path

Provides the current state of the _path attribute.

read(*, encoding: str = 'utf-8') → Optional[str][source]

Read the given file path and return it’s content.

Parameters:encoding (str) – The encoding to use.
read_bytes() → Optional[bytes][source]

Read the given file ath and returns it’s bytes contetn.

set_path(value: str) → PyFunceble.helpers.file.FileHelper[source]

Sets the path to work with.

Parameters:value – The path to work with.
write(data: Any, *, overwrite: bool = False, encoding: str = 'utf-8') → PyFunceble.helpers.file.FileHelper[source]

Write the given data into the given file path.

Parameters:
  • data – The data to write.
  • encoding – The encoding to use while opening the file.
PyFunceble.helpers.hash module

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

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

Provides the hashing helpers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.helpers.hash.HashHelper(algo: Optional[str] = None)[source]

Bases: object

Simplify the hashing of data or file content.

Parameters:algo (str) – The algorithm to use for hashing.
Raises:ValueError – When the given algo is not known.
algo

Provides the current state fo the _algo attribute.

hash_data(data: Union[str, bytes]) → str[source]

Hashes the given data.

Parameters:data – The data to hash.
Raises:TypeError – When data is not str or bytes.
hash_file(file_path: str) → str[source]

Hashes the content of the given file.

Parameters:file_path – The path of the file to read.
set_algo(value: str) → PyFunceble.helpers.hash.HashHelper[source]

Sets the algorithm to work with.

Parameters:value – The name of the hash to use.
PyFunceble.helpers.list module

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

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

Provides the list helpers

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.helpers.list.ListHelper(subject: Optional[List[Any]] = None)[source]

Bases: object

Simplify the list manipulation.

Parameters:
  • subject – The list to work with.
  • remove_empty (bool) – Process the deletion of empty strings.
custom_sort(key_method: Any, *, reverse: bool = False) → PyFunceble.helpers.list.ListHelper[source]

Sorts the list with the given key method.

Parameters:
  • key_method (function|method) – A function or method to use to format the readed element before sorting.
  • reverse (bool) – Tell us if we have to reverse the list.
remove_duplicates() → PyFunceble.helpers.list.ListHelper[source]

Removes the duplicates of the current list.

remove_empty() → PyFunceble.helpers.list.ListHelper[source]

Removes the empty entries of the given list.

set_subject(value: List[Any]) → PyFunceble.helpers.list.ListHelper[source]

Sets the subject to work with.

Parameters:value – The subject to work with.
sort(*, reverse: bool = False) → PyFunceble.helpers.list.ListHelper[source]

Sorts the given list (of string preferably).

param bool reverse:
 Tell us if we have to reverse the list.
subject

Provides the current state of the _subject attribute.

PyFunceble.helpers.merge module

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

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

Provides the merging helpers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.helpers.merge.Merge(subject: Optional[Any] = None)[source]

Bases: object

Simplify the merging of dict and list.

Parameters:subject – The subject to work with.
into(origin: Any, strict: bool = True) → Any[source]

Process the mergin.

Parameters:
  • origin – The original data.
  • strict – Activates the strict mode.
set_subject(value: Any) → PyFunceble.helpers.merge.Merge[source]

Sets the subject to work with.

Parameters:value – The subject to work with.
Raises:TypeError – When value is not a list.
subject

Provides the current state of the _subject attribute.

PyFunceble.helpers.regex module

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

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

Provides the regular expressions helpers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.helpers.regex.RegexHelper(regex: Optional[str] = None, escape_regex: bool = False)[source]

Bases: object

Simplify the regex matching and usage.

Parameters:
  • regex (str) – The regex to use.
  • escape_regex – Escapes the given regex.
escape_regex = False
get_matching_list(data: List[str]) → List[str][source]

Returns the strings which does the match the regex in the given data.

get_not_matching_list(data: List[str]) → List[str][source]

Returns the strings which does not the match the regex in the given data.

match(data: str, *, rematch: bool = False, group: int = 0, return_match: bool = True) → Union[bool, str, List[str]][source]

Checks if the given data match the given regex string.

Parameters:
  • data – The data to work with.
  • rematch

    The equivalent of the $BASH_REMATCH but in Python.

    It’s basically a list of all groups.

  • group – The group to return when return_match is set to True.
  • return_match – Return the part that match the given regex string.
regex

Provides the current state of the _regex attribute.

replace_match(data: str, replacement: str, *, occurences: int = 0, multiline: bool = False) → str[source]

Replaces the string which match the regex string with the given replacement.

Parameters:
  • data – The data to work with.
  • replacement – The replacement of the matched regex.
  • occurences

    The number of occurences to replace.

    Note

    0 means all occurences.

set_regex(value: str) → PyFunceble.helpers.regex.RegexHelper[source]

Sets the regex to work with.

Parameters:value – The regex to work with.
Raises:TypeError – When value is not str.
split(data: str) → List[str][source]

Split the reference of the given regex.

Parameters:data (str) – The data to work with.
Return type:list
Module contents

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

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

Provides the helpers.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.query package
Subpackages
PyFunceble.query.dns package
Submodules
PyFunceble.query.dns.nameserver module

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

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

Provides a way to get or guess the nameserver to use.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dns.nameserver.Nameservers(nameserver: Optional[List[str]] = None, protocol: str = 'TCP')[source]

Bases: object

Provides an interface to get the right nameserver to communicate with.

DEFAULT_NAMESERVERS = ['9.9.9.10', '149.112.112.10', '2620:fe::10', '2620:fe::fe:10']
domain_syntax_checker = <PyFunceble.checker.syntax.domain.DomainSyntaxChecker object>
classmethod get_ip_from_nameserver(nameserver: str) → List[str][source]

Given a nameserver, this method resolve it in order to get the IP to contact.

Parameters:nameserver – The name to resolve.
get_nameserver_ports() → Optional[dict][source]

Provides the currently set nameserver_ports.

get_nameservers() → Optional[List[str]][source]

Provides the currently set nameservers.

guess_all_settings() → PyFunceble.query.dns.nameserver.Nameservers[source]

Try to guess all settings.

guess_and_set_nameservers() → PyFunceble.query.dns.nameserver.Nameservers[source]

Try to guess and set the nameserver to use.

nameserver_ports = None
nameservers = None
protocol = None
set_nameservers(value: List[str]) → PyFunceble.query.dns.nameserver.Nameservers[source]

Sets the nameserver to use.

Side Effect:
Also updates the nameserver_ports variable.
Raises:
static split_nameserver_from_port(nameserver: str, *, default_port: int = 53) → Tuple[str, int][source]

Splits the nameserver from its port.re

Parameters:
  • nameserver – The nameserver to work with.
  • default_port – The default port to apply, if none is found.
url2netloc = <PyFunceble.converter.url2netloc.Url2Netloc object>
url_syntax_checker = <PyFunceble.checker.syntax.url.URLSyntaxChecker object>
PyFunceble.query.dns.query_tool module

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

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

Provides an interface for the query.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dns.query_tool.DNSQueryTool(*, nameservers: Optional[List[str]] = None, follow_nameserver_order: Optional[bool] = None, preferred_protocol: Optional[str] = None, trust_server: Optional[bool] = None, delay: Optional[bool] = None)[source]

Bases: object

Provides our query tool.

STD_DELAY = 0.0
STD_FOLLOW_NAMESERVER_ORDER = True
STD_PROTOCOL = 'UDP'
STD_TIMEOUT = 5.0
STD_TRUST_SERVER = False
SUPPORTED_PROTOCOL = ['TCP', 'UDP', 'HTTPS', 'TLS']
delay

Provides the current state of the _delay attribute.

dns_name = None
ensure_subject_is_given()[source]

Ensures that the subject to work with is given before running the decorated method.

Raises:TypeError – If self.subject is not a str.
follow_nameserver_order

Provides the current state of the _follow_nameserver_order attribute.

get_dns_name_from_subject_and_query_type()[source]

Provides the dns name based on the current subject and query type.

get_human_query_record_type() → str[source]

Provides the currently set record type.

get_lookup_record() → Optional[PyFunceble.query.record.dns.DNSQueryToolRecord][source]

Provides the current query record.

guess_all_settings() → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Try to guess all settings.

guess_and_set_delay() → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Try to guess and set the delay to apply.

guess_and_set_follow_nameserver_order() → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Try to guess and authorize the mix of the nameserver before each query.

guess_and_set_preferred_protocol() → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Try to guess and set the preferred procol.

guess_and_set_timeout() → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Try to guess and set the timeout.

guess_and_set_trust_server() → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Try to guess and set the trust flag.

https() → Optional[List[str]][source]

Request the chosen record through the https protocol.

ignore_if_query_message_is_missing()[source]

Ignores the call to the decorated method if the query message is missing. Otherwise, return an empty list.

lookup_record = None
nameservers = <PyFunceble.query.dns.nameserver.Nameservers object>
preferred_protocol

Provides the current state of the _preferred_protocol attribute.

prepare_query()[source]

Prepare the query after running the decorated method.

query() → Optional[List[str]][source]

Process the query based on the preferred protocol.

query_message = None
query_record_type

Provides the current state of the _query_record_type attribute.

query_timeout

Provides the current state of the _query_timeout attribute.

rdata_type2value = {'A': 1, 'A6': 38, 'AAAA': 28, 'AFSDB': 18, 'AMTRELAY': 259, 'ANY': 255, 'APL': 42, 'AVC': 258, 'AXFR': 252, 'CAA': 257, 'CDNSKEY': 60, 'CDS': 59, 'CERT': 37, 'CNAME': 5, 'CSYNC': 62, 'DHCID': 49, 'DLV': 32769, 'DNAME': 39, 'DNSKEY': 48, 'DS': 43, 'EUI48': 108, 'EUI64': 109, 'GPOS': 27, 'HINFO': 13, 'HIP': 55, 'IPSECKEY': 45, 'ISDN': 20, 'IXFR': 251, 'KEY': 25, 'KX': 36, 'LOC': 29, 'MAILA': 254, 'MAILB': 253, 'MB': 7, 'MD': 3, 'MF': 4, 'MG': 8, 'MINFO': 14, 'MR': 9, 'MX': 15, 'NAPTR': 35, 'NINFO': 56, 'NS': 2, 'NSAP': 22, 'NSAP_PTR': 23, 'NSEC': 47, 'NSEC3': 50, 'NSEC3PARAM': 51, 'NULL': 10, 'NXT': 30, 'OPENPGPKEY': 61, 'OPT': 41, 'PTR': 12, 'PX': 26, 'RP': 17, 'RRSIG': 46, 'RT': 21, 'SIG': 24, 'SOA': 6, 'SPF': 99, 'SRV': 33, 'SSHFP': 44, 'TA': 32768, 'TKEY': 249, 'TLSA': 52, 'TSIG': 250, 'TXT': 16, 'TYPE0': 0, 'UNSPEC': 103, 'URI': 256, 'WKS': 11, 'X25': 19}
set_delay(value: Union[int, float]) → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Sets the delay to apply.

Parameters:value – The delay to apply.
set_follow_nameserver_order(value: bool) → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Updates the follow_nameserver_order variable.

Parameters:value – The value to set.
set_nameservers(value: List[str]) → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Sets the nameservers to work with.

Raises:
set_preferred_protocol(value: str) → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Sets the preferred protocol.

Parameters:value – The protocol to use.
set_query_record_type(value: Union[str, int]) → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Sets the DNS record type to query.

Parameters:value – The value to set. It can be the human version (e.g AAAA) or an integer as registered in the value2rdata_type attribute.
set_subject(value: str) → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Sets the subject to work with.

Parameters:value – The subject to set.
set_timeout(value: Union[int, float]) → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Sets the timeout to apply.

Parameters:value – The timeout to apply.
set_trust_server(value: bool) → PyFunceble.query.dns.query_tool.DNSQueryTool[source]

Sets the value to apply.

Parameters:value – The value to apply.
subject

Provides the current state of the _subject attribute.

tcp() → Optional[List[str]][source]

Request the chosen record through the TCP protocol.

tls() → Optional[List[str]][source]

Request the chosen record through the TLS protocol.

trust_server

Provides the current state of the trust_server attribute.

udp() → Optional[List[str]][source]

Request the chosen record through the UTP protocol.

update_lookup_record()[source]

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

update_lookup_record_response()[source]

Ensures that the response of the decorated method is set as response in our record.

value2rdata_type = {0: 'TYPE0', 1: 'A', 2: 'NS', 3: 'MD', 4: 'MF', 5: 'CNAME', 6: 'SOA', 7: 'MB', 8: 'MG', 9: 'MR', 10: 'NULL', 11: 'WKS', 12: 'PTR', 13: 'HINFO', 14: 'MINFO', 15: 'MX', 16: 'TXT', 17: 'RP', 18: 'AFSDB', 19: 'X25', 20: 'ISDN', 21: 'RT', 22: 'NSAP', 23: 'NSAP_PTR', 24: 'SIG', 25: 'KEY', 26: 'PX', 27: 'GPOS', 28: 'AAAA', 29: 'LOC', 30: 'NXT', 33: 'SRV', 35: 'NAPTR', 36: 'KX', 37: 'CERT', 38: 'A6', 39: 'DNAME', 41: 'OPT', 42: 'APL', 43: 'DS', 44: 'SSHFP', 45: 'IPSECKEY', 46: 'RRSIG', 47: 'NSEC', 48: 'DNSKEY', 49: 'DHCID', 50: 'NSEC3', 51: 'NSEC3PARAM', 52: 'TLSA', 55: 'HIP', 56: 'NINFO', 59: 'CDS', 60: 'CDNSKEY', 61: 'OPENPGPKEY', 62: 'CSYNC', 99: 'SPF', 103: 'UNSPEC', 108: 'EUI48', 109: 'EUI64', 249: 'TKEY', 250: 'TSIG', 251: 'IXFR', 252: 'AXFR', 253: 'MAILB', 254: 'MAILA', 255: 'ANY', 256: 'URI', 257: 'CAA', 258: 'AVC', 259: 'AMTRELAY', 32768: 'TA', 32769: 'DLV'}
PyFunceble.query.dns.resolver module

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

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

Provides a way to provides the nameserver to use.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.dns.resolver.Resolver(nameservers: Optional[List[str]] = None, timeout: Optional[float] = None)[source]

Bases: object

Provides the right resolver.

Parameters:nameservers – The list of nameservers to communicate with.
STD_TIMEOUT = 5.0
configure_resolver()[source]

Configures the resolvers after calling the decorated method.

get_nameserver_ports() → Optional[dict][source]

Provides the currently set list of nameserver ports.

get_nameservers() → Optional[List[str]][source]

Provides the currently set list of nameserver.

get_resolver() → dns.resolver.Resolver[source]

Provides the resolver to work with.

get_timeout() → Optional[float][source]

Provides the currently set query timeout.

guess_all_settings() → PyFunceble.query.dns.resolver.Resolver[source]

Try to guess all settings.

guess_and_set_timeout() → PyFunceble.query.dns.resolver.Resolver[source]

Tries to guess the the timeout from the configuration.

internal_resolver = None
nameservers = <PyFunceble.query.dns.nameserver.Nameservers object>
set_nameservers(value: List[str]) → PyFunceble.query.dns.resolver.Resolver[source]

Sets the given nameserver.

set_timeout(value: Union[float, int]) → PyFunceble.query.dns.resolver.Resolver[source]

Sets the timeout of a query.

timeout = 3.0
Module contents

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

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

Provides everything related to our very own dns resolver.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.query.netinfo package
Submodules
PyFunceble.query.netinfo.address module

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

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

Provides an interface to get the information of a given address.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.netinfo.address.AddressInfo(subject: Optional[str] = None)[source]

Bases: PyFunceble.query.netinfo.base.NetInfoBase

Provides the information of a given address.

get_info() → Optional[List[str]][source]

Fetch and provides the information of the given hosts.

Returns:A list of of IP related to the given host.
PyFunceble.query.netinfo.base module

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

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

Provides the base of all checker.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.netinfo.base.NetInfoBase(subject: Optional[str] = None)[source]

Bases: object

Provides the base of network information classes.

base = None
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.
get_info() → Any[source]

Provides the wanted network information.

set_subject(value: str) → PyFunceble.query.netinfo.base.NetInfoBase[source]

Sets the subject to work with.

Parameters:value – The subject to set.
subject

Provides the current state of the _subject attribute.

PyFunceble.query.netinfo.hostbyaddr module

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

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

Provides an interface to get the information of a given host.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.netinfo.hostbyaddr.HostByAddrInfo(subject: Optional[str] = None)[source]

Bases: PyFunceble.query.netinfo.base.NetInfoBase

Provides the information of a given address/IP.

get_info() → Optional[dict][source]

Fetch and provides the information of the given hosts.

Returns:A dictionnary with the following format or None if nothing was found.
{
    "hostname": "",
    "aliases": [],
    "ips": []
}
Module contents

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

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

Provides all our network info related subdmodules.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.query.record package
Submodules
PyFunceble.query.record.base module

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

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

Provides the base of all our record classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.record.base.RecordBase[source]

Bases: object

Provides the base of all query record classes.

to_dict() → dict[source]

Provides the dict representation of the current object.

to_json(*, pretty_print: bool = False) → str[source]

Provides the JSON representation of the current object.

Parameters:pretty_print – If True, the JSON will be formatted.
PyFunceble.query.record.dns module

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

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

Provides the record class of the dns query tool.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.record.dns.DNSQueryToolRecord(nameserver: Optional[str] = None, port: Optional[int] = None, follow_nameserver_order: Optional[bool] = None, preferred_protocol: Optional[str] = None, used_protocol: Optional[str] = None, query_record_type: Optional[str] = None, query_timeout: Optional[float] = None, subject: Optional[str] = None, dns_name: Optional[str] = None, response: Optional[List[str]] = None)[source]

Bases: PyFunceble.query.record.base.RecordBase

Provides a record of an executed request.

dns_name = None
follow_nameserver_order = None
nameserver = None
port = None
preferred_protocol = None
query_record_type = None
query_timeout = None
response = None
subject = None
used_protocol = None
PyFunceble.query.record.whois module

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

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

Provides the record class of the whois query tool.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.record.whois.WhoisQueryToolRecord(server: Optional[str] = None, port: Optional[str] = None, query_timeout: Optional[float] = None, subject: Optional[str] = None, record: Optional[str] = None, expiration_date: Optional[str] = None, registrar: Optional[str] = None)[source]

Bases: PyFunceble.query.record.base.RecordBase

Provides a record of an executed request.

expiration_date = None
port = None
query_timeout = None
record = None
registrar = None
server = None
subject = None
Module contents

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

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

Provides all records classes.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.query.requests package
Subpackages
PyFunceble.query.requests.adapter package
Submodules
PyFunceble.query.requests.adapter.base module

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

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

Provides the base of all our adapter.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.adapter.base.RequestAdapterBase(*args, **kwargs)[source]

Bases: requests.adapters.HTTPAdapter

Extends the built-in HTTP adapater and acts as a base for all our own adapter.

static extract_extension(subject: str) → Optional[str][source]

Provides the extension of the given subject.

Changed in version 4.1.1.dev: Handle the case that the given subject does not have a . (point).

Parameters:

subject (str) – The subject to get extract the extension from.

Raises:
static fake_response() → requests.models.Response[source]

Provides the fake response that is provided when we couldn’t resolve the given domain.

fetch_proxy_from_pattern(subject: str) → dict[source]

Provides the proxy settings to use for the given subject.

Changed in version 4.1.1.dev: Handle the case that the given subject has no extension/TLD.

Parameters:

subject (str) – The subject to work with.

Raises:
proxy_pattern = {}
resolve(hostname: str) → Optional[str][source]

Resolves with the prefered method.

resolve_with_cache(hostname: str) → Optional[str][source]

Try to resolve using an internal cache.

resolve_without_cache(hostname: str) → Optional[str][source]

Resolves the IP of the given hostname.

Parameters:hostname – The hostname to get resolve.
resolving_cache = {}
resolving_use_cache = False
timeout = 5.0
PyFunceble.query.requests.adapter.http module

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

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

Provides the our HTTP adapter.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.adapter.http.RequestHTTPAdapter(*args, **kwargs)[source]

Bases: PyFunceble.query.requests.adapter.base.RequestAdapterBase

Provides our HTTP adapter.

send(request, **kwargs) → requests.models.Response[source]

Overwrite the upstream send method.

We basically do the same. We only ensure that we request the IP from the chosen DNS record.

Parameters:
  • request – The PreparedRequest being sent.
  • stream – (optional) Whether to stream the request content.
  • timeout (float or tuple or urllib3 Timeout object) – (optional) How long to wait for the server to send data before giving up, as a float, or a (connect timeout, read timeout) tuple.
  • verify – (optional) Either a boolean, in which case it controls whether we verify the server’s TLS certificate, or a string, in which case it must be a path to a CA bundle to use
  • cert – (optional) Any user-provided SSL certificate to be trusted.
  • proxies – (optional) The proxies dictionary to apply to the request.
Return type:

requests.Response

Changed in version 4.1.0b16: When a proxy is given, it is acceptable to have an unresolvable subject. The proxy should handle the situation and give us back a proper status or error.

PyFunceble.query.requests.adapter.https module

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

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

Provides the our HTTPS adapter.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.adapter.https.RequestHTTPSAdapter(*args, **kwargs)[source]

Bases: PyFunceble.query.requests.adapter.base.RequestAdapterBase

Provides our HTTP adapter.

send(request, **kwargs) → requests.models.Response[source]

Overwrite the upstream send method.

We basically do the same. We only ensure that we request the IP from the chosen DNS record.

Parameters:
  • request – The PreparedRequest being sent.
  • stream – (optional) Whether to stream the request content.
  • timeout (float or tuple or urllib3 Timeout object) – (optional) How long to wait for the server to send data before giving up, as a float, or a (connect timeout, read timeout) tuple.
  • verify – (optional) Either a boolean, in which case it controls whether we verify the server’s TLS certificate, or a string, in which case it must be a path to a CA bundle to use
  • cert – (optional) Any user-provided SSL certificate to be trusted.
  • proxies – (optional) The proxies dictionary to apply to the request.
Return type:

requests.Response

Changed in version 4.1.0b16: When a proxy is given, it is acceptable to have an unresolvable subject. The proxy should handle the situation and give us back a proper status or error.

Module contents

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

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

Provides everything related to our request adapters.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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, max_redirects: Optional[int] = None, dns_query_tool: Optional[PyFunceble.query.dns.query_tool.DNSQueryTool] = None, proxy_pattern: Optional[dict] = 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”

    ]

    },

    ]

    }

STD_MAX_RETRIES = 3
STD_TIMEOUT = 3.0
STD_VERIFY_CERTIFICATE = False
delete(*args, **kwargs) → requests.models.Response[source]

Sends a DELETE request and get its response.

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

Sends a GET request and get its response.

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_max_retries() → PyFunceble.query.requests.requester.Requester[source]

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

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

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

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_redirects

Provides the current state of the _max_redirects attribute.

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.

proxy_pattern

Provides the current state of the _proxy_pattern attribute.

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_redirects(value: int) → PyFunceble.query.requests.requester.Requester[source]

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

Parameters:value – The value to set.
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_proxy_pattern(value: dict) → PyFunceble.query.requests.requester.Requester[source]

Overwrite the proxy pattern.

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/master/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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.query.whois package
Subpackages
PyFunceble.query.whois.converter package
Submodules
PyFunceble.query.whois.converter.base module

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

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

Provides the base of all WHOIS converter/extracter 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.whois.converter.base.ConverterBase(data_to_convert: Optional[Any] = None)[source]

Bases: object

Provides the base of all converter class.

data_to_convert

Provides the current state of the _data_to_convert attribute.

ensure_data_to_convert_is_given()[source]

Ensures that the data to convert is given before running the decorated method.

Raises:TypeError – If the subject is not a string.
get_converted() → Optional[Any][source]

Provides the converted data.

set_data_to_convert(value: Any) → PyFunceble.query.whois.converter.base.ConverterBase[source]

Sets the data to convert / to work with.

Parameters:value – The data to convert
PyFunceble.query.whois.converter.digit2digits module

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

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

Provides an easy way to convert a digit string to 2 digits.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.whois.converter.digit2digits.Digit2Digits(data_to_convert: Optional[Any] = None)[source]

Bases: PyFunceble.query.whois.converter.base.ConverterBase

Converts a given digit to a 2 digits string.

data_to_convert

Provides the current state of the _data_to_convert attribute.

get_converted() → str[source]

Provides the converted data (after conversion)

PyFunceble.query.whois.converter.expiration_date module

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

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

Provides our expiration date extracter.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.whois.converter.expiration_date.ExpirationDateExtractor(data_to_convert: Optional[Any] = None)[source]

Bases: PyFunceble.query.whois.converter.base.ConverterBase

Provides an interface for the extraction of the expiration date.

MARKER2DATE_REGEX = {'1': '([0-9]{2})-([a-z]{3})-([0-9]{4})', '10': '([0-9]{2})\\.([0-9]{2})\\.([0-9]{4})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}', '11': '([0-9]{2})-([A-Z]{1}[a-z]{2})-([0-9]{4})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\s[A-Z]{1}.*', '12': '([0-9]{4})\\/([0-9]{2})\\/([0-9]{2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\s\\(.*\\)', '13': '([0-9]{4})\\/([0-9]{2})\\/([0-9]{2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}$', '14': '[a-zA-Z]{3}\\s([a-zA-Z]{3})\\s([0-9]{2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\s[A-Z]{3}\\s([0-9]{4})', '15': '[a-zA-Z]{3}\\s([a-zA-Z]{3})\\s([0-9]{2})\\s([0-9]{4})', '16': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}$', '17': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}[A-Z].*', '18': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}[+-][0-9]{4}', '19': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9].*[+-][0-9]{2}:[0-9]{2}', '2': '([0-9]{2})\\.([0-9]{2})\\.([0-9]{4})$', '20': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9]{6}$', '21': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}\\.[0-9].*[A-Z]', '22': '([0-9]{2})-([0-9]{2})-([0-9]{4})', '23': '([0-9]{4})\\.\\s([0-9]{2})\\.\\s([0-9]{2})\\.', '24': '([0-9]{4})-([0-9]{2})-([0-9]{2})T[0-9]{2}:[0-9]{2}:[0-9]{2}[+-][0-9]{2}:[0-9]{2}', '25': '(?=[0-9]{8})(?=([0-9]{4})([0-9]{2})([0-9]{2}))', '26': '([0-9]{2})-([A-Z]{1}[a-z]{2})-([0-9]{4})$', '27': '([0-9]{2})\\.([0-9]{1})\\.([0-9]{4})', '28': '([0-9]{1,2})\\s([A-Z]{1}[a-z]{2})\\s([0-9]{4})', '29': '([0-9]{2})-([A-Z]{1}[a-z]*)-([0-9]{4})', '3': '([0-3][0-9])\\/(0[1-9]|1[012])\\/([0-9]{4})', '30': '([0-9]{4})-([A-Z]{1}[a-z]{2})-([0-9]{2})\\.', '31': '[a-zA-Z]{3}\\s([a-zA-Z]{3})\\s([0-9]{1,2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}\\s([0-9]{4})', '32': '()[a-zA-Z]{3}\\s([a-zA-Z]{3})\\s([0-9]{4})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}', '33': '([A-Z]{1}[a-z]*)\\s([0-9]{1,2})\\s([0-9]{4})', '34': '([0-9]{1,2})\\.([0-9]{1,2})\\.([0-9]{4})', '35': '([0-9]{4})([0-9]{2})([0-9]{2})[0-9]+', '36': '(0[1-9]|1[012])\\/([0-3][0-9])\\/([0-9]{4})', '37': '([A-Z]{1}[a-z].*)\\s\\s([0-9]{1,2})\\s([0-9]{4})', '38': '([0-9]{1,})[a-z]{1,}\\s([A-Z].*)\\s(2[0-9]{3})', '4': '([0-9]{4})-([0-9]{2})-([0-9]{2})$', '5': '([0-9]{4})\\.([0-9]{2})\\.([0-9]{2})$', '6': '([0-9]{4})\\/([0-9]{2})\\/([0-9]{2})$', '7': '([0-9]{4})\\.([0-9]{2})\\.([0-9]{2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}', '8': '([0-9]{4})([0-9]{2})([0-9]{2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}', '9': '([0-9]{4})-([0-9]{2})-([0-9]{2})\\s[0-9]{2}:[0-9]{2}:[0-9]{2}'}

Provides all the known regex to extract the date.

Note

The index (or key) will be used to map or group some of them later.

PATTERNS = ['\\[expires\\s+on\\](.*)', 'data\\s+de\\s+expiração\\s+\\/\\s+Expiration\\s+Date\\s+\\(dd\\/mm\\/yyyy\\):(.*)', "date\\s+d'expiration:(.*)", 'domain_datebilleduntil:(.*)', 'Exp\\s+date:(.*)', 'expiration:\\.+(.*)', 'expiration\\s+date:(.*)', 'expiration\\s+date\\s+:(.*)', 'expiration\\s+time:(.*)', 'expire-date:(.*)', 'expire:(.*)', 'expire\\s+date:(.*)', 'expire\\s+on:(.*)', 'expired:(.*)', 'expires:(.*)', 'expires\\.+:(.*)', 'expires\\s+at:(.*)', 'expires\\s+on:(.*)', 'expires\\s+on\\.+:(.*)', 'expiry\\s+:(.*)', 'expiry\\s+date:(.*)', 'fecha\\s+de\\s+expiración\\s+\\(expiration\\s+date\\):(.*)', 'fecha\\s+de\\s+vencimiento:(.*)', 'free-date(.*)', 'record\\s+expires\\s+on(.*)(\\(YYYY-MM-DD\\))', 'registry\\s+expiry\\s+date:(.*)', 'renewal:(.*)', 'renewal\\s+date:(.*)', 'status:\\s+OK-UNTIL(.*)', 'valid-date(.*)', 'validity:(.*)']

Provides all our known patterns.

REGEX_DIGITS = '[0-9]'

Provides the regex to match in order to extract the digits.

REGEX_PARSE_MAP = [{'regex_keys': [1, 2, 3, 10, 11, 22, 26, 27, 28, 29, 32, 34, 38], 'positions': {'day': 0, 'month': 1, 'year': 2}}, {'regex_keys': [14, 15, 31, 33, 36, 37], 'positions': {'day': 1, 'month': 0, 'year': 2}}, {'regex_keys': [4, 5, 6, 7, 8, 9, 12, 13, 16, 17, 18, 19, 20, 21, 23, 24, 25, 30, 35], 'positions': {'day': 2, 'month': 1, 'year': 0}}]

Our parsing map. Indeed, we hava a list of regex, but no way to know how to parse them. Especially when the order (month, day, year) are different from a format to another.

This variable solve that problem by interpreting all regex we previously created.

data_to_convert

Provides the current state of the _data_to_convert attribute.

get_converted() → Optional[str][source]

Provides the expiration date of the record (if found).

PyFunceble.query.whois.converter.month2unified module

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

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

Provides a way to convert a given month to our unified format.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.whois.converter.month2unified.Month2Unified(data_to_convert: Optional[Any] = None)[source]

Bases: PyFunceble.query.whois.converter.base.ConverterBase

Converts the given month into our unified format.

MAP = {'apr': ['4', '04', 'apr', 'april', 'apr.'], 'aug': ['8', '08', 'aug', 'august', 'aug.'], 'dec': ['12', 'dec', 'december', 'dec.'], 'feb': ['2', '02', 'feb', 'february', 'feb.'], 'jan': ['1', '01', 'jan', 'january', 'jan.'], 'jul': ['7', '07', 'jul', 'july', 'jul.'], 'jun': ['6', '06', 'jun', 'june', 'jun.'], 'mar': ['3', '03', 'mar', 'march', 'mar.'], 'may': ['5', '05', 'may'], 'nov': ['11', 'nov', 'november', 'nov.'], 'oct': ['10', 'oct', 'october', 'oct.'], 'sep': ['9', '09', 'sep', 'september', 'sep.', 'sept', 'sept.']}
data_to_convert

Provides the current state of the _data_to_convert attribute.

get_converted() → str[source]

Provides the converted data (after conversion)

Warning

If no month is found, the given data is given as response.

PyFunceble.query.whois.converter.registrar module

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

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

Provides our registrar extrator.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.whois.converter.registrar.RegistarExtractor(data_to_convert: Optional[Any] = None)[source]

Bases: PyFunceble.query.whois.converter.base.ConverterBase

Provides an interface for the extration of the registrar.

PATTERNS = ['authorized\\s+agency(\\s+|):(.*)', 'domain\\s+support(\\s+|):(.*)', 'registrar\\s+name(\\s+|):(.*)', 'registrar_name(\\s+|):(.*)', 'registrar(\\s+|):(.*)', 'registrar\\.+(\\s+|):(.*)', 'registration\\s+service\\s+provider(\\s+|):(.*)', 'sponsoring\\s+registrar(\\s+|):(.*)', 'sponsoring\\s+registrar\\s+organization(\\s+|):(.*)']
data_to_convert

Provides the current state of the _data_to_convert attribute.

get_converted() → Optional[str][source]

Provides the registrar of the record (if found).

Module contents

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

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

Provides the converter or extractor around the WHOIS query logic.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.whois.query_tool.WhoisQueryTool(subject: Optional[str] = None, *, server: Optional[str] = None, query_timeout: Optional[float] = None)[source]

Bases: object

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

BUFFER_SIZE = 4096
STD_PORT = 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.
expiration_date

Provides the current state of the _expiration_date attribute.

expiration_date_extractor = None
get_lookup_record() → Optional[PyFunceble.query.record.whois.WhoisQueryToolRecord][source]

Provides the current query record.

get_record() → Optional[str][source]

Provides the current record.

Side Effect:
The record will be queried if it is non existent.
get_whois_server() → Optional[str][source]

Provides the whois server to work with.

iana_dataset = None
lookup_record = None
query() → str[source]

Queries the WHOIS record and return the current object.

query_record()[source]

Queries the record before executing the decorated method.

query_timeout

Provides the current state of the _query_timeout attribute.

record

Provides the current state of the _record attribute.

registrar

Provides the current state of the _registrar attribute.

registrar_extractor = None
reset_record()[source]

Resets the record before executing the decorated method.

server

Provides the current state of the _server attribute.

set_query_timeout(value: Union[float, int]) → PyFunceble.query.whois.query_tool.WhoisQueryTool[source]

Sets the query_timeout to apply.

Parameters:value – The query_timeout to apply.
set_server(value: str) → PyFunceble.query.whois.query_tool.WhoisQueryTool[source]

Sets the server to communicate with.

Parameters:value – The server to work with.
set_subject(value: str) → PyFunceble.query.whois.query_tool.WhoisQueryTool[source]

Sets the subject to work with.

Parameters:value – The subject to set.
subject

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
Submodules
PyFunceble.query.collection module

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

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

Provides ans interface which let us interact with the Collection 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.collection.CollectionQueryTool(*, token: Optional[str] = None, url_base: Optional[str] = None, preferred_status_origin: Optional[str] = None)[source]

Bases: object

Provides the interface to the collection dataset.

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 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_PREFERRED_STATUS_ORIGIN = 'frequent'
STD_URL_BASE = 'http://localhost:8001'
SUPPORTED_CHECKERS = ['syntax', 'reputation', 'availability']
SUPPORTED_STATUS_ORIGIN = ['frequent', 'latest', 'recommended']
guess_all_settings() → PyFunceble.query.collection.CollectionQueryTool[source]

Try to guess all settings.

guess_and_set_preferred_status_origin() → PyFunceble.query.collection.CollectionQueryTool[source]

Try to guess the preferred status origin.

guess_and_set_url_base() → PyFunceble.query.collection.CollectionQueryTool[source]

Try to guess the URL base to work with.

preferred_status_origin

Provides the value of the _preferred_status_origin attribute.

pull(subject: str) → Optional[dict][source]

Pulls all data related to the subject or None

Parameters:subject – The subject to search for.
Raises:TypeError – When the given subject is not a str.
Returns:The response of the search.
push(checker_status: Union[PyFunceble.checker.availability.status.AvailabilityCheckerStatus, PyFunceble.checker.syntax.status.SyntaxCheckerStatus, PyFunceble.checker.reputation.status.ReputationCheckerStatus]) → Optional[dict][source]

Push the given status to the collection.

Parameters:

checker_status – The status to push.

Raises:
  • TypeError
    • When the given checker_status is not a AvailabilityCheckerStatus, SyntaxCheckerStatus or ReputationCheckerStatus.
    • When the given checker_status.subject is not a str.
  • ValueError – When the given checker_status.subject is empty.
session = None
set_preferred_status_origin(value: str) → PyFunceble.query.collection.CollectionQueryTool[source]

Sets the preferred status origin.

Parma value:The value to set.
set_token(value: str) → PyFunceble.query.collection.CollectionQueryTool[source]

Sets the value of the _token attribute.

Parameters:value – The value to set.
set_url_base(value: str) → PyFunceble.query.collection.CollectionQueryTool[source]

Sets the base of the URL to work with.

Parma value:The value to set.
token

Provides the currently set token.

url_base

Provides the value of the _url_base attribute.

PyFunceble.query.http_status_code module

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

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

Provides our interface for getting the status code 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.http_status_code.HTTPStatusCode(subject: Optional[str] = None, *, timeout: Optional[float] = None, verify_certificate: Optional[bool] = None, allow_redirects: Optional[bool] = None)[source]

Bases: object

Provides an interface for the extration of the HTTP status code.

STD_ALLOW_REDIRECTS = False
STD_TIMEOUT = 5.0
STD_UNKNOWN_STATUS_CODE = 99999999
STD_VERIFY_CERTIFICATE = True
allow_redirects

Provides the current state of the _allow_redirects attribute.

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.
get_status_code() → int[source]

Provides the status code.

Note

The HTTP status code provided will differs regarding the following conditions.

Assuming, that allow_redirects is set to False, you will be provided the following:

On the other site if the allow_redirects property is set to True, this method will provide the status of the last one in the redirection order.

In case of any error, this method will provide the default one.

guess_and_set_timeout() → PyFunceble.query.http_status_code.HTTPStatusCode[source]

Tries to guess and set the timeout from the configuration.

guess_and_set_verify_certificate() → PyFunceble.query.http_status_code.HTTPStatusCode[source]

Tries to guess and set the verify_certificate attribute.

set_allow_redirects(value: bool) → PyFunceble.query.http_status_code.HTTPStatusCode[source]

Sets the value of the verify_certificate variable.

Parameters:value – The value to set.
set_subject(value: str) → PyFunceble.query.http_status_code.HTTPStatusCode[source]

Sets the subject to work with.

Parameters:value – The subject to set.
set_timeout(value: Union[float, int]) → PyFunceble.query.http_status_code.HTTPStatusCode[source]

Sets the timeout to apply.

Parameters:value – The timeout to apply.
set_verify_certificate(value: bool) → PyFunceble.query.http_status_code.HTTPStatusCode[source]

Sets the value of the verify_certificate variable.

Parameters:value – The value to set.
subject

Provides the current state of the _subject attribute.

timeout

Provides the current state of the _timeout attribute.

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 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.utils package
Submodules
PyFunceble.utils.platform module

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

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

Provides a simple way to get the current platform.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.utils.platform.PlatformUtility[source]

Bases: object

Provides an easy way to get the current platform.

CYGWIN = ['cygwin', 'cygwin_nt-10.0']

Provides the list of supporter cygwin platform.

MAC = ['darwin']

Provides the list of supported MAC platform.

UNIX = ['linux', 'darwin']

Provides the list of supported unix platform.

WINDOWS = ['windows']

Provides the list of supported windows platform.

static get() → str[source]

Returns the current platform.

classmethod is_cygwin() → bool[source]

Checks if the current platform is in our cygwin list.

classmethod is_mac_os() → bool[source]

Checks if the current platform is in our OSX list.

classmethod is_unix() → bool[source]

Checks if the current platform is in our unix list.

classmethod is_windows() → bool[source]

Checks if the current platform is in our windows list.

PyFunceble.utils.profile module

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

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

Provides some global utilities.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.utils.profile.profile_it(*, sort_stats: str = 'cumulative', show_callers: bool = False)[source]

Provides a context manager which will activates the profiling of our source code.

Parameters:
  • sort_starts – The column to sort.
  • show_callers – Authorizes the output of the callers.
PyFunceble.utils.profile.profile_memory(stats_mode: str = 'lineno', top_limit: int = 10)[source]

Provides a context manager which will activates memory profiling of our source code.

PyFunceble.utils.version module

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

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

Provides an interface for version comparison or manipulation.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.utils.version.VersionUtility(local_version: Optional[str] = None)[source]

Bases: object

Provides an interface to compare or manipulate a version.

Parameters:local_version – The local version to work with.
Variables:local_version – The version we are currently working with.
get_real_parsed_version(version: str) → str[source]

Provides the real version to work with.

Parameters:version – The version to parse.
static get_splitted(version: str) → Tuple[List[str], str][source]

Splits the version from its code name.

Parameters:version – The version to split.
Returns:A tuple. The first index is the digit part of the version, when the second one is the the non-digit part of the version.

As example if 1.0.0. Hello World is given, this method will output:

([1,0,0], " Hello World")
static is_cloned() → bool[source]

Checks if the local version is a cloned (from git) one.

is_dev() → bool[source]

Checks if the local version is the dev one.

is_equal_to(upstream_version: str) → bool[source]

Compares if the local version is equal the given one.

is_master() → bool[source]

Checks if the local version is the master one.

is_older_than(upstream_version: str) → bool[source]

Compares if the local version is older that the given one.

is_recent(upstream_version: str) → bool[source]

Compares if the upstream version is older that the given one.

literally_compare(upstream_version: str) → bool[source]

Compares new_version with the given base version.

Parameters:new_version – The new version to compare with.
Returns:
  • True: base version == upstream version
  • False: base version != upstream version
local_version

Provides the current state of the _local_version attribute.

real_local_version

Provides the real local version.

set_local_version(value: str) → PyFunceble.utils.version.VersionUtility[source]

Sets the local version to work with.

Parameters:value – The local version to work with.
Module contents

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

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

Provides some global utilities.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.

Submodules

PyFunceble.exceptions module

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

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

Provides our exceptions.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
exception PyFunceble.exceptions.NoInternetConnection[source]

Bases: PyFunceble.exceptions.PyFuncebleException

Describes a missing connection.

exception PyFunceble.exceptions.PleaseUpdatePyFunceble[source]

Bases: PyFunceble.exceptions.PyFuncebleException

Describes the impossiblity to continue with an older version.

exception PyFunceble.exceptions.PyFuncebleException[source]

Bases: Exception

Describes our own exceptions.

PyFunceble.facility module

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

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

Provides everything which we may need while running.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.

PyFunceble.factory module

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

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

Provides everything which doesn’t get through the door of the facility.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.

PyFunceble.logger module

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

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

Provides our logger.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.logger.Logger(*, activated: Optional[bool] = None, min_level: Optional[int] = None, output_dir: Optional[str] = None)[source]

Bases: object

Provides our logging logic.

Warning

There is several way to activate the logging.

  1. Through the PYFUNCEBLE_DEBUG_ON_SCREEN environment variable.
  2. Through the DEBUG_PYFUNCEBLE_ON_SCREEN environment variable.
  3. Through the PYFUNCEBLE_DEBUG environment variable.
  4. Through the DEBUG_PYFUNCEBLE environment variable.
  5. Through the PyFunceble.logger.Logger.set_activated() method.
OWN_FORMAT = '[%(asctime)s | %(levelname)s | %(origin_path)s:%(origin_line)s@%(origin_func)s | PPID%(process)d:%(processName)s]:\n%(message)s\n'

Our very own format.

ROOT_FORMAT = '[%(asctime)s::%(levelname)s](PID%(process)s:%(processName)s): %(message)s'

The format of the root loggy.

STD_MIN_LEVEL = 20
activated

Provides the current state of the _activated attribute.

authorized

Provides the authorization to actually log.

critical(*args, **kwargs)[source]

Logs to the PyFunceble.critical logger.

critical_logger = None
debug(*args, **kwargs)[source]

Logs to the PyFunceble.debug logger.

debug_logger = None
destroy_loggers() → PyFunceble.logger.Logger[source]

Destroyes all existing loggers.

env_var_helper = <PyFunceble.helpers.environment_variable.EnvironmentVariableHelper object>
error(*args, **kwargs)[source]

Logs to the PyFunceble.error logger.

error_logger = None
exception(*args, **kwargs)[source]

Logs to the PyFunceble.exception logger.

fatal(*args, **kwargs)[source]

Logs to the PyFunceble.fatal logger.

fatal_logger = None
get_handler(level_name: str) → Union[logging.StreamHandler, logging.handlers.RotatingFileHandler, None][source]

Given a level name, this method provides the right handler for it!

get_next_logger() → Generator[None, Tuple[logging.Logger, str], None][source]

Provides the next logger.

static get_origin() → dict[source]

Provides the informatioon about where the logger was triggered.

Returns:A tuple, which is composed of the following.

(trigger file path, trigger line, trigger function/method name)

guess_all_settings() → PyFunceble.logger.Logger[source]

Try to guess all settings.

guess_and_set_min_level() → PyFunceble.logger.Logger[source]

Tries to guess the min level from the configuration.

info(*args, **kwargs)[source]

Logs to the PyFunceble.info logger.

info_logger = None
init_loggers() → PyFunceble.logger.Logger[source]

Init all our logger.

min_level

Provides the current state of the _min_level attribute.

on_file

Provides the authorization to log on file.

on_screen

Provides the authorization to log on screen.

output_directory

Provides the current state of the _output_directory attribute.

own_formatter = <logging.Formatter object>
root_formatter = <logging.Formatter object>
set_activated(value: bool) → PyFunceble.logger.Logger[source]

Sets the value of the activated attribute.

Parameters:value – The value to set.
set_min_level(value: Union[int, str]) → PyFunceble.logger.Logger[source]

Sets the minimum level to log.

Parameters:value – The value to set.
set_output_directory(value: str) → PyFunceble.logger.Logger[source]

Sets the directory to write.

Parameters:value – The value to set.
single_logger_factory()[source]

Provides the general factory.

Parameters:level_name – The level to log.
sqlalchemy_logger = None
warning(*args, **kwargs)[source]

Logs to the PyFunceble.warning logger.

warning_logger = None

PyFunceble.sessions module

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

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

Provides the location of all our sessions

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.

PyFunceble.storage module

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

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

Provides a central storage place.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.

PyFunceble.storage_facility module

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

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

Provides some facilities for the storage module.

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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.storage_facility.get_config_directory(*, project_name: str, project_version: str) → str[source]

Provides the location of the configuration directory.

Module contents

The tool to check the availability or syntax of domain, IP or 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/latest/
Project homepage:
https://pyfunceble.github.io/

License:

Copyright 2017, 2018, 2019, 2020, 2022, 2023 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.
PyFunceble.get_complements(subject: str, include_given: bool = False) → List[str][source]

Provides the complements of a given subject.

A complement is a for example example.org if www.example.org is given and vice-versa.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import Subject2Complements

my_subject = "example.org"
complements = Subject2Complements(
    my_subject
).get_converted(include_given=True)
Parameters:
  • subject – The subject to work with.
  • include_given – Include the given subject in the result.
PyFunceble.is_domain(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid second level domain or subdomain.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import DomainSyntaxChecker

my_subject = "example.org"
the_status = DomainSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is a domain (2nd level or subdomain).
print(f"{my_subject} is domain ? {the_status.is_valid()}")
Parameters:subject – The subject to work with.
PyFunceble.is_domain_malicious(subject: str, **kwargs) → bool[source]

Checks if the given domain is malicious.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import DomainReputationChecker

my_subject = "example.org"
the_status = DomainReputationChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is malicious.
print(f"{my_subject} is Malicious ? {the_status.is_malicious()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ip(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid IP range.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPSyntaxChecker

my_subject = "192.168.0.0"
the_status = IPSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is an IP (v4 or v6).
print(f"{my_subject} is IP ? {the_status.is_valid()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ip_range(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid IP range.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPSyntaxChecker

my_subject = "192.168.0.0"
the_status = IPSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is an IP range (v4 or v6).
print(f"{my_subject} is IP range ? {the_status.is_valid_range()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ipv4(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid IPv4.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPSyntaxChecker

my_subject = "192.168.0.0"
the_status = IPSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is an IPv4.
print(f"{my_subject} is IPv4 ? {the_status.is_valid_v4()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ipv4_malicious(subject: str, **kwargs) → bool[source]

Checks if the given IPv4 is malicious.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPReputationChecker

my_subject = "192.168.0.1"
the_status = IPReputationChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is malicious.
print(f"{my_subject} is Malicious ? {the_status.is_malicious()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ipv4_range(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid IPv4 range.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPSyntaxChecker

my_subject = "192.168.0.0"
the_status = IPSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is IPv4 range.
print(f"{my_subject} is IPv4 range ? {the_status.is_valid_v4_range()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ipv6(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid IPv6.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPSyntaxChecker

my_subject = "192.168.0.0"
the_status = IPSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is an IPv6.
print(f"{my_subject} is IPv6 ? {the_status.is_valid_v6()}")
Parameters:subject – The subject to work with.
PyFunceble.is_ipv6_range(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid IPv6 range.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import IPSyntaxChecker

my_subject = "::1"
the_status = IPSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is IPv6 range.
print(f"{my_subject} is IPv6 range ? {the_status.is_valid_v6_range()}")
Parameters:subject – The subject to work with.
PyFunceble.is_second_level_domain(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid second level domain.

Warning

This method was added for retrocompatibility. It may be removed in the future and is still available for convenience.

Please consider the following alternative example:

from PyFunceble import SecondLvlDomainSyntaxChecker

my_subject = "example.org"
the_status = SecondLvlDomainSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is a second level domain.
print(f"{my_subject} is 2nd level domain ? {the_status.is_valid()}")
Parameters:subject – The subject to work with.
PyFunceble.is_subdomain(subject: str, **kwargs) → bool[source]

Checks if the given subject is a syntactically valid subdomain.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import SubDomainSyntaxChecker

my_subject = "hello.example.org"
the_status = SubDomainSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is a subdomain.
print(f"{my_subject} is subdomain ? {the_status.is_valid()}")
Parameters:subject – The subject to work with.
PyFunceble.is_url(subject: str, **kwargs) → bool[source]

Checks if the given subject is syntactically a valid URL.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import DomainReputationChecker

my_subject = "https://example.org"
the_status = URLSyntaxChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is a URL.
print(f"{my_subject} is URL ? {the_status.is_valid()}")
Parma subject:The subject to check.
PyFunceble.is_url_malicious(subject: str, **kwargs) → bool[source]

Checks if the given URL is malicious.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import URLReputationChecker

my_subject = "https://example.org"
the_status = URLReputationChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is malicious.
print(f"{my_subject} is Malicious ? {the_status.is_malicious()}")
Parameters:subject – The subject to work with.
PyFunceble.load_config(*args, **kwargs) → None[source]

Placeholder before deletion.

Since 4.0.0, you are not required to load the configuration before hand. If you still want too because you may want to use a special CLI related method, you can doing it so:

import PyFunceble.facility

PyFunceble.facility.ConfigLoader.start()
PyFunceble.test(subject: str, **kwargs) → PyFunceble.checker.availability.status.AvailabilityCheckerStatus[source]

Checks the avaialbility of the given subject assuming that it is a domain or an IP.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import DomainAndIPAvailabilityChecker

my_subject = "example.org"
the_status = DomainAndIPAvailabilityChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is available.
print(f"{my_subject} is available ? {the_status.is_available()}")
Parameters:subject – The subject to work with.
PyFunceble.url_test(subject: str, **kwargs) → PyFunceble.checker.availability.status.AvailabilityCheckerStatus[source]

Checks the availability of the given subject assuming that it is a URL.

Warning

This method may be removed in the future. It is still available for convenience.

Please consider the following alternative example:

from PyFunceble import URLAvailabilityChecker

my_subject = "http://example.org"
the_status = URLAvailabilityChecker(
    my_subject
).get_status()

# Get the status in dict format.
print(the_status.to_dict())

# Get the status in json format.
print(the_status.to_json())

# Check if it is available.
print(f"{my_subject} is available ? {the_status.is_available()}")
Parameters:subject – The subject to work with.

Indices and tables