Built in python with Uber's H3 geospatial indexing and FastAPI.
Searching for nearby locations using stored latitude and longitude is highly inefficient. This python API provides a fast, efficient drop-in solution by interfacing with the highly efficient H3 library. For speed, it can either utilize sqlite3 (built-in with python) or Redis as a backend for indexing H3 geohashes.
Need to have Redis running on localhost with default port (6379)
- Create and activate virtual env. (tested with 3.8.5)
pip install -r "requirements.txt"
uvicorn main:app
Endpoints:
/add_location
/find_nearby_locations
/delete_location
instructions on endpoints available at http://127.0.0.1:8000/docs
notes on redis:
CONFIG GET dir
to know where the dump file is. (Persistence)CONFIG SET appendfsync always
to keep all data safe