Official Python SDK for the KUID API.
Project description
KUID SDK for Python
Official Python SDK for the KUID API.
Install
pip install kuid-sdk
Quick start
from kuid_sdk import KuidClient
client = KuidClient("YOUR_API_KEY")
address = client.get_address("AO-LUA-CAC-KDIA")
print(address.to_dict())
print(client.get_navigation_url(address.latitude, address.longitude))
Normalized response
{
"kuid": "AO-LUA-CAC-KDIA",
"address": "Avenida Deolinda Rodrigues",
"latitude": -8.82,
"longitude": 13.24,
}
Features
KuidClientas the main entrypoint.get_address(kuid)with KUID validation.- In-memory cache with a 5 minute TTL.
- Typed exceptions for invalid input, API failures, network failures, and parsing issues.
get_navigation_url(lat, lng)helper.
Error handling
from kuid_sdk import InvalidKuidError, KuidApiError, KuidClient
client = KuidClient("YOUR_API_KEY")
try:
client.get_address("AO-LUA-CAC-KDIA")
except InvalidKuidError as error:
print(error)
except KuidApiError as error:
print(error.status_code, error)
Run the example
set KUID_API_KEY=YOUR_API_KEY
python examples/basic_usage.py
Run tests
python -m unittest discover -s tests
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
kuid_sdk-1.0.0.tar.gz
(7.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file kuid_sdk-1.0.0.tar.gz.
File metadata
- Download URL: kuid_sdk-1.0.0.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
08ed907792ed5bd007fd32c581feefd1754a0368f204e693467b4782969f52db
|
|
| MD5 |
d2f4bf9ecef1c0b136a66a870d757718
|
|
| BLAKE2b-256 |
8136f93290ad9225b7bfc12e1e85147a397903e4e079f55fb08c82322f5d2255
|
File details
Details for the file kuid_sdk-1.0.0-py3-none-any.whl.
File metadata
- Download URL: kuid_sdk-1.0.0-py3-none-any.whl
- Upload date:
- Size: 6.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5dda36c25fe36b4e4831f8e302ff9e38f09fcb3f21323aa49a3534fd2bd6ce39
|
|
| MD5 |
bc30c2b0efb00ce11ee4eb93d3a5528b
|
|
| BLAKE2b-256 |
72db90667b06f81140abde5dce16cba8b1e32f411fe47bd11e806296a76adb11
|