orpc
Open RPC.
Install
pip install orpc
Client Install
pip install orpc-client
Protocol
oRPC request
- request_package = 4bytes-length-byteorder-big + msgstack.dumps(request_body)
- request_body = {"event": "xxx", "args": [], "kwargs": {}}
oRPC response
- response_package = 4bytes-length-byteorder-big + msgstack.dumps(response_body)
- response_body = {"result": xx, "code": 0, "message": "xxx"}
simple orpc server usage
Configs
- server.listen: 0.0.0.0
- server.port 8392
- server.backlog: 8192
- server.buffer_size: 4096
- server.rfile_buffer_size: buffer_size
- server.wfile_buffer_size: buffer_size
- max_request_size: 4194304
- result_packer: zenutils.packutils.RcmPacker
- authentication.enable
- authentication.event
- authentication.users
- services
- enable-debug-service
More configs see pypi package daemon-application.
servicesis a list of dict which item contains fields below:class: strargs: listkwargs: dict
authentication.usersis a username and password dict.- The
authentication.eventservice takes_protocol_instanceas a keyword parameter. - Set
_protocol_instance.authenticatedflag to True if login success. - The
authentication.eventservice's password parameter must be given in hash format, e.g.{SSM3}tcvAvgJqVjqC661OmZewsweDma4AOVaXruOtnCFqZrJoTllTYlNvcw==, a salted sm3 hash.
Command Help
test@testdeMacBook-Pro orpc % orpc --help
Usage: orpc [OPTIONS] COMMAND [ARGS]...
Options:
--logfmt TEXT
--logfile TEXT
--loglevel TEXT
--pidfile TEXT pidfile file path.
--workspace TEXT Set running folder
--daemon / --no-daemon Run application in background or in foreground.
-c, --config TEXT Config file path. Application will search config
file if this option is missing. Use sub-command
show-config-fileapaths to get the searching tactics.
--help Show this message and exit.
Commands:
restart Restart Daemon application.
show-config-filepaths Print out the config searching paths.
show-configs Print out the final config items.
start Start daemon application.
stop Stop daemon application.
Releases
v0.1.0
- First release.
v0.1.2
- Add oRPC connection auto login support.
v0.1.3
- Add auto_reconnect support for orpc-client.
Metadata
Release files for orpc 0.1.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| orpc-0.1.3.tar.gz | 4.9 kB | Without provenance | Details for orpc-0.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| orpc-0.1.3-py3-none-any.whl | Python 3 | none | any | Details for orpc-0.1.3-py3-none-any.whl |
Total release size: 9.6 kB
Release files / orpc-0.1.3.tar.gz
| Download URL | orpc-0.1.3.tar.gz |
|---|---|
| Size | 4.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2517ca72d925979c65588851996ad7a890ac88628f1bc7ab659fe31c002737eb
|
|
BLAKE2b-256 checksum How to use checksums |
da85181e7d12b4b46214386f57c82ea34bb3c7099d9e939f47d0def5af9872f4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Release files / orpc-0.1.3-py3-none-any.whl
| Download URL | orpc-0.1.3-py3-none-any.whl |
|---|---|
| Size | 4.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
918437c48df8d0d4f9523b981e580e1d3a3f5d669311a5db53349a3b98c6ba53
|
|
BLAKE2b-256 checksum How to use checksums |
ef908b95cd5963c0f9345c4e1df17a72c663bcfa27c05e0d9b276a7ee7ce8360
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.10.4
|
Security for orpc 0.1.3
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.