dialogflow-log-parser
A module for dialogflow log parser
Only response textPaylod from dialogflow ES log file can be parsed into dict object.
Usage
This module parses dialogflow logs into python dictionary type.
Example usage
pip
pip install dialogflow-log-parser
python
from dialogflow_log_parser.es import response_to_dict
# store log string
textPayload = '[text from dialogflow ES textPayload]'
# parse string to dictionary object
response_dict = response_to_dict(textPayload)
Example of file and parsed object(json)
Please check test/es/data folder, so that you can know what kind of dictionary you get.
Also use swagger.yml file in swagger editor to see the entire response json data.
Log file
Dialogflow Response :
id: "response_id"
lang: "ja"
session_id: "dfMessenger-session-id"
timestamp: "2000-01-01T01:00:21.720007Z"
result {
source: "agent"
resolved_query: "WELCOME"
action: "input.welcome"
score: 1.0
parameters {
}
metadata {
intent_id: "intent_id"
intent_name: "Default Welcome Intent"
webhook_used: "false"
webhook_for_slot_filling_used: "false"
is_fallback_intent: "false"
}
fulfillment {
speech: "hello"
messages {
lang: "ja"
type {
number_value: 0.0
}
speech {
string_value: "hello"
}
}
}
}
status {
code: 200
error_type: "success"
}
Parsed json
{
"id": "response_id",
"lang": "ja",
"session_id": "dfMessenger-session-id",
"timestamp": "2000-01-01T01:00:21.720007Z",
"result": {
"source": "agent",
"resolved_query": "WELCOME",
"action": "input.welcome",
"score": 1.0,
"parameters": [],
"metadata": {
"intent_id": "intent_id",
"intent_name": "Default Welcome Intent",
"webhook_used": "false",
"webhook_for_slot_filling_used": "false",
"is_fallback_intent": "false"
},
"fulfillment": {
"speech": "hello",
"messages": [
{
"lang": "ja",
"type": 0.0,
"speech": "hello"
}
]
}
},
"status": {
"code": 200,
"error_type": "success"
}
}
Issues
Feel free to post issues for adding some function. (i.e. request textPayload or CX edition.)
Metadata
Release files for dialogflow-log-parser 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| dialogflow_log_parser-0.0.4.tar.gz | 12.3 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| dialogflow_log_parser-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 25.1 kB
Release files / dialogflow_log_parser-0.0.4.tar.gz
| Download URL | dialogflow_log_parser-0.0.4.tar.gz |
|---|---|
| Size | 12.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
75a6515d9baa843dd0ee9b2bde5b536505ee62a4a4789614d4937ceb4d4c43b3
|
|
BLAKE2b-256 checksum How to use checksums |
507b7b21f8a50ab911c5c066ca1fb0dbac1f6c17e6cf5386a2e17f885debcf8e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.5
|
Release files / dialogflow_log_parser-0.0.4-py3-none-any.whl
| Download URL | dialogflow_log_parser-0.0.4-py3-none-any.whl |
|---|---|
| Size | 12.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
118df4a88ebe356ba8374d58756d7b2b5ea745568ed54c6c3e475db7abbc7e5c
|
|
BLAKE2b-256 checksum How to use checksums |
685f7c14856851b1cb13ead3c195820c596d05f719e488293f086ef77179b4bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.5
|
Security for dialogflow-log-parser 0.0.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.