How to use Python script to generate many lines in Blender and then animate line color and thickness?
You can do this easily with Animation Nodes. 

For connections we need initial locations and final locations, So I'm using planes i.e vertices location but you can choose anything (Sphere/Cube mesh, number of objects etc). Now, to connect each vertices a plane (say A) to all vertices of a plane (say B), I have made two "Subprogram Loop" Nodes which basically make individual sets of vector lists. Then using using "Spline from points" node make the connections from those vector lists. In the "Curve Object Output" node, you can animate any parameter (Bevel depth, Bevel Start, Bevel End etc) of a curve.

Here is, examples with two, three planes and with a icosphere, but you can add any number planes (or other mesh object). To make more complex and control connections, you can also use other nodes like "KD Tree" and "BVH Tree" which are available in Animation Nodes.

:)

Here is Node Tree:-



Here, for two planes and subdividing them:


For three planes, so on:


For different type of objects: