Use Wazo programmable application

How do I use the wazo python packages referenced in

Specifically

  • wazo_websocketd_client
  • wazo_auth_client
  • wazo_calld_client

on a remote server?

I am trying to learn node-red and other means to programmatically access wazo APIs
and I want to do this from a remote server running node-red and Python

The remote server is Debian 10 with Python 3 installed and configured with pip and venv

For the Python code, in a script on the remote server
I need to import the above modules but I get
ModuleNotFoundError: No module named ‘wazo_websocketd_client’
when I try to import them on the remote server (no surprise)

I also got the same error when I tried to use
“from wazo_websocketd_client import Client as Websocket”
on a test script on the wazo server so it is also possible I am just not calling it properly

I tried searching on pypi.org for wazo (Search results · PyPI) and got nothing

I see a lot of packages on the Wazo server in
/usr/lib/python3/dist-packages
but of the 3 above, the only one package/directory present was wazo_auth_client

There are a number of other wazo packages there with similar or derivative names but I am not sure which ones or how many I need

I assume I have to export/import some packages from the wazo server, but am not sure which ones and how to do that.

Any help appreciated.

Ok so I need to document how to install the library on another server. You need to use pip for example to install the library.

Looking forward to it @quintana

I have pip installed on my remote server and I have setup an environment in which I have run test scripts so all is working well there.

I tried running pip on the wazo server with
python -m pip search wazo
and
python3 -m pip search wazo
and both said “No module named pip”

I know the search function for pip is disabled, but I thought that would be the safest test. On my remote server, when I ran the same command(s), I did get the expected error message that the pip search function was disabled.

I di not want to install pip on the wazo server for fear it would mess up your configuration on wazo.

Also, on the wazo server, in /usr/lib/python3/dist-packages, I could not find 2 of the 3 packages shown in the sample code:

  • wazo_websocketd_client
  • wazo_calld_client
    I could only find
  • wazo_auth_client

So I figured I was really doing something wrong and posted the above, not wanting to mess up wazo.

To install on another debian or other system use pip3:

First you need the deps:

pip3 install https://github.com/wazo-platform/wazo-lib-rest-client/archive/master.zip
pip3 install https://github.com/wazo-platform/xivo-lib-python/archive/master.zip

And the libs:

pip3 install https://github.com/wazo-platform/wazo-auth-client/archive/master.zip
pip3 install https://github.com/wazo-platform/wazo-calld-client/archive/master.zip
pip3 install https://github.com/wazo-platform/wazo-websocketd-client/archive/master.zip

To find all of our library go here: Wazo Platform · GitHub

Sylvain

Thank you; working on node-red right now so will try this soon

Appreciate the help