Package dependency lists

I am working on the website for LightGraphs, and I would like to embed a list of packages that use LightGraphs as a dependency. This post from @IanNZ http://iaindunning.com/blog/pkg-deps.html looks like a good example.

Is there a way to collect that information automatically?

I guess I could pull this out from the github API
https://github.com/JuliaLang/METADATA.jl/search?utf8=✓&q=LightGraphs. Does anyone already have this in a database somewhere?

1 Like

If you checkout the branch packagedb in the Query.jl package, you can use the following code:

using Query

@from p in pkgdb() begin
    @where any(q->q.name=="LightGraphs", last(p.versions).requires)
    @select p.name
    @collect
end
1 Like

Thanks! Query.jl is awesome :+1: