Are you looking to avoid reinventing the wheel? You can use the modular code below to help your project along.
Census APISunlight Foundation's Python client for the US Census Bureau API makes it easy to quickly access the data you need. The ACS, SF1, and SF3 data sets are provided by the API. A Census API key is required. More information can be found at https://pypi.python.org/pypi/census/0.5
Source: Third party