# dialog-watson-client
Client for dialogs watson module
## Requirements
- **Python 2.7**
- **Pip**
## Installation
Install with pip: `pip install dialog-watson-client`
## Run the playground
Simply run in command line: `dialog-watson-client --name=dialog-name path/to/dialog/file [--clean](optional: clean your dialogs in watson)` and you will chat with your robot
**At the first launch it will create a config file located to `~/.config-dialog-watson.yml` and ask you your watson credentials**
## Usage for developers
Bootstrap example:
```python
from dialog_watson_client.Client import Client
watsonClient = Client('user_watson', 'password_watson', 'file/path/to/dialog', 'your_dialog_name') # this library abstract the registering of dialog (and the update when you cahnge it) and run it, to do that it will store your dialog id in a file called `dialog_id_file.txt`
watsonClient.start_dialog() # this will create the dialog into watson or update it and run the initialization of the conversation
resp = watsonClient.converse('hi') # talk to the robot, here it will say 'hi' and watson will answered
print resp.response # show the response from watson
watsonClient.get_profile().get_data() # get extracted data from watson in format: [key => value]
```
**Note**: If your file is in xml (and you have `lxml` lib installed) it will also check your format with xsd: https://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/dialog/download/WatsonDialogDocument_1.0.xsd
Client for dialogs watson module
## Requirements
- **Python 2.7**
- **Pip**
## Installation
Install with pip: `pip install dialog-watson-client`
## Run the playground
Simply run in command line: `dialog-watson-client --name=dialog-name path/to/dialog/file [--clean](optional: clean your dialogs in watson)` and you will chat with your robot
**At the first launch it will create a config file located to `~/.config-dialog-watson.yml` and ask you your watson credentials**
## Usage for developers
Bootstrap example:
```python
from dialog_watson_client.Client import Client
watsonClient = Client('user_watson', 'password_watson', 'file/path/to/dialog', 'your_dialog_name') # this library abstract the registering of dialog (and the update when you cahnge it) and run it, to do that it will store your dialog id in a file called `dialog_id_file.txt`
watsonClient.start_dialog() # this will create the dialog into watson or update it and run the initialization of the conversation
resp = watsonClient.converse('hi') # talk to the robot, here it will say 'hi' and watson will answered
print resp.response # show the response from watson
watsonClient.get_profile().get_data() # get extracted data from watson in format: [key => value]
```
**Note**: If your file is in xml (and you have `lxml` lib installed) it will also check your format with xsd: https://www.ibm.com/smarterplanet/us/en/ibmwatson/developercloud/doc/dialog/download/WatsonDialogDocument_1.0.xsd
Metadata
Release files for dialog-watson-client 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dialog_watson_client-1.0.2-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Release files / dialog_watson_client-1.0.2-py2.py3-none-any.whl
| Download URL | dialog_watson_client-1.0.2-py2.py3-none-any.whl |
|---|---|
| Size | 10.5 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
1ef691faeb1ad2ab2163ed53d2312cf503871321538f2a17f27dd4d8a36163a5
|
|
BLAKE2b-256 checksum How to use checksums |
6a2fe507cec233201fb1845dc8d6b5033b1854217397d0f86e7ec59f09118c33
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |