ArchiveConverter

Attention

This is a preliminary API and may be improved based on user feedback. It is currently available in C++ and Python. This functionality is only available in the Python toolkits.

class ArchiveConverter

ArchiveConverter is an iterator class which converts tarball or zip files into OERecord. This class provides the best-suited converter iterator for each file in the compressed file as it iterates. This prvoides the utility of combining multiple datasets with the same OERecord setup into one large OERecord or creating multiple OERecord for each file in the compressed file.

Constructors

ArchiveConverter(path: str)
1from openeye import oechem, oesaiph
2
3path = "path_to_file.zip"
4for convs in ArchiveConverter(path):
5   # provides the best-suited converter iterator
6
7   for rec in convs:
8      # iterates through each record in the file found in the compressed file