Just shipped 3.0.0 of erlang_python. It embeds CPython into the BEAM via dirty NIFs and lets you call Python from Erlang or Elixir with proper parallelism, async/await, and bidirectional callbacks.
What’s new:
-
Two public execution modes
-
worker(default): dedicated pthread per context, works with any Python version, stable thread affinity for numpy/torch/tensorflow -
owngil(Python 3.14+): dedicated pthread + subinterpreter with its own GIL, true N-way parallelism -
py:async_call/3,4,py:async_gather/1,2,py:parallel/1all work end-to-end now -
Free-threaded Python 3.13t works automatically in worker mode
Fixed:
-
Issue #63: thread-callback flake on FreeBSD 14 / Python 3.12 (six layered defects in the erlang.call plumbing, now resolved)
-
py:async_call/py:async_awaitround-trip used to silently time out
Removed (breaking, see migration guide):
-
Public
py:subinterp_*handle API; usepy_context:start_link(N, owngil)instead -
py:num_executors/0,py:async_stream/3,4, themulti_executorandfree_threadedmode atoms -
num_executorsandnum_async_workersconfig keys
Docs: erlang_python v3.0.0 — Documentation
Release: Release 3.0.0 · benoitc/erlang-python · GitHub
Happy to hear what people are doing with it.