Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

A python interface for decompressing Boldi-Vigna graphs

Project description

This library implements a decoder for a Boldi-Vigna graph structure, a highly compressed means of storing web-graphs. The library is written in pure C. It includes a Python interface, and a means to implement multi-threaded graph algorithms.


  • In-memory and on-disk graph storage
  • Sequential iteration over graph edges
  • Parallel iteration over graph edges
  • random access to graph edges


1.1 Install with pip:

pip install pylibbvg

1.2 Uninstall:

pip uninstall pylibbvg

2.1. Compile from the source code(Cython is assumed to have installed):

python build_ext --inplace

2.2. To clean the library:

python clean


To use the library in Python code:

import bvg
G = bvg.BVGraph('wb-cs.stanford', 0) # sequential scan
print 'nodes = ' + str(G.nverts)
print 'edges = ' + str(G.nedges)
edges_and_degrees = G.edges_and_degrees()
for (src, dst, degree) in edges_and_degrees:
    print 'node ' + str(src) + ' has degree ' + str(degree)
    print 'edge: ' + str(src) + ' -> ' + str(dst)


GPL version 2.

Copyright by David F. Gleich, 2007-2014

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 pylibbvg, version 2.0.25
Filename, size File type Python version Upload date Hashes
Filename, size pylibbvg-2.0.25.tar.gz (148.3 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page