10
0
mirror of https://github.com/LCPQ/QUESTDB_website.git synced 2024-11-04 13:13:55 +01:00
QUESTDB_website/tools/lib/formats/getFormatHandlers.py

11 lines
356 B
Python
Raw Normal View History

2020-07-03 14:51:12 +02:00
import inspect
from . import formatHandlerBase
def getFormatHandlers(includeUnnamed=False):
2020-07-06 10:29:17 +02:00
from . import default
2020-07-03 14:51:12 +02:00
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)