{ "info": { "author": "Christopher H. Todd", "author_email": "Christopher.Hayden.Todd@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8" ], "description": "# Christopher H. Todd's Python Library For Interacting With Locations\n\nThe ctodd-python-lib-location project is responsible for manging location information, geocoding addresses, and getting directions.\n\n## Table of Contents\n\n* [Dependencies](#dependencies)\n* [Libraries](#libraries)\n* [Example Scripts](#example-scripts)\n* [Notes](#notes)\n* [TODO](#todo)\n\n## Dependencies\n\n### Python Packages\n\n* geocoder==1.38.1\n* requests==2.22.0\n* street-address==0.4.0\n* usaddress==0.5.10\n\n## Libraries\n\n### [address_helpers.py](https://github.com/ChristopherHaydenTodd/ctodd-python-lib-location/blob/master/location_helpers/address_helpers.py)\n\nAddress Helpers. This library is used to interact with address strings/dicts and convert/handle these addresses.\n\nFunctions:\n\n```\ndef convert_string_address_to_dict(address_string, expected_fields=None):\n \"\"\"\n Purpose:\n Parse a string into an address dict with specific fields\n Args:\n address_string (String): Raw address string to try and parse\n expected_fields (List): List of fields that are needed to be parsed to be\n considered successful\n Return:\n parsed_address (Dict): Dict of the parsed address with fields that could be\n determined from a string\n \"\"\"\n```\n\n```\ndef parse_address_using_lib_usaddress(address_string):\n \"\"\"\n Purpose:\n Use the usaddress library to parse a string into a dict\n Args:\n address_string (String): Raw address string to try and parse\n Return:\n parsed_address (Dict): Dict of the parsed address with fields that could be\n determined from a string\n \"\"\"\n```\n\n```\ndef parse_address_using_lib_streetaddress(address_string):\n \"\"\"\n Purpose:\n Use the street-address library to parse a string into a dict\n Args:\n address_string (String): Raw address string to try and parse\n Return:\n parsed_address (Dict): Dict of the parsed address with fields that could be\n determined from a string\n \"\"\"\n```\n\n### [mapquest_helpers.py](https://github.com/ChristopherHaydenTodd/ctodd-python-lib-location/blob/master/location_helpers/mapquest_helpers.py)\n\nMapquest Helpers. This library is used to wrap mapquest API calls and handle authentication\n\nFunctions:\n\n```\ndef get_mapquest_api_key(public_key_file=\"~/.mapquest/public_key.txt\"):\n \"\"\"\n Purpose:\n Get the mapquest API from the environment\n Args:\n public_key_file (String): filename of the public key token file\n Return:\n mapquest_api_key (String): MapQuest public key\n \"\"\"\n```\n\n```\ndef get_directions_between_two_addresses(mapquest_api_key, address_1, address_2):\n \"\"\"\n Purpose:\n Get directions between two addresses\n\n Leverages Mapquest API:\n https://developer.mapquest.com/documentation/directions-api/route/get/\n Args:\n address_1 (String): Address to use as start point of travel\n address_2 (String): Address to use as end destination of travel\n Return:\n directions (Dict): Dict of the directions between the two locations\n \"\"\"\n```\n\n## Example Scripts\n\nExample executable Python scripts/modules for testing and interacting with the library. These show example use-cases for the libraries and can be used as templates for developing with the libraries or to use as one-off development efforts.\n\n### [parse_addresses.py](https://github.com/ChristopherHaydenTodd/ctodd-python-lib-location/blob/master/example_usage/parse_addresses.py)\n\n```\n Purpose:\n Parse some set addresses\n\n Steps:\n - Parse Args\n - Call libs to parse addresses\n\n function call:\n python3.6 parse_addresses \\\n [-h] \\\n --addresses ADDRESSES\n\n example script call:\n python3.6 example_usage/parse_addresses.py \\\n --address=\"REDACTED\" \\\n --address=\"REDACTED\"\n```\n\n### [get_directions_between_addresses.py](https://github.com/ChristopherHaydenTodd/ctodd-python-lib-location/blob/master/example_usage/get_directions_between_addresses.py)\n\n```\n Purpose:\n Get Directions between two addresses.\n\n Steps:\n - Parse Args\n - Call libs to get directions from args\n - Parse directions for some valuable information\n\n function call:\n python3.6 get_directions_between_addresses.py \\\n [-h] \\\n --start-address START_ADDRESS \\\n --end-address END_ADDRESS\n\n example script call:\n python3.6 example_usage/get_directions_between_addresses.py \\\n --start-address=\"REDACTED\" \\\n --end-address=\"REDACTED\"\n```\n\n## Notes\n\n - Relies on f-string notation, which is limited to Python3.6. A refactor to remove these could allow for development with Python3.0.x through 3.5.x\n\n## TODO\n\n - Unittest framework in place, but lacking tests\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/ChristopherHaydenTodd/ctodd-python-lib-location", "keywords": "python,libraries,location,geocoding", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "ctodd-python-lib-location", "package_url": "https://pypi.org/project/ctodd-python-lib-location/", "platform": "", "project_url": "https://pypi.org/project/ctodd-python-lib-location/", "project_urls": { "Homepage": "https://github.com/ChristopherHaydenTodd/ctodd-python-lib-location" }, "release_url": "https://pypi.org/project/ctodd-python-lib-location/1.0.0/", "requires_dist": [ "street-address (==0.4.0)", "requests (==2.22.0)", "geocoder (==1.38.1)", "usaddress (==0.5.10)" ], "requires_python": ">3.6", "summary": "Python utilities used for interacting with Locations", "version": "1.0.0" }, "last_serial": 5586269, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "2b7e0e948bb9e4366ec5081108249a00", "sha256": "5a483b806635a913538d3a24518ac67fe5967ea83adafb9572284c79098370e5" }, "downloads": -1, "filename": "ctodd_python_lib_location-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2b7e0e948bb9e4366ec5081108249a00", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.6", "size": 7655, "upload_time": "2019-07-26T00:42:30", "url": "https://files.pythonhosted.org/packages/89/21/df3c08ea379dcd8e26a0a4d12aa2fa8fe7580ea784c4b4e3ba748ada7d50/ctodd_python_lib_location-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e3d8ceb0e01dd65404b0692537b0dcb", "sha256": "4a698a5e116ebcba25881c797615e2baaf74a86f5836393fd2291440053dbc43" }, "downloads": -1, "filename": "ctodd-python-lib-location-1.0.0.tar.gz", "has_sig": false, "md5_digest": "0e3d8ceb0e01dd65404b0692537b0dcb", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6", "size": 6679, "upload_time": "2019-07-26T00:42:33", "url": "https://files.pythonhosted.org/packages/f1/90/28f6eba25ff94979b0b8a6217b3d02ae74a65a8f8af535c17be810c6bcd2/ctodd-python-lib-location-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "2b7e0e948bb9e4366ec5081108249a00", "sha256": "5a483b806635a913538d3a24518ac67fe5967ea83adafb9572284c79098370e5" }, "downloads": -1, "filename": "ctodd_python_lib_location-1.0.0-py3-none-any.whl", "has_sig": false, "md5_digest": "2b7e0e948bb9e4366ec5081108249a00", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": ">3.6", "size": 7655, "upload_time": "2019-07-26T00:42:30", "url": "https://files.pythonhosted.org/packages/89/21/df3c08ea379dcd8e26a0a4d12aa2fa8fe7580ea784c4b4e3ba748ada7d50/ctodd_python_lib_location-1.0.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "0e3d8ceb0e01dd65404b0692537b0dcb", "sha256": "4a698a5e116ebcba25881c797615e2baaf74a86f5836393fd2291440053dbc43" }, "downloads": -1, "filename": "ctodd-python-lib-location-1.0.0.tar.gz", "has_sig": false, "md5_digest": "0e3d8ceb0e01dd65404b0692537b0dcb", "packagetype": "sdist", "python_version": "source", "requires_python": ">3.6", "size": 6679, "upload_time": "2019-07-26T00:42:33", "url": "https://files.pythonhosted.org/packages/f1/90/28f6eba25ff94979b0b8a6217b3d02ae74a65a8f8af535c17be810c6bcd2/ctodd-python-lib-location-1.0.0.tar.gz" } ] }