You can use graphs.nauty_geng, for example, if you want to iterate over all connected graphs of length 7, you can do:
  sage: gen = graphs.nauty_geng("7 -c")

See graphs.nauty_geng? for more details.