Native Python client for Erlang distribution protocol — EPMD + v6 handshake + gen_server call(), no asyncio.
Project description
erldistpy
Native Python client for our Erlang distribution protocol. Talk Erlang/Elixir nodes from CPython without HTTP shim layers.
Built to swap into Python web apps as a drop-in for HTTP wallet-bridge
clients (see unfeed's
WalletTransport and make_post_sell's crypto watcher) so they can call
Elixir gen_server processes over native Erlang dist instead of JSON-RPC
or HTTPS. Same call semantics, lower latency, fewer moving parts.
Install
pip install erldistpy
Quick start
from erldistpy import Node, Atom
with Node(
our_name="myapp@host",
peer_name="wallet", # short EPMD name
peer_host="wallet.example.com",
cookie="SHARED_COOKIE", # read from a file path, never inline
) as node:
reply = node.call(
"Elixir.Wallet.Service",
(Atom("monero"), Atom("get_height"), []),
timeout=5.0,
)
# reply is whatever the gen_server returned — atoms / binaries /
# tuples / maps / lists / pids / refs decode to Python natives.
For TLS dist (Erlang inet_tls_dist):
from erldistpy import Node, make_dist_tls_context
ctx = make_dist_tls_context(
cert="/etc/myapp/client.pem",
key="/etc/myapp/client.key",
ca="/etc/myapp/ca.pem",
)
node = Node(our_name=..., peer_name=..., cookie=..., tls_context=ctx)
Scope
- ETF (External Term Format) codec — encode/decode Erlang terms
- EPMD client — node name → port lookup
- v6 distribution handshake — MD5 cookie auth, version negotiation
gen_callto registered processes on a remote node- TLS dist support (Erlang
inet_tls_dist)
Out of scope: full Erlang node impersonation, link/monitor lifecycles, distributed Mnesia. We are a client, not a peer node.
Why not Pyrlang?
Pyrlang implements a full asyncio Erlang node. Heavy, asyncio-first,
complex. erldistpy is a small synchronous client that fits behind the
same Protocol surface as httpx. Different shape, different audience.
Development
make bootstrap # create venv, install editable + dev deps
make test # run pytest (122 tests)
make lint # ruff check
make build # build sdist + wheel into dist/
make dist-check # twine check dist/*
See docs/ROADMAP.md for the phase-by-phase build log.
License
Unlicense (public domain).
Project details
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file erldistpy-0.1.6.tar.gz.
File metadata
- Download URL: erldistpy-0.1.6.tar.gz
- Upload date:
- Size: 27.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
56342fe75f52abb2495c94d2d1e183bf9c5daee3fad8060edf05b7151d6b448e
|
|
| MD5 |
6a2bb5ecfdb45cde1deb1a27a7c14669
|
|
| BLAKE2b-256 |
368a2c114ec0f1b0c82e68a1991f57288857974d0c64ab32e93af8db9a9865b2
|
File details
Details for the file erldistpy-0.1.6-py3-none-any.whl.
File metadata
- Download URL: erldistpy-0.1.6-py3-none-any.whl
- Upload date:
- Size: 18.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dd0deed2634ed4911ea57711c39437a03c8dac6cb6fc4a3635bc867701f92f38
|
|
| MD5 |
0899d59cafd54c17e5899da3f48189e5
|
|
| BLAKE2b-256 |
1bc2f1c15e5d66f2e3aadb834f0222ae8fba205412c83cc520be88bf72446edc
|