Metadata-Version: 2.1
Name: elara-route
Version: 0.1.0
Summary: Python SDK for the Elara Route API — road, drone, maritime, AV routing + geocoding + fleet tracking
Author-email: ".LEKOLA · CODE ATELIER" <hello@elara-cortex.com>
License: MIT License
        
        Copyright (c) 2026 Elara Cortex (www.elara-cortex.com) — Institute for Decision Systems & Number Theory
        Author: .LEKOLA · CODE ATELIER
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Project-URL: Homepage, https://route.elara-cortex.com
Project-URL: Documentation, https://route.elara-cortex.com/developers
Project-URL: Repository, https://github.com/ELARA-CORTEX-MATH-INFRA/elara-route-python
Project-URL: Issues, https://github.com/ELARA-CORTEX-MATH-INFRA/elara-route-python/issues
Keywords: routing,navigation,geocoding,fleet,drone,africa,api,sdk,elara
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: <4.0,>=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Provides-Extra: dev
Requires-Dist: pytest<9.0.0,>=7.4.0; extra == "dev"
Requires-Dist: pytest-mock<4.0.0,>=3.12.0; extra == "dev"
Requires-Dist: build<2.0.0,>=1.0.0; extra == "dev"
Requires-Dist: twine<6.0.0,>=4.0.0; extra == "dev"

# elara-route — Python SDK

The official Python client for the [Elara Route API](https://route.elara-cortex.com/developers) — road, drone, maritime, AV routing + geocoding + fleet tracking.

**No routing logic ships in this package.** All algorithms run server-side at `route.elara-cortex.com`. Your IP stays protected.

## Install

```bash
pip install elara-route
```

Or from source:

```bash
cd D:\elara_sdk
pip install -e ".[dev]"
```

Zero runtime dependencies. Pure Python 3.9+ standard library.

## Quick start

```python
from elara_route import ElaraClient

client = ElaraClient(api_key="elara_your_key_here")

route = client.route(
    from_=[-26.1076, 28.0567],
    to=[-26.2041, 28.0473],
)
print(f"{route['distance_km']:.1f} km — {route['eta_min']:.0f} min")
```

Or create an account programmatically:

```python
client = ElaraClient.signup("you@company.com", "your-secure-password")
route = client.route(from_=[-26.1, 28.0], to=[-26.2, 28.04])
```

## All endpoints

| Method | Endpoint | Description |
|--------|----------|-------------|
| `route()` | POST `/v1/route` | A→B road route |
| `reroute()` | POST `/v1/reroute` | Compact reroute delta (~80% smaller payload) |
| `matrix()` | POST `/v1/matrix` | Distance/time matrix |
| `optimize()` | POST `/v1/optimize` | Multi-stop VRP order |
| `drone_route()` | POST `/v1/drone/route` | Drone corridor routing |
| `maritime_route()` | POST `/v1/maritime/route` | Sea routing |
| `av_route()` | POST `/v1/av/route` | Autonomous-vehicle routing |
| `geocode()` | GET `/v1/geocode` | Address → coordinates |
| `reverse()` | GET `/v1/reverse` | Coordinates → address |
| `nearby()` | GET `/v1/nearby` | POIs by category |
| `signup()` | POST `/v1/account/signup` | Create account + API key |
| `usage()` | GET `/v1/account/usage` | Quota and usage |
| `assets_list()` | GET `/v1/assets` | List fleet assets |
| `asset_create()` | POST `/v1/assets` | Register asset |
| `asset_route()` | POST `/v1/assets/{id}/route` | Attach route to asset |
| `asset_position()` | POST `/v1/assets/{id}/position` | Push live GPS |
| `asset_live()` | GET `/v1/assets/{id}/live` | Live position vs plan |

### Nearby categories (OpenAPI enum)

`atm`, `cafe`, `charging`, `checkpoint`, `food`, `fuel`, `hospital`, `hotel`, `parking`, `police`, `speed_camera`

## Error handling

```python
from elara_route import ElaraAuthError, ElaraRateLimitError, ElaraValidationError

try:
    route = client.route(from_=[-26.1, 28.0], to=[-26.2, 28.04])
except ElaraValidationError as e:
    print("Bad input:", e.detail)
except ElaraRateLimitError as e:
    print(f"Retry in {e.retry_after}s")
except ElaraAuthError:
    print("Check your API key")
```

## Run tests

```bash
pytest tests/ -v
```

## Run example

```bash
set ELARA_API_KEY=elara_your_key
python examples/quickstart.py
```

## Free tier

25,000 routes/month, no credit card. [Get your key →](https://route.elara-cortex.com/developers)

## License

MIT — see [LICENSE](LICENSE).

---

**ELARA·CORTEX** · Mathematical infrastructure for complex systems · Institute for Decision Systems & Number Theory

**AUTHOR:** .LEKOLA · CODE ATELIER · GitHub: [ELARA-CORTEX-MATH-INFRA](https://github.com/ELARA-CORTEX-MATH-INFRA)
