Skip to main content

JsonRpcExtended Logo

JsonRpcExtended

Description

A remote procedure call (RPC) framework based on JSON-RPC, extended to support alternative data formats and structures such as CSV, XML, binary and python calls.

Requirements

This package require:

  • python3
  • python3 Standard Library
  • PegParser

Installation

Pip

python3 -m pip install JsonRpcExtended

Git

git clone "https://github.com/mauricelambert/JsonRpcExtended.git"
cd "JsonRpcExtended"
python3 -m pip install .

Wget

wget https://github.com/mauricelambert/JsonRpcExtended/archive/refs/heads/main.zip
unzip main.zip
cd JsonRpcExtended-main
python3 -m pip install .

cURL

curl -O https://github.com/mauricelambert/JsonRpcExtended/archive/refs/heads/main.zip
unzip main.zip
cd JsonRpcExtended-main
python3 -m pip install .

Usages

Python script

from JsonRpcExtended import *
from asyncio import run

server = AsyncServer("127.0.0.1", 8520)
run(server.start())
from JsonRpcExtended import *
import socket

with socket.socket(socket.AF_INET, socket.SOCK_STREAM) as server:
    server.bind(("127.0.0.1", 8520))
    server.listen()
    conn, addr = server.accept()
    with conn:
        while True:
            first_byte = conn.recv(1)
            protocol = get_rpc_format(first_byte)

            if FORMATS.BINARY == protocol:
                data = conn.recv(1024)
            elif FORMATS.JSON == protocol:
                file = conn.makefile(mode='rwb')
                data = file.readline()
            elif FORMATS.CSV == protocol:
                file = conn.makefile(mode='rwb')
                data = file.readline() + file.readline()
            elif FORMATS.XML == protocol:
                raise NotImplementedError("XML parsing is not implemented yet")

            response = loading_classes[protocol].handle_request_data(first_byte + data, conn.recv)
            conn.sendall(response)

License

Licensed under the GPL, version 3.

Metadata

Release files for JsonRpcExtended 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for JsonRpcExtended 0.0.1
File Size Uploaded Provenance Actions
jsonrpcextended-0.0.1.tar.gz 30.3 kB Without provenance Details for jsonrpcextended-0.0.1.tar.gz

Release files / jsonrpcextended-0.0.1.tar.gz

Download URL jsonrpcextended-0.0.1.tar.gz
Size 30.3 kB
Tags Source
SHA-256 checksum
How to use checksums
16fbc401ea266a923d50e4fa7cf74424a39127fb8474b3384588372cf25a48ee
BLAKE2b-256 checksum
How to use checksums
51cdd7c884bd1cc657fdd285931091779bfc9cc0170bc47dc5807ced7666d047
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.2

Security for JsonRpcExtended 0.0.1

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.

Release history Release notifications | RSS feed

This release

0.0.1 This release

1 release file No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page