Skip to main content

Cliente oficial de Eviav — APIs geoespaciales (geocoding, ruteo, mapas, isócronas, IA) para LATAM. Sync + async sobre httpx.

Project description

eviav — Python client

Cliente oficial de Eviav para Python. APIs geoespaciales (geocoding, ruteo, mapas, isócronas, optimización de flota, IA) para LATAM. Sync + async sobre httpx.

pip install eviav

Quickstart (sync)

from eviav import Client

client = Client(api_key="eviav_live_…")

res = client.geocode("Av. Amazonas, Quito")
print(res["results"][0]["lat"], res["results"][0]["lon"])

# Ruteo
route = client.directions([(-78.51, -0.22), (-78.48, -0.12)], steps=True)
print(route["routes"][0]["distance"], "metros")

client.close()

O como context manager:

with Client(api_key="…") as client:
    res = client.geocode("Quito")

Quickstart (async)

import asyncio
from eviav import AsyncClient

async def main():
    async with AsyncClient(api_key="eviav_live_…") as client:
        res = await client.geocode("Quito")
        print(res["results"][0]["label"])

asyncio.run(main())

Métodos

Todos disponibles en Client (sync) y AsyncClient (async, awaitables):

Método Endpoint
geocode(q, lat=, lon=, limit=) GET /v1/geocode
reverse(lat, lon) GET /v1/reverse
search(text, lat=, lon=, limit=) GET /v1/search
places(lat, lon, category, radius=) GET /v1/places
directions(coordinates, steps=, profile=) GET /v1/directions
matrix(coordinates) GET /v1/matrix
optimize(coordinates, roundtrip=) POST /v1/optimization
fleet(body) POST /v1/fleet
match(coordinates) GET /v1/match
nearest(point, number=) GET /v1/nearest
isochrone(lat, lon, contours=, costing=) GET /v1/isochrone
elevation(lat, lon) GET /v1/elevation
timezone(lat, lon) GET /v1/timezone
tilequery(lat, lon, radius=) GET /v1/tilequery
list_datasets(layer=) GET /v1/datasets
grounding(query, lat=, lon=) POST /v1/grounding

Las coordenadas son tuplas (lon, lat) (formato GeoJSON).

Manejo de errores

from eviav import Client, EviavError

try:
    client.geocode("")
except EviavError as e:
    print(e.status, e.code, e.request_id)

Reintentos

Reintenta automáticamente en 429 y 5xx con backoff exponencial, honrando el header Retry-After. Configurable con max_retries=.

Licencia

MIT © Eviav

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

eviav-0.1.0.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

eviav-0.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file eviav-0.1.0.tar.gz.

File metadata

  • Download URL: eviav-0.1.0.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for eviav-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5cc9fd9d29279983dcce6e45a7cfc76b44579e8cc9229af9c110b6926a7a2c20
MD5 90a3658e887579b3fa7e28bf947bc18e
BLAKE2b-256 3f78933a4c62b08d4b4a8cf4fdeede3f2411cb80790f70efdc0b0253e84862ff

See more details on using hashes here.

File details

Details for the file eviav-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: eviav-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for eviav-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 366e5cd3d5067f8587a58c7a44cfa1f231086b5b2ad7edaafecd38d2f6abf10f
MD5 a6f9c71d623c87daa1c8f834193b6780
BLAKE2b-256 da2eb50c12bc70f6b95a5296982089614229751b790525f910b0ac8e5f829921

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page