This library is getting the version number and locked/protected status from file generated by Rockwell Software FactoryTalk View.
Right now it can get the version number from MER and APA files generated by FactoryTalk View ME, as well as tell you if they are locked, and strip the protection.
Note, while the technique is slightly different (internally), using the strip_protection function can allow a V4 MER to be re-imported as a project file. There may however be some limitations here. I have minial v4 files to test with (and none I can add into the test suite). One limitation I have noticed is that while the alarm triggers and states came through the alarm messages are all "?", so it appears the alarm messages are not directly recoverable.
I have been handed a version 3.20 MER file, it appears the technique to recover a v4 file does not work on it. I will see what can be done, but as of now MER files older than V4 are not recoverable.
It might work on APA files generated from FactoryTalk View SE, but I have not tested this or looked into it. At some point I plan on testing that, as well as adding some support for other Allen Bradley / Rockwell Software file formats, such as the newer APB files from FactoryTalk View SE.
For python bindings to this library look here