On this page
  1. uuid.getnode
  2. Import
  3. Signature & Overview
  4. Usage
  5. Gotchas
  6. REPL Inspect

uuid.getnode

Prev: uuid.Enum | Up: uuid | Next: uuid.int_
Rel: uuid.bytes_, uuid.Enum, uuid.int_, uuid.main
Ref: docs.python.org — uuid.getnode
Tags: #public #python3 #stdlib #uuid


Import

import uuid
from uuid import getnode

Signature & Overview

uuid.getnode()

Get the hardware address as a 48-bit positive integer.

Usage

import uuid

node = uuid.getnode()
assert isinstance(node, int) and 0 <= node < (1 << 48)

Gotchas

REPL Inspect

from uuid import getnode
help(getnode)

Linked from

Related notes