使用版本4:uuid4就可以了

UUID4缺点:糟糕的随机数发生器使得它更有可能发生碰撞,但是概率真的很小

UUID1缺点:暴露隐私

If all you want is a unique ID, you should probably call uuid1() or uuid4(). Note that uuid1() may compromise privacy since it creates a UUID containing the computer’s network address. uuid4()creates a random UUID.

参考:https://docs.python.org/3.8/library/uuid.html

https://pythoncaff.com/docs/pymotw/uuid-universally-unique-identifiers/156

python模块uuid产生唯一id的更多相关文章

  1. 【Python】 uuid生成唯一ID

    uuid uuid是128位的全局唯一标识符(univeral unique identifier),通常用32位的一个字符串的形式来表现.有时也称guid(global unique identif ...

  2. python使用uuid生成唯一id或str

    介绍: UUID是128位的全局唯一标识符,通常由32字节的字符串表示. 使用: import uuid print uuid.uuid1() 14bfe806-f1c7-11e6-83b5-0680 ...

  3. python学习之-- 生成唯一ID

    以下以2种方法生成唯一ID def uuid_method(): """第一种方法""" import uuid return str(uu ...

  4. Python之uuid模块

    UUID是128位的全局唯一标识符,通常由32字节的字符串表示. 它可以保证时间和空间的唯一性,也称为GUID,全称为: UUID —— Universally Unique IDentifier P ...

  5. 利用Java.util.UUID来生成唯一ID(用来做数据库主键好用)

    UUID(Universally Unique Identifier)全局唯一标识符,是指在一台机器上生成的数字,它保证对在同一时空中的所有机器都是唯一的.按照开放软件基金会(OSF)制定的标准计算, ...

  6. python模块:网络协议和支持

    python模块:网络协议和支持 webbrowser 调用浏览器显示html文件 webbrowser.open('map.html') [webbrowser - Convenient Web-b ...

  7. Python模块学习

    6. Modules If you quit from the Python interpreter and enter it again, the definitions you have made ...

  8. java生成UUID通用唯一识别码 (Universally Unique Identifier)

    转自:http://blog.csdn.net/carefree31441/article/details/3998553 UUID含义是通用唯一识别码 (Universally Unique Ide ...

  9. (转)java生成UUID通用唯一识别码 (Universally Unique Identifier)

    (原文链接:http://blog.csdn.net/carefree31441/article/details/3998553)   UUID含义是通用唯一识别码 (Universally Uniq ...

随机推荐

  1. Ubuntu 18.04 上设置桌面程序开机自启动

    需求 在新安装的 Ubuntu 18.04 系统上,将有些不可描述的程序开机之后自动启动 Startup Applications Preferences 打开 Startup Application ...

  2. Redis整体

    介绍 Redis是一个开源的高性能的key-value存储系统.具有以下特点: 1.Redis支持数据的持久化,可以将内存中的数据保持在磁盘中,重启的时候可以再次加载进行使用. 2.Redis不仅仅支 ...

  3. Javascript版经典游戏之《扫雷》

    翻出年初写的游戏贴上来,扫雷相信大家都玩过,先上图: 源码: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN ...

  4. jQuery漏掉的东西

    prop和attr的区别 attr一般都用来设置和操作元素的自定义属性的,而prop一般都是操作元素的内置属性的(尤其是表单元素的操作我们大部分都在使用prop) each 可以遍历jQuery集合中 ...

  5. 【BZOJ-3730】震波 动态点分治 + 树状数组

    3730: 震波 Time Limit: 15 Sec  Memory Limit: 256 MBSubmit: 626  Solved: 149[Submit][Status][Discuss] D ...

  6. 39、ABTestingGateway

    2015 年度新增开源软件排名 TOP 100 - 开源中国社区   http://www.oschina.net/news/69808/2015-annual-ranking-top-100-new ...

  7. Microsoft实现的IOC DI之 Unity 、Service Locator、MEF

    这几个工具的站点 Microsoft Unity  http://unity.codeplex.com Service Locator http://commonservicelocator.code ...

  8. JTAG - General description of the TAP Controller states

    A transition between the states only occurs on the rising edge of TCK, and each state has a differen ...

  9. Entity framework 增加默认执行时间

    public partial class ProductionSupportEntities : DbContext { public ProductionSupportEntities() : ba ...

  10. 教程:如何手动安装Xamarin与Xamarin for VisualStudio

    [2016/4/17更新:如果你下载后发现仍然需要付费才能编译Android/iOS APP,请到文章最下面更新Xamarin for VS和Xamarin Studio到最新的版本.Build201 ...