# 快速上手
正常情况(可以参考websocket.WebSocket的传参)
```python
import L2dvExApi
api = L2dvExApi.WebSocket()
api.connect("ws://127.0.0.1:8888/api")
api.ShowTextBubble(0, "Hello, World!")
api.close()
```
使用`wit ... as ...`自动开启/关闭链接(推荐)
```python
import L2dvExApi
with L2dvExApi.WebSocket("ws://127.0.0.1:8888/api") as api:
api.ShowTextBubble(0, "Hello, World!")
```
# API列表
```python
import L2dvExApi
print(L2dvExApi.ApiList.Msg_name_to_code.keys())
```
Raw data
{
"_id": null,
"home_page": "http://www.icedream.space",
"name": "L2dvExApi",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "live2d, api",
"author": "Esdrin",
"author_email": "esdrin@icedream.space",
"download_url": "https://files.pythonhosted.org/packages/eb/53/78ff0e37733cac2f64c8f66d9babcc546388b30589b3c710d2e6336f90ea/l2dvexapi-1.2.tar.gz",
"platform": "any",
"description": "# \u5feb\u901f\u4e0a\u624b\r\n\r\n\u6b63\u5e38\u60c5\u51b5\uff08\u53ef\u4ee5\u53c2\u8003websocket.WebSocket\u7684\u4f20\u53c2)\r\n\r\n```python\r\nimport L2dvExApi\r\napi = L2dvExApi.WebSocket()\r\napi.connect(\"ws://127.0.0.1:8888/api\")\r\napi.ShowTextBubble(0, \"Hello, World!\")\r\napi.close()\r\n```\r\n\r\n\u4f7f\u7528`wit ... as ...`\u81ea\u52a8\u5f00\u542f/\u5173\u95ed\u94fe\u63a5(\u63a8\u8350)\r\n\r\n```python\r\nimport L2dvExApi\r\nwith L2dvExApi.WebSocket(\"ws://127.0.0.1:8888/api\") as api:\r\n api.ShowTextBubble(0, \"Hello, World!\")\r\n```\r\n\r\n# API\u5217\u8868\r\n\r\n```python\r\nimport L2dvExApi\r\nprint(L2dvExApi.ApiList.Msg_name_to_code.keys())\r\n```\r\n",
"bugtrack_url": null,
"license": "MIT License",
"summary": "API for Live2DViewerEX",
"version": "1.2",
"project_urls": {
"Homepage": "http://www.icedream.space"
},
"split_keywords": [
"live2d",
" api"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "404dec4722d1a2f8ff16565e1359c13fcdcdd1a08efab80021c02a847f3d6a37",
"md5": "d7fe0091164704a2c4653d742ccabccd",
"sha256": "a0d863b15f195d52d653c1353c2ba78bdc2b3f19b71036ef19f22e566ee6900c"
},
"downloads": -1,
"filename": "L2dvExApi-1.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d7fe0091164704a2c4653d742ccabccd",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 4419,
"upload_time": "2024-05-16T08:33:14",
"upload_time_iso_8601": "2024-05-16T08:33:14.012670Z",
"url": "https://files.pythonhosted.org/packages/40/4d/ec4722d1a2f8ff16565e1359c13fcdcdd1a08efab80021c02a847f3d6a37/L2dvExApi-1.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "eb5378ff0e37733cac2f64c8f66d9babcc546388b30589b3c710d2e6336f90ea",
"md5": "05738663fb327a0b289b91737d1314b6",
"sha256": "840b97d9e8ab9561c3e72a39059bb4172ba020dfe6f7c4c5e1b63a9b1997c830"
},
"downloads": -1,
"filename": "l2dvexapi-1.2.tar.gz",
"has_sig": false,
"md5_digest": "05738663fb327a0b289b91737d1314b6",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 4087,
"upload_time": "2024-05-16T08:33:15",
"upload_time_iso_8601": "2024-05-16T08:33:15.430345Z",
"url": "https://files.pythonhosted.org/packages/eb/53/78ff0e37733cac2f64c8f66d9babcc546388b30589b3c710d2e6336f90ea/l2dvexapi-1.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-05-16 08:33:15",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "l2dvexapi"
}