Installing Quantlib: This process became surprisingly easy since I last revisited Quantlib. Nowadays, in Anaconda (https://www.anaconda.com/distribution/), just running
pip install QuantLib-Python
will get the job done.
Quantlib cookbook: Luigi Ballabio and Goutham Balaraman wrote a rather nice book to get started with QuantLib in Python. You can get it here at a price point that suits you (starting at 5$, with a suggested price of 30$), including the iPython notebooks with examples for download:
Expected Exposure Calculation in Python: Matthias Groncki has a nice example for an expected future exposure calculation in Quantlib on his website: