There are many choices for your application which are as follows:
NetworkX can be used for making your application in a Python package for the creation, manipulation, and the study of the structure, dynamics, and functions of complex networks.
Igraph is a collection of network analysis tools with the emphasis on efficiency, portability and ease of use. igraph is open source and free. igraph can be programmed in R, Python, Mathematica and C/C++.