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