Source code:Lib/uuid.py
This module provides immutable UUID
objects (the UUID
class)and the functions uuid1()
, uuid3()
, uuid4()
, uuid5()
forgenerating version 1, 3, 4, and 5 UUIDs as specified in RFC 4122.
If all you want is a unique ID, you should probably call uuid1()
oruuid4()
. Note that uuid1()
may compromise privacy since it createsa UUID containing the computer’s network address. uuid4()
creates arandom UUID.
Depending on support from the underlying platform, uuid1()
may or maynot return a “safe” UUID. A safe UUID is one which is generated usingsynchronization methods that ensure no two processes can obtain the sameUUID. All instances of UUID
have an is_safe
attributewhich relays any information about the UUID’s safety, using this enumeration:
uuid.
SafeUUID
¶safe
¶The UUID was generated by the platform in a multiprocessing-safe way.
Download Jamulus - Internet Jam Session Software for free. Play music online. Jamulus is for playing, rehearsing, or just jamming with your friends, your band or just anyone you find online. Use your Windows, macOS or Linux machine to connect to Jamulus servers worldwide, for free over a normal broadband connection. Unity is the ultimate game development platform. Use Unity to build high-quality 3D and 2D games, deploy them across mobile, desktop, VR/AR, consoles or the Web, and connect with loyal and enthusiastic players and customers. Python 3.5.5 was released on February 4th, 2018. Python 3.5 has now entered 'security fixes only' mode, and as such the only improvements between Python 3.5.4 and Python 3.5.5 are security fixes. Also, Python 3.5.5 has only been released in source code form; no.
Download the latest version of PyCharm for Windows, macOS or Linux. PyCharm Coming in 2020.3 What's New Features Learning Center Buy Download. 7 Oct, 2020 Simple Suduko Game in Python - 1.0 7 Oct, 2020 Rock Paper Scissors Game with python - 1.0 6 Oct, 2020 'Alphabet Zoo' A typing game in Python - 1.0 5 Oct, 2020 Shifting Edge - 1.0 4 Oct, 2020 Simple Memory Card Game with sound effects - 0.1 2 Oct, 2020 Pygame - Buttons! - 1.00 2 Oct, 2020 Python DOOM - v.1.0.1 2 Oct, 2020 Sorting Algorithms Visualizer - 1.0 30 Sep, 2020 Pygame menu. UTorrent is a leading BitTorrent client preferred around the world for downloading music, movies, and other content. A popular P2P file sharing platform, this torrent software is lightweight, easy to use, fast, and efficient.Most importantly, since uTorrent download is available for Windows, Mac, and Android, it offers cross-platform synchronisation. UTorrent comes with all the features of a. Python 3.2 free download - Python 3.2 for iOS, Python, Python, and many more programs.
unsafe
¶The UUID was not generated in a multiprocessing-safe way.
unknown
¶The platform does not provide information on whether the UUID wasgenerated safely or not.
uuid.
UUID
(hex=None, bytes=None, bytes_le=None, fields=None, int=None, version=None, *, is_safe=SafeUUID.unknown)¶Create a UUID from either a string of 32 hexadecimal digits, a string of 16bytes in big-endian order as the bytes argument, a string of 16 bytes inlittle-endian order as the bytes_le argument, a tuple of six integers(32-bit time_low, 16-bit time_mid, 16-bit time_hi_version,8-bit clock_seq_hi_variant, 8-bit clock_seq_low, 48-bit node) as thefields argument, or a single 128-bit integer as the int argument.When a string of hex digits is given, curly braces, hyphens,and a URN prefix are all optional. For example, theseexpressions all yield the same UUID:
Exactly one of hex, bytes, bytes_le, fields, or int must be given.The version argument is optional; if given, the resulting UUID will have itsvariant and version number set according to RFC 4122, overriding bits in thegiven hex, bytes, bytes_le, fields, or int.
Comparison of UUID objects are made by way of comparing theirUUID.int
attributes. Comparison with a non-UUID objectraises a TypeError
.
str(uuid)
returns a string in the form12345678-1234-5678-1234-567812345678
where the 32 hexadecimal digitsrepresent the UUID.
UUID
instances have these read-only attributes:
UUID.
bytes
¶The UUID as a 16-byte string (containing the six integer fields in big-endianbyte order).
UUID.
bytes_le
¶The UUID as a 16-byte string (with time_low, time_mid, and time_hi_versionin little-endian byte order).
UUID.
fields
¶A tuple of the six integer fields of the UUID, which are also available as sixindividual attributes and two derived attributes:
Field | Meaning |
---|---|
| the first 32 bits of the UUID |
| the next 16 bits of the UUID |
| the next 16 bits of the UUID |
| the next 8 bits of the UUID |
| the next 8 bits of the UUID |
| the last 48 bits of the UUID |
the 60-bit timestamp | |
| the 14-bit sequence number |
UUID.
hex
¶The UUID as a 32-character hexadecimal string.
Python 3.6.5 Download
UUID.
int
¶The UUID as a 128-bit integer.
UUID.
urn
¶The UUID as a URN as specified in RFC 4122.
UUID.
variant
¶The UUID variant, which determines the internal layout of the UUID. This will beone of the constants RESERVED_NCS
, RFC_4122
,RESERVED_MICROSOFT
, or RESERVED_FUTURE
.
UUID.
version
¶The UUID version number (1 through 5, meaningful only when the variant isRFC_4122
).
UUID.
is_safe
¶Python 3.8 Mac
An enumeration of SafeUUID
which indicates whether the platformgenerated the UUID in a multiprocessing-safe way.
New in version 3.7.
The uuid
module defines the following functions:
uuid.
getnode
()¶Get the hardware address as a 48-bit positive integer. The first time thisruns, it may launch a separate program, which could be quite slow. If allattempts to obtain the hardware address fail, we choose a random 48-bitnumber with the multicast bit (least significant bit of the first octet)set to 1 as recommended in RFC 4122. “Hardware address” means the MACaddress of a network interface. On a machine with multiple networkinterfaces, universally administered MAC addresses (i.e. where the secondleast significant bit of the first octet is unset) will be preferred overlocally administered MAC addresses, but with no other ordering guarantees.
Changed in version 3.7: Universally administered MAC addresses are preferred over locallyadministered MAC addresses, since the former are guaranteed to beglobally unique, while the latter are not.
uuid.
uuid1
(node=None, clock_seq=None)¶Generate a UUID from a host ID, sequence number, and the current time. If nodeis not given, getnode()
is used to obtain the hardware address. Ifclock_seq is given, it is used as the sequence number; otherwise a random14-bit sequence number is chosen.
uuid.
uuid3
(namespace, name)¶Generate a UUID based on the MD5 hash of a namespace identifier (which is aUUID) and a name (which is a string).
uuid.
uuid4
()¶Generate a random UUID.
uuid.
uuid5
(namespace, name)¶Generate a UUID based on the SHA-1 hash of a namespace identifier (which is aUUID) and a name (which is a string).
The uuid
module defines the following namespace identifiers for use withuuid3()
or uuid5()
.
uuid.
NAMESPACE_DNS
¶When this namespace is specified, the name string is a fully-qualified domainname.
uuid.
NAMESPACE_URL
¶When this namespace is specified, the name string is a URL.
uuid.
NAMESPACE_OID
¶When this namespace is specified, the name string is an ISO OID.
uuid.
NAMESPACE_X500
¶When this namespace is specified, the name string is an X.500 DN in DER or atext output format.
The uuid
module defines the following constants for the possible valuesof the variant
attribute:
uuid.
RESERVED_NCS
¶Reserved for NCS compatibility.
uuid.
RFC_4122
¶Specifies the UUID layout given in RFC 4122.
uuid.
RESERVED_MICROSOFT
¶Reserved for Microsoft compatibility.
uuid.
RESERVED_FUTURE
¶Reserved for future definition.
See also
This specification defines a Uniform Resource Name namespace for UUIDs, theinternal format of UUIDs, and methods of generating UUIDs.
Example¶
Here are some examples of typical usage of the uuid
module:
- Download
If your download is not starting, click here.
Thank you for downloading Python from our software portal
The contents of the download are original and were not modified in any way. The download version of Python is 3.9. The download was scanned for viruses by our system. We also recommend you to check the files before installation.
Python antivirus report
This download is virus-free.This file was last analysed by Free Download Manager Lib 4 days ago.
WebAdvisor
Often downloaded with
Python 3 Download Mac
- Python (x,y)Python(x,y) is a scientific-oriented Python Distribution based on Qt and Spyder...DOWNLOAD
- Python LauncherPython Launcher is an open-source program that allows Python scripts (.py and...DOWNLOAD
- Python - pyodbcPyodbc is a Python 2.x and 3.x module that allows you to use ODBC to connect to...DOWNLOAD
- Python cxOracle-5.1.3-11gcx_Oracle is a Python extension module that enables access to Oracle databases...DOWNLOAD
- Python pycairo-1.4.12Python pycairo 1.8.10 is a free script for use with Python 2.7 developed by The...DOWNLOAD