SlxJsonRpc JsonRpc helper class, that uses pydantic.
Project description
slxjsonrpc
SlxJsonRpc is a JsonRpc helper class, that uses pydantic.
SlxJsonRpc keep track of the JsonRpc schema, and procedure for each method. It also ensures to route each message to where it is expected.
SlxJsonRpc is build to be both that JsonRpc server & client. To enable the JsonRpc-server, the method_map need to be given.
Installation using pip
The slxjsonrpc package can be installed using PIP (Python Package Index) as follows:
$ pip install slxjsonrpc
Use case Examples
License
This project is licensed under the Apache License 2.0 - see the LICENSE.md file for details.
Known Bugs
...
TODO List
- Use case Examples.
- Add more/better logging logs.
- Enforce the result Schema. schema/jsonrpc.py:217-225
- Push to pip.
- Add more test to get a 100%-ish testing coverage.
- Test response with unknown id
- Test Request with unknown Method, and method Enum not set. jsonrpc.py:348 schema/jsonrpc.py:131
- Test Notification with unknown Method, and method Enum not set. jsonrpc.py:330
- Test RpcError, when no Error callback is set.
- Test Request, where params set, when they should not be.
- Test Notification, where params set, when they should not be.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file slxjsonrpc-0.8.0.tar.gz
.
File metadata
- Download URL: slxjsonrpc-0.8.0.tar.gz
- Upload date:
- Size: 9.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ec025b43f46773282b76c82756447f76b0198e60a6c09346523c78427072e98d |
|
MD5 | 4b1dbe2798318c00b1dfb297814de37f |
|
BLAKE2b-256 | d1e1f003fbfc06a7afccfe3fab1d8ae6d84ce7e6cea3af415376ed34cf9c5720 |
File details
Details for the file slxjsonrpc-0.8.0-py3-none-any.whl
.
File metadata
- Download URL: slxjsonrpc-0.8.0-py3-none-any.whl
- Upload date:
- Size: 14.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/2.0.0 pkginfo/1.5.0.1 requests/2.25.1 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.49.0 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ee3532419ef890b14a0c42a1e27c4eec6d503891551c372029f1dbdf9702171a |
|
MD5 | 55dc3ff69a13944e53d595770da8762e |
|
BLAKE2b-256 | 42559302e11095f5df1a8e409142c6dedb7497254d42868ca578608be4ae46ba |