Computing Boston and TTC in Python This is somewhat of a follow up question to Available code for computing solutions to matching algorithms?.

In the above question, I got great answers, but all of them were for R.

I am now programming a lab experiment in otree, which means I am working with Python.

It is fairly easy to find code in python solving matching problems using the Deferred Acceptance mechanism, but I wondered if anyone knew of python code for some of the other common mechanisms in the  literature. Specifically, I am looking for python code for


The Boston mechanism (aka. Immediate acceptance)
The Top-trading cycle algorithm


In the best of the worlds, these codes would 


Be compatible with the school choice model (i.e. many-to-one matching problem in which agents in one side of the "market" can be matched to many agents on the other side)
Allow for constrains on the lenght of the preference list agents can report (see http://www.sciencedirect.com/science/article/pii/S002205310900057X)


However, I would already be very happy with python code for Boston and TTC, even if the two last features are not implemented.
I found one implementation of TTC in python at http://www.dreamincode.net/forums/topic/377004-algorithmic-game-theory-top-trading-cycle-procedure/?ref=dzone.

However, it does not seem to include the two additional features I was mentionning.

With of without these two features : I would still love to hear about more implementation of TTC, and about implementations of Boston.