{ "info": { "author": "Jiangge Zhang", "author_email": "tonyseek@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: BSD License", "Natural Language :: Chinese (Simplified)", "Operating System :: OS Independent", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy" ], "description": "GB2260\n======\n\nThe Python implementation for looking up the Chinese administrative divisions.\n\n\nInstallation\n------------\n\n::\n\n $ pip install GB2260\n\n\nBasic Usage\n-----------\n\nThe way to look up a administrative division by its GB2260 code is\nthe basic interface ``gb2260.get(code)``:\n\n.. code-block:: python\n\n >>> import gb2260\n >>>\n >>> division = gb2260.get(360426)\n >>> print(division)\n \n\nThe data of a division is accessible to interfaces as following:\n\n.. code-block:: python\n\n >>> division.code\n u'360426'\n >>> division.name\n u'\u5fb7\u5b89\u53bf'\n >>> division.is_county\n True\n >>> division.is_province\n False\n >>> division.is_prefecture\n False\n >>> print(division.province)\n \n >>> print(division.prefecture)\n \n >>> print(division.county)\n \n\nThe hierarchic divisions could be generated with a iterator method:\n\n.. code-block:: python\n\n >>> division.stack()\n \n >>> for current in division.stack():\n ... print(u'{0} {1}'.format(current.name, current.code))\n \u6c5f\u897f\u7701 360000\n \u4e5d\u6c5f\u5e02 360400\n \u5fb7\u5b89\u53bf 360426\n\n\nIssues\n------\n\nIf you want to report bugs or request features, please create issues on\n`GitHub Issues `_.\n\n\nExternal Links\n--------------\n\n- `GB/T 2260-2002 in Wikipedia `_\n- `Codes for administrative divisions of PRC `_\n\n.. |GB/T 2260| image:: http://img.shields.io/badge/GB%2FT-2260-blue.svg?style=flat\n :target: https://github.com/cn/GB2260\n :alt: GB/T 2260\n.. |Build Status| image:: https://img.shields.io/travis/cn/GB2260.py.svg?style=flat\n :target: https://travis-ci.org/cn/GB2260.py\n :alt: Build Status\n.. |Coverage Status| image:: https://img.shields.io/coveralls/cn/GB2260.py.svg?style=flat\n :target: https://coveralls.io/r/cn/GB2260.py\n :alt: Coverage Status\n.. |Wheel Status| image:: https://pypip.in/wheel/GB2260/badge.svg?style=flat\n :target: https://warehouse.python.org/project/GB2260\n :alt: Wheel Status\n.. |PyPI Version| image:: https://img.shields.io/pypi/v/GB2260.svg?style=flat\n :target: https://pypi.python.org/pypi/GB2260\n :alt: PyPI Version", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/cn/GB2260.py", "keywords": null, "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "GB2260", "package_url": "https://pypi.org/project/GB2260/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/GB2260/", "project_urls": { "Homepage": "https://github.com/cn/GB2260.py" }, "release_url": "https://pypi.org/project/GB2260/0.4.1/", "requires_dist": null, "requires_python": null, "summary": "The Python implementation for looking up the Chinese administrative divisions.", "version": "0.4.1" }, "last_serial": 1548161, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "6eba14b906a9824703613d0cbb494da0", "sha256": "5312d85e4b9816519bd4236a30f965b38d911869ae5ed92a731b617d6d32f652" }, "downloads": -1, "filename": "GB2260-0.1.0-py2-none-any.whl", "has_sig": false, "md5_digest": "6eba14b906a9824703613d0cbb494da0", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 32754, "upload_time": "2014-12-03T06:09:17", "url": "https://files.pythonhosted.org/packages/55/c1/773825f61cbd3dbc484b2ac6f27ca6c7633ee6fdf337385e89d8818ff8a2/GB2260-0.1.0-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c5bcc68fdb2569593aea9ad0d799bebe", "sha256": "676a42b379c3019567e59f561b1561b824f991d2f61e327cc606b350195f86ca" }, "downloads": -1, "filename": "GB2260-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "c5bcc68fdb2569593aea9ad0d799bebe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 32754, "upload_time": "2014-12-03T06:09:44", "url": "https://files.pythonhosted.org/packages/a4/74/9718380f325d233f6cc081e67e6f93c7617901c11ff31e8f1b5780dbc894/GB2260-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e9ffa01929256866944bf8ddc6574f9", "sha256": "bc2dc7e0f497638f5715ba33bb59ca9303e42f332d0626922fc7f11c1e0e6e31" }, "downloads": -1, "filename": "GB2260-0.1.0.tar.gz", "has_sig": false, "md5_digest": "0e9ffa01929256866944bf8ddc6574f9", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30945, "upload_time": "2014-12-03T06:09:20", "url": "https://files.pythonhosted.org/packages/71/ad/60c4fd509a3c0e8da7136bc96bb2a07d8d982fd6de4f74eb1a071bb4290f/GB2260-0.1.0.tar.gz" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "f25c07ac1f635637e52a2d0aa95d4b70", "sha256": "d4b2f323c822a29f0fe545c054d26287b90801d4be1fe4f9f9b2b17e917dce97" }, "downloads": -1, "filename": "GB2260-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "f25c07ac1f635637e52a2d0aa95d4b70", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 229321, "upload_time": "2014-12-12T04:36:45", "url": "https://files.pythonhosted.org/packages/10/05/c5ee352f446c978caf9b2130d6e3b96f2ea52890179d8230e9d537b76edf/GB2260-0.2.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0f337f2e3fd1cb74148143f6fde5794d", "sha256": "fb6ddf9c26fe641fed7e164d99aa23f66f55420fc4ce32ee0fda28592eb40649" }, "downloads": -1, "filename": "GB2260-0.2.0.tar.gz", "has_sig": false, "md5_digest": "0f337f2e3fd1cb74148143f6fde5794d", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 221104, "upload_time": "2014-12-12T04:36:48", "url": "https://files.pythonhosted.org/packages/6d/78/a0900127dc63be00a8c6cd7d3f56d7d2a43be7375d3a6271f72d363fabeb/GB2260-0.2.0.tar.gz" } ], "0.3.0": [ { "comment_text": "", "digests": { "md5": "59ccef5fcf49044792e13b65f6631c17", "sha256": "8e8cb623bb9471223c5d107cfaa14a23413c9e27da462a8e4fdfa7cd569b332d" }, "downloads": -1, "filename": "GB2260-0.3.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "59ccef5fcf49044792e13b65f6631c17", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 218082, "upload_time": "2015-03-27T09:12:16", "url": "https://files.pythonhosted.org/packages/dd/d5/8cd99a7ea2e58fc32427d8b04b4905d57076ef2fe471f44417267a62c491/GB2260-0.3.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c497505ae19500db00b6a9873b225597", "sha256": "bc713be027ab995a01e5cb964d2a48549b265a80e780a56a39ab80b870c5ec10" }, "downloads": -1, "filename": "GB2260-0.3.0.tar.gz", "has_sig": false, "md5_digest": "c497505ae19500db00b6a9873b225597", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 211442, "upload_time": "2015-03-27T09:12:21", "url": "https://files.pythonhosted.org/packages/a8/9e/58d9a5e95ca90eec71cf63b43d7b334bb066a87f6e891878e7ef12cd518e/GB2260-0.3.0.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "b864d3e02cbf6fc5482aa4efc666de79", "sha256": "0aa522e687ce6b38608a078ff8a7e84d594f14e1561f76aa5cd80b6f5618cb26" }, "downloads": -1, "filename": "GB2260-0.3.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b864d3e02cbf6fc5482aa4efc666de79", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 218088, "upload_time": "2015-03-31T07:38:05", "url": "https://files.pythonhosted.org/packages/ce/fb/3fbb3d839b4b9a577d7cc4f74cc21c3bc1504eb031aa628fa5fcb6e9f52f/GB2260-0.3.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "e966836273ef741c453a72ce3539f42c", "sha256": "f149b187e6eb39b96cd9b5cf5ee73218b15ba4ce46080cec5d8b0134e3495f35" }, "downloads": -1, "filename": "GB2260-0.3.1.tar.gz", "has_sig": false, "md5_digest": "e966836273ef741c453a72ce3539f42c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 211462, "upload_time": "2015-03-31T07:38:10", "url": "https://files.pythonhosted.org/packages/5d/cf/d04fee40d6caef7f28b840896dbfed05a87ef5f34a82b14abc645a76555d/GB2260-0.3.1.tar.gz" } ], "0.4.1": [ { "comment_text": "", "digests": { "md5": "84cda3faa469e2b4df578124f506c846", "sha256": "7708e26955a09b647d4f2d263961df763e97d6f98790921defbb190745342f10" }, "downloads": -1, "filename": "GB2260-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "84cda3faa469e2b4df578124f506c846", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 481324, "upload_time": "2015-05-15T09:26:23", "url": "https://files.pythonhosted.org/packages/13/66/69a0545ed97d3689ff422a2504ff51a298a78b4795fe05228ef944bc22f2/GB2260-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "48eb3abe916875702893cefa33de2715", "sha256": "b7b31c1549e53b7b8c517ca793c1395fae9c0c81cb2158b7ff4b61bee7d42546" }, "downloads": -1, "filename": "GB2260-0.4.1.tar.gz", "has_sig": false, "md5_digest": "48eb3abe916875702893cefa33de2715", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 464353, "upload_time": "2015-05-15T09:26:29", "url": "https://files.pythonhosted.org/packages/ca/01/4b1a1a593fbe8dcc016f3eddab7978801b7c4bd328077200c4cd430072b7/GB2260-0.4.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "84cda3faa469e2b4df578124f506c846", "sha256": "7708e26955a09b647d4f2d263961df763e97d6f98790921defbb190745342f10" }, "downloads": -1, "filename": "GB2260-0.4.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "84cda3faa469e2b4df578124f506c846", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 481324, "upload_time": "2015-05-15T09:26:23", "url": "https://files.pythonhosted.org/packages/13/66/69a0545ed97d3689ff422a2504ff51a298a78b4795fe05228ef944bc22f2/GB2260-0.4.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "48eb3abe916875702893cefa33de2715", "sha256": "b7b31c1549e53b7b8c517ca793c1395fae9c0c81cb2158b7ff4b61bee7d42546" }, "downloads": -1, "filename": "GB2260-0.4.1.tar.gz", "has_sig": false, "md5_digest": "48eb3abe916875702893cefa33de2715", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 464353, "upload_time": "2015-05-15T09:26:29", "url": "https://files.pythonhosted.org/packages/ca/01/4b1a1a593fbe8dcc016f3eddab7978801b7c4bd328077200c4cd430072b7/GB2260-0.4.1.tar.gz" } ] }