# simqd
SIMQ服务提供者,同时也是SIMQ消息的消费者。
## 安装
```shell
pip install simqd
```
## 使用
### 命令帮忙信息
```shell
d:\simqd>simqd --help
Usage: simqd [OPTIONS]
Options:
-p, --service-provider TEXT
-s, --base-url TEXT
-a, --api-key TEXT
-w, --workers INTEGER
--help Show this message and exit.
```
### 使用案例
```shell
simqd -p simqdsvr.debug.DebugPing -p simqdsvr.debug.DebugEcho
```
## 服务提供者开发
**simqdsvr/debug.py**
```python
from simqdsvr.service_providers import SimqServiceProvider
__all__ = [
"DebugPing",
"DebugEcho",
]
class DebugPing(SimqServiceProvider):
channel = "debug.ping"
def handler(self):
return "pong"
class DebugEcho(SimqServiceProvider):
channel = "debug.echo"
def handler(self, msg):
return msg
```
## 版本记录
### 0.1.0
- 版本首发。
Raw data
{
"_id": null,
"home_page": null,
"name": "simqd",
"maintainer": "Chen Han",
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "simq, simqd",
"author": "Chen Han",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/2a/7d/5a2f72b54a8e1122ec0f6822206d4e6733b9af72bee20c2b3efeb3c213a6/simqd-0.1.0.tar.gz",
"platform": null,
"description": "# simqd\r\n\r\nSIMQ\u670d\u52a1\u63d0\u4f9b\u8005\uff0c\u540c\u65f6\u4e5f\u662fSIMQ\u6d88\u606f\u7684\u6d88\u8d39\u8005\u3002\r\n\r\n## \u5b89\u88c5\r\n\r\n```shell\r\npip install simqd\r\n```\r\n\r\n## \u4f7f\u7528\r\n\r\n### \u547d\u4ee4\u5e2e\u5fd9\u4fe1\u606f\r\n\r\n```shell\r\nd:\\simqd>simqd --help\r\nUsage: simqd [OPTIONS]\r\n\r\nOptions:\r\n -p, --service-provider TEXT\r\n -s, --base-url TEXT\r\n -a, --api-key TEXT\r\n -w, --workers INTEGER\r\n --help Show this message and exit.\r\n\r\n```\r\n\r\n### \u4f7f\u7528\u6848\u4f8b\r\n\r\n```shell\r\nsimqd -p simqdsvr.debug.DebugPing -p simqdsvr.debug.DebugEcho\r\n```\r\n\r\n## \u670d\u52a1\u63d0\u4f9b\u8005\u5f00\u53d1\r\n\r\n**simqdsvr/debug.py**\r\n\r\n```python\r\nfrom simqdsvr.service_providers import SimqServiceProvider\r\n\r\n__all__ = [\r\n \"DebugPing\",\r\n \"DebugEcho\",\r\n]\r\n\r\n\r\nclass DebugPing(SimqServiceProvider):\r\n channel = \"debug.ping\"\r\n\r\n def handler(self):\r\n return \"pong\"\r\n\r\n\r\nclass DebugEcho(SimqServiceProvider):\r\n channel = \"debug.echo\"\r\n\r\n def handler(self, msg):\r\n return msg\r\n```\r\n\r\n## \u7248\u672c\u8bb0\u5f55\r\n\r\n### 0.1.0\r\n\r\n- \u7248\u672c\u9996\u53d1\u3002\r\n",
"bugtrack_url": null,
"license": "Apache License, Version 2.0",
"summary": "SIMQ\u670d\u52a1\u63d0\u4f9b\u8005\uff0c\u540c\u65f6\u4e5f\u662fSIMQ\u6d88\u606f\u7684\u6d88\u8d39\u8005\u3002",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [
"simq",
" simqd"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "5af716abd9ed57f0a45173ff90cafabfe28018406c56af4a7245aba903b3c665",
"md5": "c3caa88ad123d2c65264bb850296f20e",
"sha256": "fce85d979739f9e7989e1ef8f5cccf918a62a93b20b3b0bf5fcc0aae0ec1ab31"
},
"downloads": -1,
"filename": "simqd-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c3caa88ad123d2c65264bb850296f20e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 8682,
"upload_time": "2024-10-18T10:21:24",
"upload_time_iso_8601": "2024-10-18T10:21:24.404784Z",
"url": "https://files.pythonhosted.org/packages/5a/f7/16abd9ed57f0a45173ff90cafabfe28018406c56af4a7245aba903b3c665/simqd-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "2a7d5a2f72b54a8e1122ec0f6822206d4e6733b9af72bee20c2b3efeb3c213a6",
"md5": "3f8e8823bea4f5f681c263a44096be04",
"sha256": "7b59be3a5eac20e6ada098806afbbfb882b029e17e89e719170ee9df2c5631c6"
},
"downloads": -1,
"filename": "simqd-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "3f8e8823bea4f5f681c263a44096be04",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 8043,
"upload_time": "2024-10-18T10:21:25",
"upload_time_iso_8601": "2024-10-18T10:21:25.907119Z",
"url": "https://files.pythonhosted.org/packages/2a/7d/5a2f72b54a8e1122ec0f6822206d4e6733b9af72bee20c2b3efeb3c213a6/simqd-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-10-18 10:21:25",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "simqd"
}