WhatsApp Business API Setup Debugger
User Guide: https://developers.facebook.com/docs/whatsapp/guides/wadebug
WADebug is a command-line tool to help find any potential issues with WhatsApp Business API setup, and to make requesting for help from WhatsApp support more effective.
To run, simply type wadebug on command-ine and check the diagnostic.
It will guide on some problems and provide guidance if you need additional
support.
Usage
To retrieve and save logs under wadebug_logs/ in the current directory:
$ wadebug logs
To retrieve logs and send them to Facebook for troubleshooting:
$ wadebug logs --send
[New since v0.1.5] To retrieve logs starting from a particular date time (GMT timezone), e.g.:
$ wadebug logs --since='2020-01-07 3:00:02'
To execute all checks:
$ wadebug
To list all available options:
$ wadebug ls
To execute one specific check:
$ wadebug partial check_mysql_version check_network
JSON mode:
$ wadebug --json
Installation
For users:
$ pip3 install wadebug
For developers:
This tool uses tox to test in Python 3. tox will create
virtual environments to run tests. Install tox on your system's Python.
All other dependencies with go into virtualenvs.
- Install tox on your system using pip
pip install tox, you may need to run the command insudo - After installing tox, run
toxin the root directory. Tests should run and pass. - Run
source .tox/py3/bin/activateto enable one of the virtualenvs. Dependencies will be installed automatically. - Run
pip install --editable .to enablewadebugin all directories that would reflect your changes. - Run
wadebugwith environment variableWADEBUG_DEV_MODE=Trueto enable full stacktrace. The variable is set to False by default.
Testing
To execute all unit tests, from project's root folder directory run:
$ tox
Warning: do NOT run tox from a virtualenv as it will fail.
tox will run tests in Python 3 and run flake8 linter.
To run tests in Python 3 for faster feedback, run either $ pytest from within the virtualenv or $ tox -epy3 out of it.
To run tests in a particular module:
source .tox/py3/bin/activate # to enable virtualenv on Bash $ pytest wadebug/wa_actions/tests/test_check_webapp_port.py -v
(-v turns on verbose mode, which shows every test case in the module)
Dependencies
- This tool uses https://docker-py.readthedocs.io for interacting with Docker
- It uses
clickto build the command-line interface
More details can be found at setup.py file.
Architecture
The module wa_actions.implementations is the heart of the tool. Each action
is a Python class with one static method called _run. This method describes the
action to perform.
The idea is that a developer can implement a new action to investigate a
potential problem with the deployment without knowing anything about wadebug architecture.
Three sample actions can be seem on wadebug/wa_actions/implementations/dummy_action.py to understand how they are created.
On wadebug/wa_actions/implementations/check_webapp_port.py the implementation of a real action can be found.
License
WADebug is MIT licensed.
Release files for wadebug 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| wadebug-0.1.5.tar.gz | 34.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wadebug-0.1.5-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 95.6 kB
Release files / wadebug-0.1.5.tar.gz
| Download URL | wadebug-0.1.5.tar.gz |
|---|---|
| Size | 34.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
158f98a5b39fb5cb72969a723a58e255317516392c49cd249928f5b67ca9ccc3
|
|
BLAKE2b-256 checksum How to use checksums |
c56674e1972f2957e6e87c5e0a2cf6bc5839d350eef54b8a31a9546dadcda2ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|
Release files / wadebug-0.1.5-py2.py3-none-any.whl
| Download URL | wadebug-0.1.5-py2.py3-none-any.whl |
|---|---|
| Size | 60.8 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
2eb4a0626e8a7b6d7ab0014944ace52e275a03a19022309d83dfa10a30623f02
|
|
BLAKE2b-256 checksum How to use checksums |
60bd34f3fdf60ab69fb901cc4da197c5d6d58deb46fddf5baaacab4b47c62d62
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.35.0 CPython/3.7.4
|