There are 2 repositories under risk-contribution topic.
Portfolio Optimization and Quantitative Strategic Asset Allocation in Python