Snex 0.4.1 is out now!
This release introduces an eager asyncio loop improvement discussed on the Python forum. This brings the end-to-end latency of a simple Snex.pyeval down to 28 μs on CPython, 20 μs on PyPy - closing in on NIF-based integrations. For comparison, an equivalent Pythonx.eval+decode is ~6.5 μs[1].
I also revamped the Highlights section of README.md to better showcase what Snex is and can do. I’m putting it down below for a refresher.
Thanks!
Highlights
Robust & Isolated - Run any number of Python interpreters in separate OS processes, preventing GIL issues or blocking computations from affecting your Elixir application. You can call asyncio code, use PyPy instead of CPython, or even run Python in a Docker container!
Declarative Environments - Leverages uv to manage Python versions and dependencies, embedding them into your application’s release for consistent deployments. Supports custom Python environments and easy integration with Python projects.
Bidirectional communication - Powerful and efficient interface with explicit control over data. Python code running under Snex can send messages to BEAM processes and call Erlang/Elixir functions.
High quality, organic code - Every line of Snex is thought out and serves a purpose. Code is optimized to keep performance overhead low.
Forward Compatibility - Built on stable foundations independent of C-level interfaces, so future versions of Python and Elixir will work on day one!
https://github.com/kzemek/snex
in local serialized benchmarks on an M1 Macbook Pro. The latency story is completely different in concurrent usage, where
Pythonxgets blocked on GIL. ↩︎


















