Python UUID Module

Source: Internet
Author: User

 

Uuid-universal Unique identifier, universal unique identifier

Application Scenarios:

Unique flag for an object

The main functions that the module contains are:

    • UUID1 ([node[, Clock_seq]])-timestamp-based

    • UUID3 ()-MD5 hash value based on the name

    • Uuid4 ()-based on random numbers

    • Uuid5 (namespace, name)-SHA-1 hash value based on the name

NOTE

When node is not specified, use the system's own getnode function to get

Namespace can be viewed via dir (UUID)

The UUID module provides a UUID class, but is seldom used

1 Import UUID 2 3 uuid.uuid1 () 4 Uuid.uuid4 () 5 6 uuid.uuid3 (UUID. Namespace_dns,'python.org')7 uuid.uuid5 (UUID. Namespace_dns,'python.org')

Python UUID Module

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.