Skip to content

Commit

Permalink
add some libs into _GLOBALS_ARGS for udf parser
Browse files Browse the repository at this point in the history
  • Loading branch information
ClericPy committed May 2, 2020
1 parent 6d27010 commit d66c6a2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions watchdogs/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def setup_models():

async def setup_uniparser():
import re
import datetime
import math
import random
from torequests.utils import (curlparse, escape, guess_interval,
itertools_chain, json, parse_qs, parse_qsl,
ptime, quote, quote_plus, slice_by_size,
Expand All @@ -93,7 +96,10 @@ async def setup_uniparser():
import uniparser.fastapi_ui
UDFParser._GLOBALS_ARGS.update({
're': re,
'datetime': datetime,
'curlparse': curlparse,
'math': math,
'random': random,
'escape': escape,
'guess_interval': guess_interval,
'itertools_chain': itertools_chain,
Expand Down

0 comments on commit d66c6a2

Please sign in to comment.