# red-data-tools/pycall.rb

Calling Python functions from the Ruby language

Repository: https://github.com/red-data-tools/pycall.rb
Canonical: https://ross.abutalabs.com/products/pycallrb
Language: C
License: MIT
License Family: permissive
Topics: ruby, pycall, data-science, python, rubydatascience, rubyml
Last push: 2026-08-21T05:59:51+00:00

## Health v2 (maintenance only)
Score: 87/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 98, release rhythm 66, longevity 100
- inputs: {"age_days": 3619, "days_push": 12, "days_rel": 12, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1116, forks 88 (observed 2026-08-28T04:03:38.791676+00:00)

## What it is
PyCall.rb is a Ruby library that lets Ruby code directly call Python functions and interoperate with Python modules via the CPython C API. It imports arbitrary Python modules into Ruby with automatic type conversion for numbers, strings, arrays, and hashes.

## Use cases
- call python functions from ruby
- use numpy or pandas in a ruby program
- run machine learning models from ruby
- import python modules into ruby
- bridge ruby and python codebases
- use python libraries for data science in ruby

## When to choose
- you need Python's ecosystem (numpy, pandas, scikit-learn) from Ruby code
- you want automatic type conversion between Ruby and Python objects
- you're building Ruby data-science or ML tooling on top of Python libraries

## When to avoid
- your workload is heavily multi-threaded - PyCall does not officially support multi-threaded use
- you need full bidirectional interop (calling Ruby from Python)
- you can't provide a Python shared library (e.g. default pyenv builds without --enable-shared)

## Facets
- artifact type: library
- maturity: active
- function: sdk, interpreter
- domain: data-science, machine-learning, developer-tools, programming-languages
- platform: ruby, python, windows
- tags: ruby-gem, python-interop, ffi, language-bridge, rubydatascience, linux, macos

## Member repositories
- red-data-tools/pycall.rb (main) score 87

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:38.791676+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:41:59.422018+00:00, confidence not recorded.
  - readme: https://github.com/red-data-tools/pycall.rb (fetched 2026-08-28T04:03:38.791676+00:00, sha cf9243cf8e54)
- Data as of 2026-08-30T08:39:29.467469+00:00.
