Is it acceptable for you to implement a C++ parser that plugs to python dataloader? If so, look at  How to use dataset larger than memory? 8. The ChunkDataset API might help you and there is python bindings on the way