python引入雪花算法模块

2022-07-13 20:17:55 浏览数 (1)

pip安装

pip3 install pysnowflake

启动服务

snowflake_start_server

调用算法

代码语言:javascript复制
import snowflake.client
def get_snowflake_uuid():
    guid = snowflake.client.get_guid()
    return guid
get_snowflake_uuid()

0 人点赞