As far as I could find out from the documentation and various discussions on the net, the ability to add default values to fields in a scrapy item has been removed.
As of version 2.2 Scrapy supports dataclasses. So basically you could define an item this way:
from dataclasses import dataclass
@dataclass
class MyPersonalItem:
name: str = "default name
age: int = 100
address: str = "anywhere in the world"
Then when you create your item you can assign the corresponding values with the dot
notation:
victor = MyPersonalItem()
victor.name = "Victor Herasme"
victor.age = 42
victor.address = "Spain
Check Scrapy docs on the subject here: https://docs.scrapy.org/en/latest/topics/items.html#dataclass-objects
And also this very good tutorial on DataClasses: https://realpython.com/python-data-classes/
As you see you can use type hints and default values.