gemfileparser2
Parse Ruby Gemfile, .gemspec and Cocoapod .podspec files using Python.
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 gemfileparser2uv
uv add gemfileparser2poetry
poetry add gemfileparser2Installing 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
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
depgatherExtracts and lists dependencies from multiple…
permissive · top 15,000 on PyPI
tree-sitter-rubyProvides a Ruby language grammar for…
permissive · top 5,000 on PyPI
identifyIdentifies file types by examining file paths,…
permissive · top 1,000 on PyPI
python-gflagsParses command-line flags and arguments for…
permissive · top 15,000 on PyPI
pathspecMatches file paths against gitignore-style…
copyleft · top 100 on PyPI
greeneye_monitorParses and processes binary data packets from…
permissive · top 15,000 on PyPI
verspecverspec parses and compares software version…
permissive · top 5,000 on PyPI
tls-parserParses TLS records from binary data, extracting…
unclear · top 15,000 on PyPI
pysbdDetects sentence boundaries in text using…
permissive · top 5,000 on PyPI
requirements-parserParses pip requirement files into structured…
permissive · top 5,000 on PyPI