Add default Accept header for application/json
Fix flake8
Fix example script to actually work