# broadcast-service
broadcast-service is a lightweight python broadcast library. You can easily construct a broadcast pattern through this library.
## Reference
[Python最佳实践-构建自己的第三方库](https://blog.csdn.net/linZinan_/article/details/127944610)
## Setup
```sh
pip install constellat-broadcast-service
```
## Usage
There is a easy demo to show how to use broadcast-service.
```python
from broadcast_service import broadcast_service
def handle_msg(params):
print(params)
if __name__ == '__main__':
info = 'This is very important msg'
# listen topic
broadcast_service.listen('Test', handle_msg)
# publish broadcast
broadcast_service.broadcast('Test', info)
```
## Upload
```shell
# 打包项目
python setup.py sdist
# 上传包
twine upload dist/*
twine upload dist/constellat_broadcast_service.tar.gz
```
Raw data
{
"_id": null,
"home_page": "https://github.com/Constellat/constellat-broadcast-service",
"name": "constellat-broadcast-service",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.7, <4",
"maintainer_email": "",
"keywords": "broadcast,broadcast-service",
"author": "Constellat",
"author_email": "constellat0928@gamil.com",
"download_url": "https://files.pythonhosted.org/packages/47/2e/19a5f8dfb9ed5b7d8d247cbb70d51291691fa5982d71a3677791373cb6dd/constellat_broadcast_service-1.0.3.tar.gz",
"platform": null,
"description": "# broadcast-service\n\nbroadcast-service is a lightweight python broadcast library. You can easily construct a broadcast pattern through this library.\n\n## Reference\n[Python\u6700\u4f73\u5b9e\u8df5-\u6784\u5efa\u81ea\u5df1\u7684\u7b2c\u4e09\u65b9\u5e93](https://blog.csdn.net/linZinan_/article/details/127944610)\n\n## Setup\n\n```sh\npip install constellat-broadcast-service\n```\n\n\n## Usage\n\nThere is a easy demo to show how to use broadcast-service.\n\n```python\nfrom broadcast_service import broadcast_service\n\ndef handle_msg(params):\n print(params)\n\nif __name__ == '__main__':\n info = 'This is very important msg'\n\n # listen topic\n broadcast_service.listen('Test', handle_msg)\n\n # publish broadcast\n broadcast_service.broadcast('Test', info)\n\n```\n\n\n## Upload\n\n```shell\n# \u6253\u5305\u9879\u76ee\npython setup.py sdist\n# \u4e0a\u4f20\u5305\ntwine upload dist/*\ntwine upload dist/constellat_broadcast_service.tar.gz\n```\n",
"bugtrack_url": null,
"license": "",
"summary": "A sample Python project",
"version": "1.0.3",
"project_urls": {
"Homepage": "https://github.com/Constellat/constellat-broadcast-service"
},
"split_keywords": [
"broadcast",
"broadcast-service"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "472e19a5f8dfb9ed5b7d8d247cbb70d51291691fa5982d71a3677791373cb6dd",
"md5": "f4d85997ef007e2bb17397f9f1a11516",
"sha256": "b35eb50f32cc506795b6c9de628388e4ed068d26952eb0ac1319dc14cdda2efb"
},
"downloads": -1,
"filename": "constellat_broadcast_service-1.0.3.tar.gz",
"has_sig": false,
"md5_digest": "f4d85997ef007e2bb17397f9f1a11516",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.7, <4",
"size": 5376,
"upload_time": "2023-10-08T02:51:07",
"upload_time_iso_8601": "2023-10-08T02:51:07.128738Z",
"url": "https://files.pythonhosted.org/packages/47/2e/19a5f8dfb9ed5b7d8d247cbb70d51291691fa5982d71a3677791373cb6dd/constellat_broadcast_service-1.0.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-10-08 02:51:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Constellat",
"github_project": "constellat-broadcast-service",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "constellat-broadcast-service"
}