10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-12-26 06:14:38 +01:00
QUESTDB_website/tools/lib/formats/getFormatHandlers.py

12 lines
365 B
Python

import inspect
import sys
from . import default
from . import formatHandlerBase
def getFormatHandlers(includeUnnamed=False):
for clsName,Cls in inspect.getmembers(default,inspect.isclass):
if issubclass(Cls,formatHandlerBase):
if hasattr(Cls,"__formatName__"):
yield (Cls.__formatName__,Cls)
elif(includeUnnamed):
yield (None,Cls)