When you do for item in some_list, item is the actual item in that list. You can't get the previous item by item[-1].
So in your case, item is a dictionary that has the keys 'id' and 'stuff'. Obviously, no key called -1, so you get a KeyError.
You can iterate over two slices of the list after using zip() -- one that starts at the zeroth element, and one that starts on the first element. Using zip(), you can get corresponding items of these slices simultaneously. You'll have every item and its subsequent item coming out of zip().
Also, you want a result after you've checked all pairs of items, not while you're checking each pair. To do this, create a variable is_sequential with an initial value of True. If you find a single pair that doesn't work, change this to False, and break out of the loop because one pair being non-sequential makes the entire list so.
is_sequential = True
for item1, item2 in zip(listing, listing[1:]):
if item1['id'] + 1 != item2['id']:
is_sequential = False
break
print(is_sequential)
Alternatively, you could use the any() function with the same loop and condition, and then invert the result, or use all() with the opposite condition:
# use any()
is_sequential = not any( item1['id'] + 1 != item2['id']
for item1, item2 in zip(listing, listing[1:])
)
# or, use all()
is_sequential = all( item1['id'] + 1 == item2['id']
for item1, item2 in zip(listing, listing[1:])
)