# update: 2021-6-28-19
import uuid


def is_uuid4(string):
    """验证uuid4"""
    try:
        uuid.UUID(string, version=4)
        return True
    except ValueError:
        return False


def new_uuid4():
    """生成uuid4"""
    return str(uuid.uuid4())