skillfed

gemfileparser2

Parse Ruby Gemfile, .gemspec and Cocoapod .podspec files using Python.

gemfileparser2 v0.9.4 123.0K downloads/30d#11,925 on PyPI2
Copyleft license GPL-3.0-or-later OR MIT DORMANT released

What it is and what it does

gemfileparser2 is a Python library that reads and parses Ruby dependency manifests—Gemfiles, .gemspec files, and Cocoapod .podspec files—extracting structured dependency information. It returns a dictionary keyed by dependency group (development, runtime, etc.), with each dependency represented as an object containing name, version requirement, source URL, parent gem, and group membership. The package has no external runtime dependencies, making it lightweight to integrate into Python tooling that needs to analyze Ruby project metadata.

This is a maintained fork of an inactive upstream project. It targets developers building dependency analysis tools, supply-chain auditing systems, or polyglot build orchestration that must understand Ruby project structure from a Python environment. The library supports current Python versions (3.7+) and is classified as Production/Stable, though the repository shows dormant maintenance—no releases since August 2024.

Use it for:

  • Audit Ruby project dependencies as part of a Python-based supply-chain security scanner
  • Extract gem versions from Gemfiles to populate a dependency inventory or bill-of-materials
  • Build a polyglot dependency resolver that handles both Python and Ruby projects
  • Parse .podspec files to analyze Cocoapod dependencies in a unified Python workflow
  • Validate Gemfile syntax and dependency structure in CI/CD pipelines written in Python

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Parses Ruby Gemfiles, .gemspec files, and Cocoapod .podspec files from Python, extracting dependency information organized by group.

Yes, if you need to parse Ruby dependency files from Python and accept dormant maintenance. The package is lightweight (no runtime deps), dual-licensed flexibly, and stable enough for production use. However, verify that it handles your target Ruby syntax versions and that dormancy (last release August 2024, last commit September 2024) does not signal abandonment risk for your use case.

Install

gemfileparser2 on PyPI

pip

pip install gemfileparser2

uv

uv add gemfileparser2

poetry

poetry add gemfileparser2

Installing gemfileparser2

Before you install

Low friction install with no runtime dependencies. Maintenance is dormant—last release was 2024-08-21 and last commit 2024-09-16, but the repository is not archived and the package is marked Production/Stable.

License in practice

Dual-licensed under GPL-3.0-or-later or MIT at your choice. The license is copyleft; derivative works should respect the GPL-3+ license, though MIT is available as an alternative.

Quickstart

from gemfileparser2 import GemfileParser
parser = GemfileParser('Gemfile', 'project_name')
deps = parser.parse()
for group, dependencies in deps.items():
    for dep in dependencies:
        print(dep.name, dep.requirement)

Requires Python >= 3.7

Verify before relying

  • Whether the fork remains actively maintained or if dormancy signals end-of-life risk
  • Compatibility with recent Ruby versions and Gemfile syntax changes
  • Performance characteristics on large or complex Gemfiles

Package facts

License GPL-3.0-or-later OR MIT (copyleft)
Python support supports the current Python release (>=3.7)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance dormant — 723 days since the last release
Last repo commit
First released
Downloads 123,024/month — #11,925 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: gemfileparser2-0.9.4-py3-none-any.whl

Keywords: Ruby, Rubygem, Gemfile, gemspec, Cocoapod, podspec

Development Status :: 5 - Production/StableIntended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyTopic :: Software DevelopmentTopic :: Utilities

Tags

parse ruby gemfile pythongemfile dependency parserruby gem parsergemspec parsercocoapod podspec parserruby dependency extractorgemfile analysis
ruby-interopdependency-parsingpolyglot-tooling

More Software Development packages