Elixir Wizards

Python in Elixir Apps with Victor Björklund

Jul 31, 2025
Victor Björklund, an Elixir developer at jawdropping.io, shares insights on integrating Python into Elixir applications. He discusses various integration methods like HTTP APIs and ErlPort while weighing trade-offs in performance and coupling. Real-world examples include web scraping with Scrapy and Swedish BankID authentication. Victor also covers error handling strategies, testing challenges, and the practicalities of packaging Python dependencies for deployment. He concludes with a wishlist for improved interoperability and suggests low-risk entry points for teams eager to harness Python's capabilities in Elixir.
Ask episode
AI Snips
Chapters
Transcript
Episode notes
INSIGHT

Choose Integration By Coupling Spectrum

  • Integration methods form a coupling spectrum from independent HTTP services to embedded interpreters and Erlang-node approaches.
  • Choose integration by weighing coupling, performance, and deployment complexity.
ADVICE

Use PythonX Only When Single Interpreter Is Acceptable

  • Consider PythonX for speed when you can tolerate a single embedded interpreter instance.
  • Beware that embedding can bring GIL bottlenecks and risk taking down the BEAM if Python crashes.
ADVICE

Pool Python Processes For Frequent Calls

  • Pool Python processes when calls are frequent to avoid start/stop overhead.
  • Use libraries like Poolboy or Venomous to manage pools and error cleanup for ports.
Get the Snipd Podcast app to discover more snips from this episode
Get the app