Skip to main content

Parse Ruby's Gemfiles

Project description


If using pip, use the command sudo pip install gemfileparser
Else use the following commands
git clone
cd gemfileparser
python install


from gemfileparser import GemfileParser
parser = GemfileParser(<path to Gemfile>, <name of the application (optional)>)
dependency_dictionary = parser.parse()

The parse() method returns a dict object of the following format

'development': [list of dependency objects inside group 'development'],
'runtime': [list of runtime dependency objects],

Each dependency object contains the following attributes

name - Name of the gem
requirement - Version requirement
autorequire - Autorequire value
source - Source URL of the gem
parent - Dependency of which gem
group - Group in which gem is a member of (default : runtime)


from gemfileparser import GemfileParser
n = GemfileParser('Gemfile', 'diaspora')
deps = n.parse()
for key in deps:
   if deps[key]:
       print key
       for dependency in deps[key]:
           print "  ", dependency


gemfileparser is released under GNU GPL version 3 (or above) License.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gemfileparser, version 0.6.2
Filename, size File type Python version Upload date Hashes
Filename, size gemfileparser-0.6.2.tar.gz (4.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page