Implementing Knowledge space theory in Python

I want to implement knowledge space theory in python. I want to create learning spaces and learning routes. Can anyone please suggest me if there is any library or any other way?