{ "info": { "author": "Austin Brown", "author_email": "austinbrown34@gmail.com", "bugtrack_url": null, "classifiers": [], "description": "# StoreLocator\n\nA command-line tool to find the nearest store to a given address or zip code from a CSV of stores.\n\n## Getting Started\n\nTo get started clone this repo, and if you don't want to install all the dependencies globally (and you shouldn't want to), make sure you have something like Virtualenv installed on your machine.\n\n### Prerequisites\n\nTo avoid potential conflicts, create a virtual environment and activate it before following installation instructions.\n\n```\nvirtualenv -p python3 env\n. env/bin/activate\n```\n\n### Installing\n\nFollow these steps to setup StoreLocator.\n\nInstall dependencies\n\n```\npip install -r requirements.txt\n```\n\nAdd find_store to your path:\n\n```\nmkdir -p ~/bin\ncp find_store ~/bin\nexport PATH=$PATH\":$HOME/bin\"\n```\n\nPopulate config variables in constants.py if you not planning on using the provided defaults.\n\n```\n# Config\n\nSTORES_CSV = 'store-locations.csv'\nDEFAULT_OUTPUT = 'text'\nDEFAULT_UNITS = 'mi'\nDEFAULT_ENCODING = 'utf-8-sig'\nDEFAULT_DELIMITER = ','\nDISTANCE_PRECISION = 2\n\n# CSV Field Names\nSTORE_FIELDS = {\n 'NAME': 'Store Name',\n 'LOCATION': 'Store Location',\n 'COUNTY': 'County',\n 'ADDRESS': 'Address',\n 'CITY': 'City',\n 'STATE': 'State',\n 'ZIP_CODE': 'Zip Code',\n 'LATITUDE': 'Latitude',\n 'LONGITUDE': 'Longitude',\n 'DISTANCE': 'Distance'\n}\n```\n\nOnce you are all set up, you can use StoreLocator to find the nearest store by address or zip code. Optionally, you can also choose the units for distance (mi or km) and the format you want your results outputted as (text or json).\n\n```\nFind Store\n find_store will locate the nearest store (as the vrow flies) from\n store-locations.csv, print the matching store address, as well as\n the distance to that store.\n\nUsage:\n find_store --address=\"
\"\n find_store --address=\"\" [--units=(mi|km)] [--output=text|json]\n find_store --zip=