# Webex-Integration
**webex-integration** a simple project which can be used to send webex
messages and emits log records from the native logging module
## Installing Webex-Integration
Webex-Integration is available on PyPi
```console
$ python -m pip install webex-integration
```
## Usage
### Simple Message
In order to send a simple webex message, you just have to initialize a new
`WebexTeams` instance with you personal token and the appropriate room id:
```python
from webexintegration import WebexTeams
webex_teams = WebexTeams(
token = my_token,
room_id = my_room_id
)
response = webex_teams.send_message("This is a bot")
response.raise_for_status()
```
### logging handler
In order to send logging message into an selected chat room, you just have to
initialize a new `WebexTeamsHandler` with an appropriate `WebexTeams` instance
and pass the handler to your logging instance:
```python
import logging
from webexintegration import WebexTeams
webex_teams = WebexTeams(
token = my_token,
room_id = my_room_id
)
webex_handler = WebexHandler(webex_teams)
webex_handler.setLevel(logging.INFO)
logging.basicConfig(level=logging.INFO, handlers=[webex_handler])
try:
raise RuntimeError()
except Exception as ex:
logging.error("An Error occured")
```
The default logging formatter is set to `WebexFormatter`, feel free to
override or use a different formatter.
Raw data
{
"_id": null,
"home_page": "",
"name": "webex-integration",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "python,webex,logging,chat,cisco",
"author": "Deutsche Telekom IT GmbH",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/99/2e/7d76c058cfb18334afa9f502574328371a8b3897a7176c3e7eab79f8d303/webex-integration-0.0.3.tar.gz",
"platform": null,
"description": "# Webex-Integration\n\n**webex-integration** a simple project which can be used to send webex \nmessages and emits log records from the native logging module\n\n## Installing Webex-Integration\n\nWebex-Integration is available on PyPi\n\n```console\n$ python -m pip install webex-integration\n```\n\n## Usage\n\n### Simple Message\n\nIn order to send a simple webex message, you just have to initialize a new \n`WebexTeams` instance with you personal token and the appropriate room id:\n\n```python\nfrom webexintegration import WebexTeams\n\nwebex_teams = WebexTeams(\n token = my_token,\n room_id = my_room_id\n)\n\nresponse = webex_teams.send_message(\"This is a bot\")\nresponse.raise_for_status()\n```\n\n### logging handler\n\nIn order to send logging message into an selected chat room, you just have to \ninitialize a new `WebexTeamsHandler` with an appropriate `WebexTeams` instance \nand pass the handler to your logging instance:\n\n```python\nimport logging\nfrom webexintegration import WebexTeams\n\nwebex_teams = WebexTeams(\n token = my_token,\n room_id = my_room_id\n)\nwebex_handler = WebexHandler(webex_teams)\nwebex_handler.setLevel(logging.INFO)\n\nlogging.basicConfig(level=logging.INFO, handlers=[webex_handler])\n\ntry:\n raise RuntimeError()\nexcept Exception as ex:\n logging.error(\"An Error occured\")\n```\n\nThe default logging formatter is set to `WebexFormatter`, feel free to \noverride or use a different formatter.\n",
"bugtrack_url": null,
"license": "Apache Software License (Apache 2.0)",
"summary": "integrate Webex to your python project",
"version": "0.0.3",
"split_keywords": [
"python",
"webex",
"logging",
"chat",
"cisco"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "eb6da6a993366d67c7b100fc2ed17a54e2c77d0845ea26b6579b5cbf870e61a8",
"md5": "2a3b607af0a05cce98b8e12223e9d639",
"sha256": "a61ed97b8181af8bb1a5d107debaed1ec03b75cbadee83e2a7ae48ca119898cd"
},
"downloads": -1,
"filename": "webex_integration-0.0.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2a3b607af0a05cce98b8e12223e9d639",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8428,
"upload_time": "2023-01-27T11:52:11",
"upload_time_iso_8601": "2023-01-27T11:52:11.679470Z",
"url": "https://files.pythonhosted.org/packages/eb/6d/a6a993366d67c7b100fc2ed17a54e2c77d0845ea26b6579b5cbf870e61a8/webex_integration-0.0.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "992e7d76c058cfb18334afa9f502574328371a8b3897a7176c3e7eab79f8d303",
"md5": "ed1981db4bd57c98ca9f62e3d80494c0",
"sha256": "7b694809df66423f2c52c9f1da03ab01a4bccc7cdaf88310a3a4dfca1c001e64"
},
"downloads": -1,
"filename": "webex-integration-0.0.3.tar.gz",
"has_sig": false,
"md5_digest": "ed1981db4bd57c98ca9f62e3d80494c0",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 7383,
"upload_time": "2023-01-27T11:52:12",
"upload_time_iso_8601": "2023-01-27T11:52:12.873068Z",
"url": "https://files.pythonhosted.org/packages/99/2e/7d76c058cfb18334afa9f502574328371a8b3897a7176c3e7eab79f8d303/webex-integration-0.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-01-27 11:52:12",
"github": false,
"gitlab": false,
"bitbucket": false,
"lcname": "webex-integration"
}