{ "info": { "author": "Ben Welsh", "author_email": "ben.welsh@latimes.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.1", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4" ], "description": "
8\"\"\"\"8 8\"\"\"\"8\n8 eeeee eeeee eeeee eeee 8 eeeee e e e eeee\n8eeeee 8 8 8 8 8 8eeeee 8 8 8 8 8\n 88 8e 8eee8 8e 8eee 88 8e 8eeee8 8e 8eee\ne 88 88 88 8 88 88 e 88 88 88 88 88\n8eee88 88 88 8 88 88ee 8eee88 88 88 88eee 88ee \n\nA Python library that standardizes the names of U.S. states\n\n[](https://travis-ci.org/datadesk/latimes-statestyle)\n[](http://badge.fury.io/py/latimes-statestyle)\n[](https://coveralls.io/r/datadesk/latimes-statestyle?branch=master)\n\n* Issues: [https://github.com/datadesk/latimes-statestyle/issues](https://github.com/datadesk/latimes-statestyle/issues)\n* Packaging: [https://pypi.python.org/pypi/latimes-statestyle](https://pypi.python.org/pypi/latimes-statestyle)\n* Testing: [https://travis-ci.org/datadesk/latimes-statestyle](https://travis-ci.org/datadesk/latimes-statestyle)\n* Coverage: [https://coveralls.io/r/datadesk/latimes-statestyle](https://coveralls.io/r/datadesk/latimes-statestyle)\n\nFeatures\n--------\n\n- Submit a state\u2019s name, postal code or Associated Press abbreviation or [FIPS\n code](https://en.wikipedia.org/wiki/Federal_Information_Processing_Standards)\n and receive a clean object with all other formats as attributes.\n- State objects also provide the \u201cstateface\u201d code for [ProPublica\u2019s\n web font of state shapes](http://propublica.github.com/stateface/)\n\nGetting started\n---------------\n\nGetting started is as easy as\u2026\n\n```bash\n$ pip install latimes-statestyle\n```\n\nThen start feeding it your data.\n\n```python\n>>> import statestyle\n# Get by postal code\n>>> obj = statestyle.get('CA')\n```\n\nIf there is a match you can access the clean, standardized attributes.\n\n```python\n# Here's the full name of the state\n>>> print obj.name\nCalifornia\n# The U.S. postal code\n>>> print obj.postal\nCA\n# The Associated Press style abbreviation\n>>> print obj.ap\nCalif.\n# The FIPS ID code\n>>> print obj.fips\n6\n# The type of geographic area\n>>> print obj.type\nstate\n# The ProPublica stateface code\n>>> obj.stateface\n\"E\"\n```\n\nYou can pass in any of the attributes for a match.\n\n```python\n# Like the FIPS code\n>>> obj = statestyle.get(6)\n# And the same attributes available\n>>> print obj.name\nCalifornia\n```\n\nHere's what happens when you submit something that doesn't have a match.\n\n```python\n>>> statestyle.get(\"foo\")\nTraceback (most recent call last):\n File \"