sungchun12 / fst

fst: flow state tool | smooth where you want it, friction where you need it when data engineering
https://www.loom.com/share/ecfbdfb981e4443d94d2c95f16176118
Apache License 2.0
32 stars 1 forks source link

Feature/ai-utilities #18

Open sungchun12 opened 1 year ago

sungchun12 commented 1 year ago

This code needs to work in marvin's init.py

from importlib.metadata import version as _get_version

# load nest_asyncio
import nest_asyncio as _nest_asyncio
import asyncio as _asyncio

import threading

import asyncio as _asyncio

import threading

if threading.current_thread() == threading.main_thread():
    _nest_asyncio.apply()
else:
    _asyncio.set_event_loop(_asyncio.new_event_loop())
    _nest_asyncio.apply()