Skip to main content

jarexps

Setup a simple Open RPC server to export services from a jar file.

Install

pip install jarexps

Usage

Example config.yml

daemon: true
loglevel: INFO

server:
  listen: 0.0.0.0
  port: 1813

authentication:
  enable: true
  users:
    app01: sNKBMFEol0w8CWUCkgxpxlhzbHeHx264

jarexps:
  classpaths:
    - abs/path/to/bcprov-jdk15on-1.70.jar
  services:
    misc.base64.encode:
      klass: org.bouncycastle.util.encoders.Base64
      method: encode
    misc.base64.decode:
      klass: org.bouncycastle.util.encoders.Base64
      method: decode

orpc:
  handler:
    asio-writer-buffer-size: 4096

start server command

jarexpsd -c config.yml start

client tests

import os
import unittest
from orpc.client import OrpcClientPool


class TestJarexps(unittest.TestCase):
    def setUp(self):
        self.cp = OrpcClientPool(
            10,
            kwargs={
                "host": "localhost",
                "port": 1813,
                "username": "app01",
                "password": "sNKBMFEol0w8CWUCkgxpxlhzbHeHx264",
            },
        )

    def test1(self):
        data1 = b"hello world"
        data2 = self.cp.execute("misc.base64.encode", args=[data1])
        assert data2 == b"aGVsbG8gd29ybGQ="

    def test2(self):
        data1 = os.urandom(1024)
        data2 = self.cp.execute("misc.base64.encode", args=[data1])
        data3 = self.cp.execute("misc.base64.decode", args=[data2])
        assert data1 == data3

Releases

v0.1.25

  • First release.

v0.1.26

  • Doc update.

Metadata

Release files for jarexps 0.1.26

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

Source distribution (sdist)

Source distribution for jarexps 0.1.26
File Size Uploaded Provenance Actions
jarexps-0.1.26.tar.gz 5.7 kB Without provenance Details for jarexps-0.1.26.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for jarexps 0.1.26
File Interpreter ABI Platform Actions
jarexps-0.1.26-py3-none-any.whl Python 3 none any Details for jarexps-0.1.26-py3-none-any.whl

Total release size: 11.5 kB

Release files / jarexps-0.1.26.tar.gz

Download URL jarexps-0.1.26.tar.gz
Size 5.7 kB
Tags Source
SHA-256 checksum
How to use checksums
f859bfce867e9c45e5a85343c8f5cf551c1e0724f67b31653b3cba3ada3d6ecc
BLAKE2b-256 checksum
How to use checksums
fa1227149882b3c682a8319fd18203a747759ea505394cebbcf56de029745ca8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / jarexps-0.1.26-py3-none-any.whl

Download URL jarexps-0.1.26-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c216cca916e723ed211012f51f9e926cee2fc6b389aad4119e50ae1fac002fa6
BLAKE2b-256 checksum
How to use checksums
c11009bd1f759691c51b38d2a20e45e729d7c7a5fa44aaac32211abb310ed263
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Security for jarexps 0.1.26

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.1.26 This release

2 release files 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