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
- Converts a 128-bit
intto 16 big-endian bytes.
REPL Inspect
from ipaddress import v6_int_to_packed
help(v6_int_to_packed)
Linked from
Related notes
- tuts/python3/stdlib_module/ipaddress/v4_int_to_packed Linked here; links to this page; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress Linked here; links to this page; shared tags: #stdlib
- tuts/python3/stdlib_module/ipaddress/AddressValueError Linked here; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/collapse_addresses Linked here; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/get_mixed_type_key Linked here; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/ip_address Linked here; shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/ip_interface shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/ip_network shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/IPv4Address shared tags: #ipaddress, #stdlib
- tuts/python3/stdlib_module/ipaddress/IPv4Interface shared tags: #ipaddress, #stdlib