This program was originally written to enable some very basic metadata to be extracted from a CS:GO demo file, for analysis on an automated service. Though the service never materialised, the very incomplete script is available as a GitHub Gist.
Alternatively you can download the raw script from a non-GitHub domain: source-engine-demo-parser.py.
Please contact me if you'd like to use this under a different license!