re 模糊匹配
USER_REGULATION = [
{"method": ["GET", "PUT", "POST"], "pattern": "store/.*/pictures"},
{"method": ["GET", "PUT", "POST"], "pattern": "users/.*"},
]
list = []
def text():
for item in USER_REGULATION:
regex = re.compile(item["pattern"])
match = regex.search(path_url)
if match:
list.append(item)