RFC: Run Python from Ruby and Ruby from Python

This page summarizes the projects mentioned and recommended in the original post on /r/ruby

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • pycall.rb

    Calling Python functions from the Ruby language

  • Yeah, I know there are few libraries that do similar things: pycall.rb and rb_call, and there is also rubypython, but it's not supported and doesn't work with Python 3. I used pycall to create matplotlib charts from Ruby, it's great, and I'm gonna use part of its code, type conversion implementation, for example. But I don't think it's enough, it's like a one way bridge, I want more, I want to call Python from Ruby and Ruby from Python at the same time: create an Airfow PythonOperator, invoke Ruby code inside, store some value into XCom. What about rb_call, I don't like how it's implemented at all, it starts a separate process and serializes data using MessagePack RPC, so you can't use callbacks. It's not even possible to pass a Python object as an argument or call Ruby method that requires a block. And of course it's not effective.

  • rb_call

    Call Ruby methods from Python

  • Yeah, I know there are few libraries that do similar things: pycall.rb and rb_call, and there is also rubypython, but it's not supported and doesn't work with Python 3. I used pycall to create matplotlib charts from Ruby, it's great, and I'm gonna use part of its code, type conversion implementation, for example. But I don't think it's enough, it's like a one way bridge, I want more, I want to call Python from Ruby and Ruby from Python at the same time: create an Airfow PythonOperator, invoke Ruby code inside, store some value into XCom. What about rb_call, I don't like how it's implemented at all, it starts a separate process and serializes data using MessagePack RPC, so you can't use callbacks. It's not even possible to pass a Python object as an argument or call Ruby method that requires a block. And of course it's not effective.

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
  • rubypython

    An in-process between Ruby and Python. Soon changing repo address.

  • Yeah, I know there are few libraries that do similar things: pycall.rb and rb_call, and there is also rubypython, but it's not supported and doesn't work with Python 3. I used pycall to create matplotlib charts from Ruby, it's great, and I'm gonna use part of its code, type conversion implementation, for example. But I don't think it's enough, it's like a one way bridge, I want more, I want to call Python from Ruby and Ruby from Python at the same time: create an Airfow PythonOperator, invoke Ruby code inside, store some value into XCom. What about rb_call, I don't like how it's implemented at all, it starts a separate process and serializes data using MessagePack RPC, so you can't use callbacks. It's not even possible to pass a Python object as an argument or call Ruby method that requires a block. And of course it's not effective.

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts