Name | ipc-purepy JSON |
Version |
0.1.0
JSON |
| download |
home_page | |
Summary | Allow sent core Python objects between two likely independent Python processes using UNIX sockets. |
upload_time | 2023-12-22 23:53:20 |
maintainer | |
docs_url | None |
author | |
requires_python | >=3.11 |
license | MIT License Copyright (c) 2023 Michel Novus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
unix socket
ipc
process communication
simple
python primitives
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# IPC PurePy
The package allow sent core Python objects between two likely independent
Python processes using UNIX sockets.
It provides a Server class (`Server`), a Client function
(`communicate`), and a `PyCoreObject` type alias.
### PyCoreObject alias:
It's a type alias defined as the union of the basic types of Python language
(`str`, `int`, `float`, `bool`, `None`) and common collections
(`list[PyCoreObject]` and `dict[str, PyCoreObject]`).
The dict type key must be are str type and value are PyCoreObject.
### function is_pycoreobject(object: Any) -> bool:
This recursive function allows to check if the object passed to it
is a valid PyCoreObject.
### class Server(socket_path: str):
The class defines the server socket as a context handler. Through the
wait_connection() method it waits for some external connection and returns
the PyCoreObject sent to it.
The connection to the client is expected to be closed with the
close_connection() method.
Server class implements the reply() method that allows to send a
PyCoreObject to the client if the connection is alive.
### function communicate(socket_path: str, data: PyCoreObject) -> PyCoreObject:
Client endpoint to communicate with the server socket, send data to
server socket and expect receive a response from it.
Raw data
{
"_id": null,
"home_page": "",
"name": "ipc-purepy",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": "",
"keywords": "unix socket,ipc,process communication,simple,python primitives",
"author": "",
"author_email": "Michel Novus <michelnovus@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/84/37/d53ba8c4321facc1207265195bfcab3a488049dad344ea5488a1054025e4/ipc-purepy-0.1.0.tar.gz",
"platform": null,
"description": "# IPC PurePy\n\nThe package allow sent core Python objects between two likely independent \nPython processes using UNIX sockets.\n\nIt provides a Server class (`Server`), a Client function \n(`communicate`), and a `PyCoreObject` type alias.\n\n### PyCoreObject alias:\nIt's a type alias defined as the union of the basic types of Python language\n(`str`, `int`, `float`, `bool`, `None`) and common collections\n(`list[PyCoreObject]` and `dict[str, PyCoreObject]`). \nThe dict type key must be are str type and value are PyCoreObject.\n\n### function is_pycoreobject(object: Any) -> bool:\nThis recursive function allows to check if the object passed to it \nis a valid PyCoreObject.\n\n### class Server(socket_path: str):\nThe class defines the server socket as a context handler. Through the \nwait_connection() method it waits for some external connection and returns \nthe PyCoreObject sent to it. \nThe connection to the client is expected to be closed with the \nclose_connection() method. \nServer class implements the reply() method that allows to send a \nPyCoreObject to the client if the connection is alive.\n\n### function communicate(socket_path: str, data: PyCoreObject) -> PyCoreObject:\nClient endpoint to communicate with the server socket, send data to \nserver socket and expect receive a response from it.\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2023 Michel Novus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "Allow sent core Python objects between two likely independent Python processes using UNIX sockets.",
"version": "0.1.0",
"project_urls": {
"Repository": "https://github.com/michelnovus/ipc-purepy"
},
"split_keywords": [
"unix socket",
"ipc",
"process communication",
"simple",
"python primitives"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "ff2976400f777b0dadb3ab22c73a04987a268e5bde437d7b69a0d443e90c8794",
"md5": "12e99a80b7518fec2ac2a30aea023c49",
"sha256": "e8820650e129c64e1a137e2bdb606ca33ddd934736d944db500d0ab261b1cece"
},
"downloads": -1,
"filename": "ipc_purepy-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "12e99a80b7518fec2ac2a30aea023c49",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 8586,
"upload_time": "2023-12-22T23:53:18",
"upload_time_iso_8601": "2023-12-22T23:53:18.761845Z",
"url": "https://files.pythonhosted.org/packages/ff/29/76400f777b0dadb3ab22c73a04987a268e5bde437d7b69a0d443e90c8794/ipc_purepy-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "8437d53ba8c4321facc1207265195bfcab3a488049dad344ea5488a1054025e4",
"md5": "b1b92500568795b6f94e15c9fa5ca9e9",
"sha256": "8f1d3e7ed54d4c24dff9b2a035295c7d61aa9c79eda0e21677e7925d88f65f98"
},
"downloads": -1,
"filename": "ipc-purepy-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "b1b92500568795b6f94e15c9fa5ca9e9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 8336,
"upload_time": "2023-12-22T23:53:20",
"upload_time_iso_8601": "2023-12-22T23:53:20.715461Z",
"url": "https://files.pythonhosted.org/packages/84/37/d53ba8c4321facc1207265195bfcab3a488049dad344ea5488a1054025e4/ipc-purepy-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-12-22 23:53:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "michelnovus",
"github_project": "ipc-purepy",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "ipc-purepy"
}