Package allows to analize complexity of Python source code
You can use api for your purposes or just use GUI, supplied with package (it needs PyQt4). It can measure Logical Lines Of Code, Cyclomatic Complexity, Halstead Metrics and Maintainability Index. Gonna add more cool features and etc. Feedback on email@example.com please.