Name | pyfrpc JSON |
Version |
0.2.12
JSON |
| download |
home_page | None |
Summary | Python implementation of fastrpc protocol |
upload_time | 2024-08-19 16:54:03 |
maintainer | None |
docs_url | None |
author | Vladimir Burian |
requires_python | None |
license | None |
keywords |
frpc
fastrpc
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Pyfrpc
Pyfrpc is a Python implementation of FastRPC protocol/library (
[@github](https://seznam.github.io/frpc/) or
[@sourceforge](http://fastrpc.sourceforge.net/)
). The original library contains Python bindings, but:
1. I prefer python packages without dependencies on debian packages.
2. Its flexibility is limited in some points. E.g. the library provides its own
implementation of HTTP server and client, which is nice to have in C++, but not
in Python I would say as there are already full-featured and more mature
libraries available for those tasks.
3. In my opinion it's not worth to wrap such a library for python anyway (at
least not from today's perspective). The original binding itself is 3500 lines
of code. So this is an alternative aproach.
4. And I want to use it as a showcase for cython as well.
This library provides FastRPC encoding/decoding functions, FastRPC client
(based on 'requests') and an interactive FastRPC client/terminal 'pyfrpc' (an
alternative to 'fastrpc-netcat' based on 'IPython'). API mostly differs and is
not meant to be a drop-in replacement.
It is compatible with protocol versions 1.0, 2.0, 2.1 and 3.0.
Package provides both cython (C extencion) and pure python implementations.
Cython implementation is faster but requires C toolchain (or available python
wheels). To use pure python implementation set env variable `PYFRPC_NOEXT=1`
during installation.
Some features missing are:
- handling of base64 encoded FastRPC
- helper to build a server
## Interactive client
Interactive client opens na ipython session with varible `client` initialized to
FastFRPC connection. It supports tab-based completion of remote procedures'
names as well as shownig their documentation using question mark notation as is
usual in ipython.
```
$ pyfrpc --help
usage: pyfrpc [-h] [--insecure] URL
FRPC netcat for interactive connection to FRPC server
positional arguments:
URL URL of FRPC server to connect to
optional arguments:
-h, --help show this help message and exit
--insecure Do not check server's cert
```
```
$ pyfrpc http://my-avesome-server
In [1]: client.greeting?
...
Docstring: Prints greeting.
In [2]: client.greeting()
Out[2]:
'hello from server'
```
## Benchmark
2020-12-02, Python3.7 @ debian buster:
```
+------------------------+----------+----------+----------+
| description | encoding | decoding | total |
+------------------------+----------+----------+----------+
| pyfrpc | 1.6ms | 3.6ms | 5.3ms |
| ujson | 5.1ms | 4.7ms | 9.9ms |
| fastrpc | 3.2ms | 7.0ms | 10.2ms |
| json | 7.0ms | 5.2ms | 12.3ms |
| pyfastrpc | 59.2ms | 77.2ms | 136.3ms |
+------------------------+----------+----------+----------+
```
2017-12-29, benchmarks during library development:
```
+------------------------+----------+----------+----------+
| description | encoding | decoding | total |
+========================+==========+==========+==========+
| fastrpc (original lib) | 1.7 ms | 5.7 ms | 7.5 ms |
+------------------------+----------+----------+----------+
| python | 35.1 ms | 25.8 ms | 60.8 ms |
+------------------------+----------+----------+----------+
| pypy | 12.6 ms | 5.2 ms | 17.8 ms |
+------------------------+----------+----------+----------+
| cython (naive) | 17.9 ms | 43.1 ms | 61.0 ms |
| cython (cdef) | 11.9 ms | 22.6 ms | 34.4 ms |
| cython (static typing) | 2.2 ms | 3.7 ms | 5.9 ms |
| cython (low level api) | 1.3 ms | 3.7 ms | 4.9 ms |
+------------------------+----------+----------+----------+
```
Raw data
{
"_id": null,
"home_page": null,
"name": "pyfrpc",
"maintainer": null,
"docs_url": null,
"requires_python": null,
"maintainer_email": null,
"keywords": "frpc, fastrpc",
"author": "Vladimir Burian",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/bc/75/bab9e7c47a06b53c9f8b54576a34e3a7cf1f9c150c188ff2ce8dcd18140e/pyfrpc-0.2.12.tar.gz",
"platform": null,
"description": "# Pyfrpc\n\nPyfrpc is a Python implementation of FastRPC protocol/library (\n[@github](https://seznam.github.io/frpc/) or\n[@sourceforge](http://fastrpc.sourceforge.net/)\n). The original library contains Python bindings, but:\n\n1. I prefer python packages without dependencies on debian packages.\n2. Its flexibility is limited in some points. E.g. the library provides its own \nimplementation of HTTP server and client, which is nice to have in C++, but not \nin Python I would say as there are already full-featured and more mature \nlibraries available for those tasks.\n3. In my opinion it's not worth to wrap such a library for python anyway (at \nleast not from today's perspective). The original binding itself is 3500 lines \nof code. So this is an alternative aproach.\n4. And I want to use it as a showcase for cython as well.\n\nThis library provides FastRPC encoding/decoding functions, FastRPC client \n(based on 'requests') and an interactive FastRPC client/terminal 'pyfrpc' (an \nalternative to 'fastrpc-netcat' based on 'IPython'). API mostly differs and is \nnot meant to be a drop-in replacement.\n\nIt is compatible with protocol versions 1.0, 2.0, 2.1 and 3.0.\n\nPackage provides both cython (C extencion) and pure python implementations. \nCython implementation is faster but requires C toolchain (or available python \nwheels). To use pure python implementation set env variable `PYFRPC_NOEXT=1` \nduring installation.\n\nSome features missing are:\n\n- handling of base64 encoded FastRPC\n- helper to build a server\n\n\n## Interactive client\n\nInteractive client opens na ipython session with varible `client` initialized to \nFastFRPC connection. It supports tab-based completion of remote procedures' \nnames as well as shownig their documentation using question mark notation as is \nusual in ipython.\n\n```\n$ pyfrpc --help\n\nusage: pyfrpc [-h] [--insecure] URL\n\nFRPC netcat for interactive connection to FRPC server\n\npositional arguments:\n URL URL of FRPC server to connect to\n\noptional arguments:\n -h, --help show this help message and exit\n --insecure Do not check server's cert\n```\n\n```\n$ pyfrpc http://my-avesome-server\n\nIn [1]: client.greeting?\n...\nDocstring: Prints greeting.\n\nIn [2]: client.greeting()\nOut[2]: \n'hello from server'\n```\n\n\n## Benchmark\n\n2020-12-02, Python3.7 @ debian buster:\n```\n+------------------------+----------+----------+----------+\n| description | encoding | decoding | total |\n+------------------------+----------+----------+----------+\n| pyfrpc | 1.6ms | 3.6ms | 5.3ms |\n| ujson | 5.1ms | 4.7ms | 9.9ms |\n| fastrpc | 3.2ms | 7.0ms | 10.2ms |\n| json | 7.0ms | 5.2ms | 12.3ms |\n| pyfastrpc | 59.2ms | 77.2ms | 136.3ms |\n+------------------------+----------+----------+----------+\n```\n\n2017-12-29, benchmarks during library development:\n```\n+------------------------+----------+----------+----------+\n| description | encoding | decoding | total |\n+========================+==========+==========+==========+\n| fastrpc (original lib) | 1.7 ms | 5.7 ms | 7.5 ms |\n+------------------------+----------+----------+----------+\n| python | 35.1 ms | 25.8 ms | 60.8 ms |\n+------------------------+----------+----------+----------+\n| pypy | 12.6 ms | 5.2 ms | 17.8 ms |\n+------------------------+----------+----------+----------+\n| cython (naive) | 17.9 ms | 43.1 ms | 61.0 ms |\n| cython (cdef) | 11.9 ms | 22.6 ms | 34.4 ms |\n| cython (static typing) | 2.2 ms | 3.7 ms | 5.9 ms |\n| cython (low level api) | 1.3 ms | 3.7 ms | 4.9 ms |\n+------------------------+----------+----------+----------+\n```\n",
"bugtrack_url": null,
"license": null,
"summary": "Python implementation of fastrpc protocol",
"version": "0.2.12",
"project_urls": {
"Homepage": "https://gitlab.com/vladaburian/pyfrpc"
},
"split_keywords": [
"frpc",
" fastrpc"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "9b4ba61a4837de5eea64b24608b12e77619e3db71e66d7b274468b0621e03510",
"md5": "9387bcfe84e2c96d7d048df506caff45",
"sha256": "cf108b05e71e39f0a3209f29c3e3c6aa9551f47866f53e3cb551d07be9252ad3"
},
"downloads": -1,
"filename": "pyfrpc-0.2.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "9387bcfe84e2c96d7d048df506caff45",
"packagetype": "bdist_wheel",
"python_version": "cp310",
"requires_python": null,
"size": 289965,
"upload_time": "2024-08-19T16:53:55",
"upload_time_iso_8601": "2024-08-19T16:53:55.110749Z",
"url": "https://files.pythonhosted.org/packages/9b/4b/a61a4837de5eea64b24608b12e77619e3db71e66d7b274468b0621e03510/pyfrpc-0.2.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "16ead0a62ee1a5b9e3b006b44e641d197b6b2b8668bf32487f4e6c79d548734e",
"md5": "a7228f2c619da3a9694225e32dac691a",
"sha256": "79b879773f7a25dd9cccefc9060e41bed6505a731c2acedfb68e53b5d4ea2126"
},
"downloads": -1,
"filename": "pyfrpc-0.2.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "a7228f2c619da3a9694225e32dac691a",
"packagetype": "bdist_wheel",
"python_version": "cp311",
"requires_python": null,
"size": 306166,
"upload_time": "2024-08-19T16:53:57",
"upload_time_iso_8601": "2024-08-19T16:53:57.004350Z",
"url": "https://files.pythonhosted.org/packages/16/ea/d0a62ee1a5b9e3b006b44e641d197b6b2b8668bf32487f4e6c79d548734e/pyfrpc-0.2.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1c08118583c865309e9abe9f8c7c9f4a7b47c9513631e501ea1059f584816a92",
"md5": "82a41593e596b94d04e3074eeadc4609",
"sha256": "383d6e5b440508706a089938602c239d74c29426a28ae61351a659a166cf1cf5"
},
"downloads": -1,
"filename": "pyfrpc-0.2.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "82a41593e596b94d04e3074eeadc4609",
"packagetype": "bdist_wheel",
"python_version": "cp312",
"requires_python": null,
"size": 310246,
"upload_time": "2024-08-19T16:53:58",
"upload_time_iso_8601": "2024-08-19T16:53:58.423785Z",
"url": "https://files.pythonhosted.org/packages/1c/08/118583c865309e9abe9f8c7c9f4a7b47c9513631e501ea1059f584816a92/pyfrpc-0.2.12-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "0a6adacb5fe748f6dd618e57fe8eddff82057c6b9026306053c021c96bcb502c",
"md5": "a552d109a3293405d94ec4c16c85e5b7",
"sha256": "139becdc2bf4aa43563e803d9acd40d3e5d851b1f08b4a55385bb88957130828"
},
"downloads": -1,
"filename": "pyfrpc-0.2.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "a552d109a3293405d94ec4c16c85e5b7",
"packagetype": "bdist_wheel",
"python_version": "cp37",
"requires_python": null,
"size": 273415,
"upload_time": "2024-08-19T16:53:59",
"upload_time_iso_8601": "2024-08-19T16:53:59.549523Z",
"url": "https://files.pythonhosted.org/packages/0a/6a/dacb5fe748f6dd618e57fe8eddff82057c6b9026306053c021c96bcb502c/pyfrpc-0.2.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "c5aa36b7b1f18d4126dcfea808bf4c2af4c1bd35f6793f6da896bbaa407dc500",
"md5": "29ac1f717c1f92267f2aecfda5617134",
"sha256": "987eff9dcecb6cf78a7e2cacb8ccaabd6a04c642bd1b12766049c2ad8ad7be2d"
},
"downloads": -1,
"filename": "pyfrpc-0.2.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "29ac1f717c1f92267f2aecfda5617134",
"packagetype": "bdist_wheel",
"python_version": "cp38",
"requires_python": null,
"size": 292762,
"upload_time": "2024-08-19T16:54:00",
"upload_time_iso_8601": "2024-08-19T16:54:00.939703Z",
"url": "https://files.pythonhosted.org/packages/c5/aa/36b7b1f18d4126dcfea808bf4c2af4c1bd35f6793f6da896bbaa407dc500/pyfrpc-0.2.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "668d3518dbf395d34d941f3b97b9d6729dc5cb067913ab36b87c0bf1fe2f45a5",
"md5": "67f11349fda3624e0f61c89876f739c8",
"sha256": "5fc275b368836fc32d7ddca4f33101be46703d50f95e6ed0b3a0d10a19240162"
},
"downloads": -1,
"filename": "pyfrpc-0.2.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl",
"has_sig": false,
"md5_digest": "67f11349fda3624e0f61c89876f739c8",
"packagetype": "bdist_wheel",
"python_version": "cp39",
"requires_python": null,
"size": 288946,
"upload_time": "2024-08-19T16:54:02",
"upload_time_iso_8601": "2024-08-19T16:54:02.452806Z",
"url": "https://files.pythonhosted.org/packages/66/8d/3518dbf395d34d941f3b97b9d6729dc5cb067913ab36b87c0bf1fe2f45a5/pyfrpc-0.2.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.manylinux_2_28_x86_64.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "bc75bab9e7c47a06b53c9f8b54576a34e3a7cf1f9c150c188ff2ce8dcd18140e",
"md5": "5f9457e927aaf2f9fe15bfc2213feae9",
"sha256": "a5c4e037ffff1015656932fe016097855aa4906717fa771844a1f4c1f8df2727"
},
"downloads": -1,
"filename": "pyfrpc-0.2.12.tar.gz",
"has_sig": false,
"md5_digest": "5f9457e927aaf2f9fe15bfc2213feae9",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 17888,
"upload_time": "2024-08-19T16:54:03",
"upload_time_iso_8601": "2024-08-19T16:54:03.726355Z",
"url": "https://files.pythonhosted.org/packages/bc/75/bab9e7c47a06b53c9f8b54576a34e3a7cf1f9c150c188ff2ce8dcd18140e/pyfrpc-0.2.12.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-08-19 16:54:03",
"github": false,
"gitlab": true,
"bitbucket": false,
"codeberg": false,
"gitlab_user": "vladaburian",
"gitlab_project": "pyfrpc",
"lcname": "pyfrpc"
}