Name | abs-geolocation-core JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | Shared service for the azure maps location service |
upload_time | 2025-09-05 09:27:27 |
maintainer | None |
docs_url | None |
author | AutoBridgeSystems |
requires_python | <4.0,>=3.11 |
license | MIT |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# abs-geolocation-core
## Overview
The `abs-geolocation-core` package provides a set of utilities powered by Azure Maps for geolocation services. It includes features such as geocoding, reverse geocoding, distance calculations, routing, elevation data, weather information, and traffic data.
## Features
- **Geocode Address**: Get location by address.
- **Reverse Geocode**: Get address by latitude/longitude.
- **Distance Between**: Calculate Haversine distance in meters or by road via route.
- **Get Route**: Determine the route between two or more locations.
- **Elevation Along**: Retrieve elevation for points or lines.
- **Weather At**: Get current weather at a location.
- **Traffic At**: Get traffic flow and relative congestion at a location.
- **Nearest By Distance**: Find nearest candidates to an origin by straight-line distance.
- **Nearest By Drive Distance**: Find nearest by driving distance using Route Matrix.
- **Nearest By Drive Time**: Find nearest by driving time using Route Matrix.
- **Nearest Ranked**: Rank candidates by time and distance.
- **Nearest Ranked With Weather**: Rank candidates by time, distance, and weather conditions.
- **Nearest Ranked With Weather and Traffic**: Rank candidates by time, distance, weather, and traffic conditions.
## Installation
To install the package, use the following command:
```bash
pip install abs-geolocation-core
```
## Usage
Here is a basic example of how to use the `abs-geolocation-core` package:
```python
import asyncio
from abs_geolocation_core.location_service import AzureMapsAuth, LocationService
async def main():
auth = AzureMapsAuth(subscription_key="<YOUR_KEY>") # or sas_token_provider=lambda: "sv=...&sig=..."
svc = LocationService(auth)
places = await svc.geocode_address("Mumbai Central, Mumbai")
print(places[0]["position"]) # lat/lon from geocode result
origin = (19.0760, 72.8777) # Mumbai
dest = (18.5204, 73.8567) # Pune
route = await svc.get_route([origin, dest])
print(route["routes"][0]["summary"])
best = await svc.nearest_by_drive_time(origin, [(18.5204, 73.8567), (21.1458, 79.0882)])
print(best)
await svc.aclose()
if __name__ == "__main__":
asyncio.run(main())
```
## API Mapping to Azure Maps
The service maps to the following Azure Maps REST endpoints (host: `https://atlas.microsoft.com`):
- Search: `GET /search/address/json`, `GET /search/address/reverse/json`, `GET /search/fuzzy/json` (api-version: `1.0` configurable)
- Route: `GET /route/directions/json` (api-version: configurable), `POST /route/matrix/sync/json` (matrix api-version: configurable)
- Elevation: `GET /elevation/point/json`, `GET /elevation/line/json` (api-version: `1.0` configurable)
- Weather: `GET /weather/currentConditions/json` (api-version: `1.1` configurable)
- Traffic: `GET /traffic/flowSegment/relative/json` (api-version: `1.0` configurable)
Refer to Azure Maps REST docs for details on parameters and responses:
- Search: [Azure Maps Search REST]
- Route: [Azure Maps Route REST]
- Matrix: [Azure Maps Route Matrix REST]
- Elevation: [Azure Maps Elevation REST]
- Weather: [Azure Maps Weather REST]
- Traffic: [Azure Maps Traffic REST]
## Configuration
You can override API versions and timeouts via the `LocationService` constructor:
```python
svc = LocationService(
AzureMapsAuth(subscription_key="<KEY>"),
api_version_search="1.0",
api_version_route="1.0",
api_version_matrix="2.0",
api_version_elevation="1.0",
api_version_weather="1.1",
api_version_traffic="1.0",
timeout=10.0,
)
```
For SAS authentication:
```python
svc = LocationService(
AzureMapsAuth(sas_token_provider=lambda: "<SAS_TOKEN>"),
)
```
## Requirements
- Python 3.11 or higher
- Azure Maps services enabled for your resource (Search, Routing, Elevation, Weather, Traffic)
## License
This project is licensed under the MIT License - see the LICENSE file for details.
## Contact
For more information, please contact [info@autobridgesystems.com](mailto:info@autobridgesystems.com).
Raw data
{
"_id": null,
"home_page": null,
"name": "abs-geolocation-core",
"maintainer": null,
"docs_url": null,
"requires_python": "<4.0,>=3.11",
"maintainer_email": null,
"keywords": null,
"author": "AutoBridgeSystems",
"author_email": "info@autobridgesystems.com",
"download_url": "https://files.pythonhosted.org/packages/a7/44/b582b1bb76cb2536f51cf3d3530dc77ec1868796695af57d8c3f88351969/abs_geolocation_core-0.1.0.tar.gz",
"platform": null,
"description": "# abs-geolocation-core\n\n## Overview\n\nThe `abs-geolocation-core` package provides a set of utilities powered by Azure Maps for geolocation services. It includes features such as geocoding, reverse geocoding, distance calculations, routing, elevation data, weather information, and traffic data.\n\n## Features\n\n- **Geocode Address**: Get location by address.\n- **Reverse Geocode**: Get address by latitude/longitude.\n- **Distance Between**: Calculate Haversine distance in meters or by road via route.\n- **Get Route**: Determine the route between two or more locations.\n- **Elevation Along**: Retrieve elevation for points or lines.\n- **Weather At**: Get current weather at a location.\n- **Traffic At**: Get traffic flow and relative congestion at a location.\n- **Nearest By Distance**: Find nearest candidates to an origin by straight-line distance.\n- **Nearest By Drive Distance**: Find nearest by driving distance using Route Matrix.\n- **Nearest By Drive Time**: Find nearest by driving time using Route Matrix.\n- **Nearest Ranked**: Rank candidates by time and distance.\n- **Nearest Ranked With Weather**: Rank candidates by time, distance, and weather conditions.\n- **Nearest Ranked With Weather and Traffic**: Rank candidates by time, distance, weather, and traffic conditions.\n\n## Installation\n\nTo install the package, use the following command:\n\n```bash\npip install abs-geolocation-core\n```\n\n## Usage\n\nHere is a basic example of how to use the `abs-geolocation-core` package:\n\n```python\nimport asyncio\nfrom abs_geolocation_core.location_service import AzureMapsAuth, LocationService\n\nasync def main():\n auth = AzureMapsAuth(subscription_key=\"<YOUR_KEY>\") # or sas_token_provider=lambda: \"sv=...&sig=...\"\n svc = LocationService(auth)\n places = await svc.geocode_address(\"Mumbai Central, Mumbai\")\n print(places[0][\"position\"]) # lat/lon from geocode result\n origin = (19.0760, 72.8777) # Mumbai\n dest = (18.5204, 73.8567) # Pune\n route = await svc.get_route([origin, dest])\n print(route[\"routes\"][0][\"summary\"])\n best = await svc.nearest_by_drive_time(origin, [(18.5204, 73.8567), (21.1458, 79.0882)])\n print(best)\n await svc.aclose()\n\nif __name__ == \"__main__\":\n asyncio.run(main())\n```\n\n## API Mapping to Azure Maps\n\nThe service maps to the following Azure Maps REST endpoints (host: `https://atlas.microsoft.com`):\n\n- Search: `GET /search/address/json`, `GET /search/address/reverse/json`, `GET /search/fuzzy/json` (api-version: `1.0` configurable)\n- Route: `GET /route/directions/json` (api-version: configurable), `POST /route/matrix/sync/json` (matrix api-version: configurable)\n- Elevation: `GET /elevation/point/json`, `GET /elevation/line/json` (api-version: `1.0` configurable)\n- Weather: `GET /weather/currentConditions/json` (api-version: `1.1` configurable)\n- Traffic: `GET /traffic/flowSegment/relative/json` (api-version: `1.0` configurable)\n\nRefer to Azure Maps REST docs for details on parameters and responses:\n- Search: [Azure Maps Search REST]\n- Route: [Azure Maps Route REST]\n- Matrix: [Azure Maps Route Matrix REST]\n- Elevation: [Azure Maps Elevation REST]\n- Weather: [Azure Maps Weather REST]\n- Traffic: [Azure Maps Traffic REST]\n\n## Configuration\n\nYou can override API versions and timeouts via the `LocationService` constructor:\n\n```python\nsvc = LocationService(\n AzureMapsAuth(subscription_key=\"<KEY>\"),\n api_version_search=\"1.0\",\n api_version_route=\"1.0\",\n api_version_matrix=\"2.0\",\n api_version_elevation=\"1.0\",\n api_version_weather=\"1.1\",\n api_version_traffic=\"1.0\",\n timeout=10.0,\n)\n```\n\nFor SAS authentication:\n\n```python\nsvc = LocationService(\n AzureMapsAuth(sas_token_provider=lambda: \"<SAS_TOKEN>\"),\n)\n```\n\n\n## Requirements\n\n- Python 3.11 or higher\n- Azure Maps services enabled for your resource (Search, Routing, Elevation, Weather, Traffic)\n\n## License\n\nThis project is licensed under the MIT License - see the LICENSE file for details.\n\n## Contact\n\nFor more information, please contact [info@autobridgesystems.com](mailto:info@autobridgesystems.com).\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Shared service for the azure maps location service",
"version": "0.1.0",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2d13fc9e7698b029164fa00f06c516b47a9801a3d70cc2d859f7d4849daa9e3f",
"md5": "543cdd88d4211fccd8ba0d25bfd0fd4c",
"sha256": "d1c537c151a91e47879ca32c483c7718ce1abffd08a0d7395c54a17ff16b1e70"
},
"downloads": -1,
"filename": "abs_geolocation_core-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "543cdd88d4211fccd8ba0d25bfd0fd4c",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": "<4.0,>=3.11",
"size": 8871,
"upload_time": "2025-09-05T09:27:26",
"upload_time_iso_8601": "2025-09-05T09:27:26.440081Z",
"url": "https://files.pythonhosted.org/packages/2d/13/fc9e7698b029164fa00f06c516b47a9801a3d70cc2d859f7d4849daa9e3f/abs_geolocation_core-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "a744b582b1bb76cb2536f51cf3d3530dc77ec1868796695af57d8c3f88351969",
"md5": "c743b7627fc64f39758908f79c283ed4",
"sha256": "8e1832fd9dd7d1659968ef60b9112e8eb0d3b5560dbe9235364066f40981d0b5"
},
"downloads": -1,
"filename": "abs_geolocation_core-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "c743b7627fc64f39758908f79c283ed4",
"packagetype": "sdist",
"python_version": "source",
"requires_python": "<4.0,>=3.11",
"size": 7707,
"upload_time": "2025-09-05T09:27:27",
"upload_time_iso_8601": "2025-09-05T09:27:27.932543Z",
"url": "https://files.pythonhosted.org/packages/a7/44/b582b1bb76cb2536f51cf3d3530dc77ec1868796695af57d8c3f88351969/abs_geolocation_core-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-09-05 09:27:27",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "abs-geolocation-core"
}