{"id":24640019,"url":"https://github.com/mrjohannchang/ipcq.py","last_synced_at":"2025-05-12T09:39:53.295Z","repository":{"id":49358531,"uuid":"278408282","full_name":"mrjohannchang/ipcq.py","owner":"mrjohannchang","description":null,"archived":false,"fork":false,"pushed_at":"2022-07-25T01:56:59.000Z","size":398,"stargazers_count":3,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-23T00:39:02.634Z","etag":null,"topics":["ipc","library","python","queue"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/ipcq/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mrjohannchang.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-07-09T15:53:12.000Z","updated_at":"2022-07-25T01:53:15.000Z","dependencies_parsed_at":"2022-09-07T03:54:31.806Z","dependency_job_id":null,"html_url":"https://github.com/mrjohannchang/ipcq.py","commit_stats":null,"previous_names":["johannchangpro/ipcq.py","changyuheng/ipcq.py","mrjohannchang/ipcq.py"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrjohannchang%2Fipcq.py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrjohannchang%2Fipcq.py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrjohannchang%2Fipcq.py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mrjohannchang%2Fipcq.py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mrjohannchang","download_url":"https://codeload.github.com/mrjohannchang/ipcq.py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253710044,"owners_count":21951271,"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":["ipc","library","python","queue"],"created_at":"2025-01-25T11:30:14.934Z","updated_at":"2025-05-12T09:39:53.268Z","avatar_url":"https://github.com/mrjohannchang.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipcq\n\nA simple inter-process communication (IPC) Queue built on top of the built-in library [multiprocessing](https://docs.python.org/3/library/multiprocessing.html).\n\n![](examples/showcase.gif)\n\n* [Quick Start](#quick-start)\n* [API](#api)\n    + [class ipcq.**QueueManagerServer**(*address*: Optional[str], *authkey*: Optional[bytes])](#class-ipcqqueuemanagerserveraddress-optionalstr-authkey-optionalbytes)\n        - [def **get_queue**(*ident*: Union[AnyStr, int, type(None)] = None) -\u003e queue.Queue](#def-get_queueident-unionanystr-int-typenone--none---queuequeue)\n    + [class ipcq.**QueueManagerClient**(*address*: Optional[str], *authkey*: Optional[bytes])](#class-ipcqqueuemanagerclientaddress-optionalstr-authkey-optionalbytes)\n        - [def **get_queue**(*ident*: Union[AnyStr, int, type(None)] = None) -\u003e queue.Queue](#def-get_queueident-unionanystr-int-typenone--none---queuequeue-1)\n\n## Quick Start\n\n**Server**\n\n```\nimport ipcq\n\n\nwith ipcq.QueueManagerServer(address=ipcq.Address.DEFAULT, authkey=ipcq.AuthKey.DEFAULT) as server:\n    server.get_queue().get()\n```\n\n**Client**\n\n```\nimport ipcq\n\n\nclient = ipcq.QueueManagerClient(address=ipcq.Address.DEFAULT, authkey=ipcq.AuthKey.DEFAULT)\nclient.get_queue().put('a message')\n```\n\nPlease checkout out the [examples](examples) folder for more examples.\n\n## API\n\n### class ipcq.**QueueManagerServer**(*address*: Optional[str], *authkey*: Optional[bytes])\n\nThis class inherits [multiprocessing.managers.BaseManager](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.managers.BaseManager).\n\n*address* can be `ipcq.Address.AUTO`, `ipcq.Address.CWD` or any other path described in `str`.\nWhen it's given `ipcq.Address.AUTO`, a random address will be chosen.\n`ipcq.Address.CWD` means using a file that lives in the current working directory.\n\n*authkey* is just like the password for authentication. It can be `ipcq.AuthKey.AUTO`, `ipcq.AuthKey.DEFAULT`, `ipcq.AuthKey.EMPTY` or any other arbitrary `bytes`.\n\n#### def **get_queue**(*ident*: Union[AnyStr, int, type(None)] = None) -\u003e queue.Queue\n\nThe method returns a `queue.Queue` corresponding with *ident*.\nThe returned queue is shared between the server and the client.\nSo both the server and the client access to the same queue.\n\n*ident* is the identity, it can be any string-like object, `int` or `None`.\nThe default is `None`.\nIt is used for differetiate the obtained queues.\nDifferent *ident*s refer to different queues.\n\n### class ipcq.**QueueManagerClient**(*address*: Optional[str], *authkey*: Optional[bytes])\n\nThis class inherits [multiprocessing.managers.BaseManager](https://docs.python.org/3/library/multiprocessing.html#multiprocessing.managers.BaseManager).\n\n*address* can be `ipcq.Address.CWD` or any other path described in `str`.\nWhen the server is set with `ipcq.Address.CWD` and the client is running in the same CWD that the server runs, the client can be set with `ipcq.Address.CWD` as well.\nOtherwise, it should be the same with the *address* field in the server instance.\n\n*authkey* is just like the password for authentication. It has to be the same with what's set on the server .\nIf the server was set with `ipcq.AuthKey.DEFAULT` or `ipcq.AuthKey.EMPTY`, the client can just be set with the same.\n\n#### def **get_queue**(*ident*: Union[AnyStr, int, type(None)] = None) -\u003e queue.Queue\n\nThe method returns a `queue.Queue` corresponding with *ident*.\nThe returned queue is shared between the server and the client.\nSo both the server and the client access to the same queue.\n\n*ident* is the identity, it can be any string-like object, `int` or `None`.\nThe default is `None`.\nIt is used for differetiate the obtained queues.\nDifferent *ident*s refer to different queues.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrjohannchang%2Fipcq.py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrjohannchang%2Fipcq.py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrjohannchang%2Fipcq.py/lists"}