I intended kfxlib to work outside of calibre, but it hasn't been fully tested that way. The basic method of converting KFX to EPUB would be something like:
Code:
import logging
from kfxlib import YJ_Book
book = YJ_Book(kfx_file, logging)
epub_data = book.convert_to_epub()