Find a file
russell@unturf.com dee08976ef
ci: classic auth via group-scoped TWINE_USERNAME/TWINE_PASSWORD, v0.1.4
Trusted Publishing OIDC is blocked for git.unturf.com — PyPI's GitLab
provider hardcodes the issuer to gitlab.com (no self-hosted instance
field in the Add publisher form). Until PyPI lights up self-hosted
GitLab support, classic API token auth is our path.

Auth source: TWINE_USERNAME=__token__ + TWINE_PASSWORD=<pypi-...> set
as group-level CI variables on python/. Both python/ago and
python/erldistpy inherit them automatically; engineering/ group gets
the same vars for make-post-sell + remarkbox.

What this commit changes:
  - .gitlab-ci.yml pypi-twine stage drops the id_tokens block we
    briefly tried (OIDC), uses latest twine (no <6 pin) — twine 6
    reads TWINE_USERNAME/TWINE_PASSWORD env vars and prefers them
    over the OIDC attempt
  - pyproject.toml build-system requires drops the setuptools<77
    cap (latest setuptools emits Metadata-Version 2.4 which twine 6
    reads fine; locally verified)
  - docs/PYPI-TRUSTED-PUBLISHING.md updated to note the issuer-
    hardcoded blocker and the recipe to migrate later when it
    unblocks (or if we mirror to gitlab.com)
2026-06-16 15:01:23 -04:00
docs ci: classic auth via group-scoped TWINE_USERNAME/TWINE_PASSWORD, v0.1.4 2026-06-16 15:01:23 -04:00
erldistpy switch to Trusted Publishing OIDC, drop twine/setuptools pins, v0.1.4 2026-06-16 14:54:53 -04:00
tests etf: add MAP_EXT (tag 116) for Erlang/Elixir maps 2026-06-16 12:16:35 -04:00
.gitignore phase 6: TLS dist via inet_tls_dist 2026-06-16 12:06:07 -04:00
.gitlab-ci.yml ci: classic auth via group-scoped TWINE_USERNAME/TWINE_PASSWORD, v0.1.4 2026-06-16 15:01:23 -04:00
LICENSE phase 0 + 1: repo bones and ETF codec 2026-06-16 10:39:01 -04:00
Makefile packaging: ship to PyPI via tag + GitLab CI (mirrors ago's pattern) 2026-06-16 13:45:08 -04:00
pyproject.toml switch to Trusted Publishing OIDC, drop twine/setuptools pins, v0.1.4 2026-06-16 14:54:53 -04:00
README.md packaging: ship to PyPI via tag + GitLab CI (mirrors ago's pattern) 2026-06-16 13:45:08 -04:00

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_call to 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).