Skip to main content

Official Python SDK for the Lat·Lng geospatial conversion API (lat-lng.com).

Project description

lat-lng (Python SDK)

Official Python SDK for the Lat·Lng geospatial conversion API.

Install

pip install lat-lng-sdk

Usage

from lat_lng import LatLngClient

client = LatLngClient("latlng_live_...")  # your API key

result = client.convert(open("input.kml", "rb"), to="geojson")
with open("output.geojson", "wb") as f:
    f.write(result.download())

Supported formats: geojson, kml, csv, wkt, gpx, topojson, wkb, shapefile, gml, flatgeobuf, geoparquet.

Typed exceptions: AuthError, ValidationError, RateLimitError (auto-retried on 429), QuotaExceededError, ConversionFailedError.

Async (large files via URL)

from lat_lng import LatLngClient
client = LatLngClient("latlng_live_...")

job = client.convert_async(input_url="https://example.com/big.shp.zip", output_format="geojson")
done = client.wait_for_job(job.job_id)
data = done.download()

Async takes a public URL, not a local upload.

Webhook verification

from lat_lng import verify_webhook_signature

ok = verify_webhook_signature(raw_body, request.headers["X-Webhook-Signature"], webhook_secret)

Pass the same webhook_secret to convert_async(..., webhook_url=..., webhook_secret=...) to have callbacks signed.

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

lat_lng_sdk-0.3.0.tar.gz (8.1 kB view details)

Uploaded Source

Built Distribution

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

lat_lng_sdk-0.3.0-py3-none-any.whl (7.1 kB view details)

Uploaded Python 3

File details

Details for the file lat_lng_sdk-0.3.0.tar.gz.

File metadata

  • Download URL: lat_lng_sdk-0.3.0.tar.gz
  • Upload date:
  • Size: 8.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lat_lng_sdk-0.3.0.tar.gz
Algorithm Hash digest
SHA256 2d000231e86be1e6b9ebd917e9231e4052995bf461325e963439bab0ad76c757
MD5 4e3f10dd871d7fd0f8086e610d214bc7
BLAKE2b-256 97424dbc5739e886d915d92815e3842e4352c798374a5a0c36c3af9e05f07628

See more details on using hashes here.

Provenance

The following attestation bundles were made for lat_lng_sdk-0.3.0.tar.gz:

Publisher: publish-python.yml on mjannis1/lat-lng

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lat_lng_sdk-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: lat_lng_sdk-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 7.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for lat_lng_sdk-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b529a58db7e53890bcccc7e56c463c8c807b8a3ddfded1ef543cc437cc4d286c
MD5 fe0071baf37e4b04f2b2298930f67604
BLAKE2b-256 74f19c72800da83e0a567df8b3ae91c855d16e1c49d8fd1bdce2b4587b65ae42

See more details on using hashes here.

Provenance

The following attestation bundles were made for lat_lng_sdk-0.3.0-py3-none-any.whl:

Publisher: publish-python.yml on mjannis1/lat-lng

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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