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

ipaddress.v6_int_to_packed

Prev: ipaddress.v4_int_to_packed | Up: ipaddress
Rel: ipaddress.AddressValueError, ipaddress.collapse_addresses, ipaddress.get_mixed_type_key, ipaddress.ip_address
Ref: docs.python.org — ipaddress.v6_int_to_packed
Tags: #public #python3 #stdlib #ipaddress


Import

import ipaddress
from ipaddress import v6_int_to_packed

Signature & Overview

ipaddress.v6_int_to_packed(address)

Represent an address as 16 packed bytes in network (big-endian) order.

Usage

import ipaddress

assert ipaddress.v6_int_to_packed(1) == b"\x00" * 15 + b"\x01"

Gotchas

REPL Inspect

from ipaddress import v6_int_to_packed
help(v6_int_to_packed)

Linked from

Related notes