Implement a routing protocol in Python and using scapy

I want to know if it’s possible to implement a routing protocol (OSPF) in Python and using scapy to modify the packets ?

My aim is to create a network of hundreds/thousands of nodes (locally on my PC), and run OSPF routing protocol, and importantly use scapy lib to change the packets (e.g, add new fields, change the payload, …)

Any guidance or suggestions are most welcomed

Thank you