Skip to main content
`Ctrl`+`K`

# from_graph6_bytes

from_graph6_bytes(bytes_in)

  Read a simple undirected graph in graph6 format from bytes.

  Parameters:
    bytes_in bytes

      Data in graph6 format, without a trailing newline.

  Returns:
    G Graph
  Raises:
    NetworkXError

      If bytes_in is unable to be parsed in graph6 format

    ValueError

      If any character `c` in bytes_in does not satisfy `63 <= ord(c) < 127`.

  See also

  `read_graph6`, `write_graph6`

  References

  [1]

  Graph6 specification <http://users.cecs.anu.edu.au/~bdm/data/formats.html>

  Examples

      >>> G = nx.from_graph6_bytes(b"A_")
      >>> sorted(G.edges())
      [(0, 1)]