{"id":20065885,"url":"https://github.com/zhenruyan/pythongroupmsg","last_synced_at":"2025-05-05T18:32:05.247Z","repository":{"id":57457061,"uuid":"160391587","full_name":"zhenruyan/pythonGroupMsg","owner":"zhenruyan","description":"cython Broadcasting to multiple queues","archived":false,"fork":false,"pushed_at":"2018-12-06T13:24:35.000Z","size":3120,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-11-13T06:11:39.254Z","etag":null,"topics":["broadcasting","queue"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhenruyan.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-12-04T17:04:01.000Z","updated_at":"2019-09-26T10:34:31.000Z","dependencies_parsed_at":"2022-09-15T13:01:57.439Z","dependency_job_id":null,"html_url":"https://github.com/zhenruyan/pythonGroupMsg","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhenruyan%2FpythonGroupMsg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhenruyan%2FpythonGroupMsg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhenruyan%2FpythonGroupMsg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhenruyan%2FpythonGroupMsg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhenruyan","download_url":"https://codeload.github.com/zhenruyan/pythonGroupMsg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224461508,"owners_count":17315116,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["broadcasting","queue"],"created_at":"2024-11-13T13:53:13.074Z","updated_at":"2024-11-13T13:53:13.764Z","avatar_url":"https://github.com/zhenruyan.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n#   pythonGroupMsg Queue multicast broadcast\n\n\n##  cython  Broadcasting to multiple queues\n\n\n\u003e Recently, I'm going to do something like chat software. After a lot of testing, I've done this thing.\n\u003e\u003e  Performance is 13 times faster than py direct circular transmission\n\n\ninstall \n\n\n```bash\n    pip install pythonGroupMsg\n\n\n```\n\n\n\n\n###  push msg\n\n\npython \n```python\nimport pythonGroupMsg\nimport datetime\nimport logging\ne = []\nif __name__ == '__main__':\n    aatime = datetime.datetime.now()\n    for c in range(1,3):\n        e.append(c)\n    a = pythonGroupMsg.GroupMessage(profix=\"id:\", idlist=e,loglevel=logging.INFO)\n    a.initAllGroup()\n    print(\"100000 queue init\",(datetime.datetime.now() -aatime).microseconds/1000000,\"s\")\n    bbtime = datetime.datetime.now()\n    for d in range(1,10):\n        a.sendAllQueue(\"hello world\"+str(d))\n    print(\"100 message send on queue\",(datetime.datetime.now() - bbtime).microseconds/1000000,\"s\")\n    a.addGroup(\"chat\",660)\n    a.addGroup(\"chat\",661)\n    a.addGroup(\"chat\",662)\n    print(a.setGroup)\n    a.sendGroup(\"chat\",\"helloworldsadasdasd\")\n    a.sendGroup(\"chat\",\"helloworldsadasdasdas\")\n    for _ in range(0,2):\n        print(a.poll(660))\n        print(a.poll(661))\n        print(a.poll(662))\n    a.removeIdOfGroup(\"chat\",660)\n    a.sendGroup(\"chat\",\"helloworldsadasdasd\")\n    a.sendGroup(\"chat\",\"helloworldsadasdasdas\")\n    for _ in range(0,2):\n        print(a.poll(660))\n        print(a.poll(661))\n        print(a.poll(662))\n    a.removeGroup(\"chat\")\n    print(a.setGroup)\n    print(a.allQueue)\n    a.removeQueue(660)\n    a.removeQueue(1)\n    a.removeQueue(2)\n    print(a.allQueue)\n\n\n\n```\n\n\n\n\n\n\n\n\n\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhenruyan%2Fpythongroupmsg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhenruyan%2Fpythongroupmsg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhenruyan%2Fpythongroupmsg/lists"}