You can use the 'from_pydata(...)' function to create a mesh. This function accepts a list of vertices, a list of edges, and a list of faces.
The vertices should be formatted as a list of X,Y,Z triplets (defining each coordinate in space) while the 'edges' and 'faces' define which of those vertices are linked (by specifying the index in the list of vertices (with 0 being the first in the list, 1 the second, etc.)). Edges can be empty if you are defining just the Faces and similarly Faces can be empty if you are defining just the Edges).
To illustrate, the following example will create a new object (a skewed pyramid) with 4 vertices and 4 faces :
import bpy
bpy.ops.object.add(type='MESH', enter_editmode=False, location=(0,0,0))
o = bpy.context.object
o.name = 'myobject'
o.data.from_pydata([(0,0,0),(1,0,0),(0,1,0),(0,0,1)],[],[(0,1,2),(0,1,3),(1,2,3),(0,2,3)])
o.data.update()
The first argument to from_pydata ("[(0,0,0),(1,0,0),(0,1,0),(0,0,1)]") defines the 4 vertices in space while the last one ("[(0,1,2),(0,1,3),(1,2,3),(0,2,3)]") defines the faces (ie, the first one being between vertex 0, vertex 1 and vertex 2).
For your particular case you should be able to use your raw data to generate a set of vertices and then use the Edges argument to define the Edge between those vertices (ie, 0 to 1, 1 to 2, 2 to 3, etc. along the chain - ie, "[(0,1),(1,2),(2,3),...etc..."). Once created as edges you could then simply add a Skin modifier to convert it into a solid mesh.
See http://blenderscripting.blogspot.co.uk/2011/06/using-frompydata.html and https://wiki.blender.org/index.php/Dev:Py/Scripts/Cookbook/Code_snippets/Three_ways_to_create_objects for some further examples.