"Pipenv install" Based on the Pipfile, this creates a local environment with the required packages.
F - Activate the created virtual environment
"Pipenv shell" Your prompt changes to indicate you are in the "isolated" setup.
NOTE: When you start the bot, you need to be in the Pipenv shell. Otherwise, it will not have the right libraries available. Alternatively: type "pipenv run python webex-bot-ws.py" This directly runs the python code inside the pipenv environment. ______________ C/D/E/F above: only if you use Pipenv ______________
G - Set bot token environment variable
(MacOS): export MY_BOT_TOKEN='YOUR_TOKEN_HERE'
(Windows): set MY_BOT_TOKEN=YOUR_TOKEN_HERE
H - Run the Bot (Python code)
When the "___start_____" message appears, test the bot!
I - Test the bot
Send "test" to the bot.
It should repeat your message.
Send "hello" to the bot.
It should respond differently. in the terminal/cmd window you can see the code showing its activity.
NEXT? update the "process_message" function to make it respond to the commands that you are sending.
WHAT DOES PIPENV DO? Create a Pipfile with your package & python requirements. Then run "pipenv install" to create an isolated environment with the python version and the required python libraries. These are not installed system-wide but inside the 'virtual environment' that you can (de)activate. GREAT? Yes, it is great to test a setup or library without having to install it system wide. You can have multiple virtual environments that each have different versions, libraries etc., without affecting the system wide setup. DIFFFICULT? No. Really, it isn't as scary as it sounds, just follow instructions!
The WebSocket Protocol establishes full-duplex, bidirectional communication between a client and server. This two-way flow is unique to WebSocket connections, and it means they can transfer data very quickly and efficiently.
In order for me to create presentations, demos, labs and more: let me know you liked it
Q: Does this work inside the corporate Firewall? A: Yes, it most likely does Q: Can these websockets wash my car? A: Sure, but only when - in the evening - it's colder than outside.
Do this without Pipenv?
Use the instructions above, except:
- skip step C, D, E and F - install the required Python libraries manually: