I am importing the Scrapy item keys from items.py, into pipelines.py. The problem is that the order of the imported items are differe
items.py
pipelines.py
A simple fix is to define keys() method in your Item class:
keys()
Item
class MyItem(Item): foo = Field() bar = Field() gar = Field() cha = Field() def keys(self): # in your preferred order return ['cha', 'gar','bar','foo']