{ "info": { "author": "Dhan-Rheb Belza", "author_email": "dhanrheb@gmail.com", "bugtrack_url": null, "classifiers": [ "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": "phgeograpy (PH Geography)\n===\n\nphgeograpy is a python package that lists regions, provinces, and cities/municipalities in the Philippines.\n\nTake a break from machine learning and chatbots. I created this project to explore and experience building a python package. This is my first python package. Yey! I'll also use this project to expore unit testing.\n\nI'm working on a web app that needs location input broken down into regions, provinces, and cities/municipalities so I created this package to make it reusable and open source. Technically it's just a list, you can use it to create dropdown inputs or model choices in Django.\n\n# Regions\n\nRegions are represented by `phgeograpy.Region` class.\n\nSample usage:\n\n```python\nimport phgeograpy\n\n# Get all regions in the philippines\nregions = phgeograpy.regions()\n\n# Get the details of the first region\nprint(regions[0].slug) # A unique id of the region\nprint(regions[0].name) # Name of the region\nprint(regions[0].description) # A longer/alternative name of the region\n\n# Get a specific region.\n# If no region is found, an Exception will be raised.\nregion = phgeograpy.regions('ncr') # `ncr` is the slug of NCR.\n```\n\n# Provinces\n\nProvinces are represented by `phgeograpy.Province` class.\n\nSample usage:\n\n```python\nimport phgeograpy\n\n# Get all provinces in the philippines\nprovinces = phgeograpy.provinces()\n\n# Get the details of the first province\nprint(provinces[0].slug) # A unique id of the province\nprint(provinces[0].name)\n\n# Get the region where the province is located\nregion = provinces[0].region\n\n# Get provinces of a specific region\nregion1_provinces = phgeograpy.provinces(region_slug='region1')\n\n# You can also get the provinces from the `phgeograpy.Region` class instance\nregion1 = phgeograpy.regions('region1')\nregion1_provinces = region1.provinces()\n```\n\n# Municipalities\n\nMunicipalities are represented by `phgeograpy.Municipality` class. Cities are also included.\n\nSample Usage:\n\n```python\nimport phgeograpy\n\n# Get all municipalities in the philippines\nmunicipalities = phgeograpy.municipalities()\n\n# Get the details of the first municipality\nprint(municipalities[0].slug) # A unique id of the municipality\nprint(municipalities[0].name)\nprint(municipalities[0].is_city) # `True` if the instance is a city\nprint(municipalities[0].is_capital) # `True` if the instance is the capital of the province it is located\nprint(municipalities[0].is_huc) # `True` if the instance is a highly-urbanized/independent city\n\n# Get the province where the municipality is located\nprovince = municipalities[0].province\n\n# Get municipalities from the `phgeograpy.Province` class instance\nmunicipalities = province.municipalities()\n```\n\n# Raw data\n\nTo get raw data, just set `raw` parameter to `True`.\n\nSample usage:\n\n```python\n# Get raw regions data\nraw_regions = phgeograpy.regions(raw=True)\n```\n\nNote that all data below the area of your query will be included in the raw output (e.g. raw regions will include data for provinces and municipalities, raw provinces will include data for municipalities).\n\n\n", "description_content_type": null, "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/drfb/phgeograpy", "keywords": "philippine geography regions provinces cities municipalities", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "phgeograpy", "package_url": "https://pypi.org/project/phgeograpy/", "platform": "", "project_url": "https://pypi.org/project/phgeograpy/", "project_urls": { "Homepage": "https://github.com/drfb/phgeograpy" }, "release_url": "https://pypi.org/project/phgeograpy/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "A python package that lists regions, provinces, and cities/municipalities in the Philippines", "version": "1.0.0" }, "last_serial": 3661385, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "0d6647bcb3f902999b717e5c332d19fe", "sha256": "88c8079dd2a29df57dc3388d743367b05911bbd65fb1b58efa6009777075dd07" }, "downloads": -1, "filename": "phgeograpy-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0d6647bcb3f902999b717e5c332d19fe", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 36695, "upload_time": "2018-03-12T13:12:18", "url": "https://files.pythonhosted.org/packages/65/90/f1839f28fd95b6d9b842ffeaa31694523385d1419057a06a11ca1e988ade/phgeograpy-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d22ef5bb309c154786084eeb05f2bda", "sha256": "65ee9e448a40ea595830564153a2cd588e98c2f505aa50bcdbb798c91649dcbd" }, "downloads": -1, "filename": "phgeograpy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "3d22ef5bb309c154786084eeb05f2bda", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30159, "upload_time": "2018-03-12T13:12:40", "url": "https://files.pythonhosted.org/packages/11/3a/1c24218188f097a801694b098efbcd9c5c6176ed3fb42e13c275ceb085b5/phgeograpy-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0d6647bcb3f902999b717e5c332d19fe", "sha256": "88c8079dd2a29df57dc3388d743367b05911bbd65fb1b58efa6009777075dd07" }, "downloads": -1, "filename": "phgeograpy-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "0d6647bcb3f902999b717e5c332d19fe", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 36695, "upload_time": "2018-03-12T13:12:18", "url": "https://files.pythonhosted.org/packages/65/90/f1839f28fd95b6d9b842ffeaa31694523385d1419057a06a11ca1e988ade/phgeograpy-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "3d22ef5bb309c154786084eeb05f2bda", "sha256": "65ee9e448a40ea595830564153a2cd588e98c2f505aa50bcdbb798c91649dcbd" }, "downloads": -1, "filename": "phgeograpy-1.0.0.tar.gz", "has_sig": false, "md5_digest": "3d22ef5bb309c154786084eeb05f2bda", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 30159, "upload_time": "2018-03-12T13:12:40", "url": "https://files.pythonhosted.org/packages/11/3a/1c24218188f097a801694b098efbcd9c5c6176ed3fb42e13c275ceb085b5/phgeograpy-1.0.0.tar.gz" } ] }