watch-ip-sdk
Official Python SDK for the Watch-IP visitor geolocation API.
Watch-IP looks up the geolocation of whoever is currently loading your page — it's designed to be called directly from the visitor's own browser with a publishable, origin-locked API key. There is no server-to-server or arbitrary-IP lookup mode; see the docs for why.
Calling it from Python therefore means calling it from your own server rather than a visitor's
browser. That's a legitimate way to use this SDK for testing or internal tooling, but the request
won't carry the Origin header a browser fetch sends automatically — and origin-locking means
the API will reject it with origin_not_allowed unless you set origin= to one of the key's
allowed origins yourself.
Install
pip install watch-ip-sdk
Usage
from watch_ip import WatchIP
client = WatchIP("wip_pub_xxxxxxxx", origin="https://example.com")
geo = client.get_geo()
print(geo["country"], geo["city"], geo["timezone"])
Or, for a one-off call without holding onto a client instance:
from watch_ip import get_geo
geo = get_geo("wip_pub_xxxxxxxx", origin="https://example.com")
Error handling
Every failure — a rejected request (invalid key, disallowed origin, rate limit) or a network
error — raises a WatchIPError with a status and a stable code:
from watch_ip import WatchIP, WatchIPError
client = WatchIP("wip_pub_xxxxxxxx", origin="https://example.com")
try:
geo = client.get_geo()
except WatchIPError as err:
print(err.code, err.status, err)
# e.g. "origin_not_allowed" 403 "This origin is not authorized for this API key."
Optional fields and timeouts
geo = client.get_geo(include=["hostname"], timeout=5.0)
Requirements
Python 3.9+. No runtime dependencies (uses urllib from the standard library).
License
MIT
Metadata
Release files for watch-ip-sdk 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| watch_ip_sdk-0.1.1.tar.gz | 6.1 kB | With provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| watch_ip_sdk-0.1.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.9 kB
Release files / watch_ip_sdk-0.1.1.tar.gz
| Download URL | watch_ip_sdk-0.1.1.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b3edf7e206c6ee34a5f006b36374c91de47ce5e4f072206d89e1312ce9c811a9
|
|
BLAKE2b-256 checksum How to use checksums |
251a402d99154725724c0393c8b0bd1f438048e9b9ce8d7f0e85a51e3246d817
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.
Transparency logRelease files / watch_ip_sdk-0.1.1-py3-none-any.whl
| Download URL | watch_ip_sdk-0.1.1-py3-none-any.whl |
|---|---|
| Size | 5.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fccc40ba954c294204cebdfa05c7b07f1b71d298c7e8b2da60d408ec8637203f
|
|
BLAKE2b-256 checksum How to use checksums |
0b8048e5f199f32a930b8883b549f281b2879bef4cb6bb0ed88c41168ce1b4bb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.
Transparency logSecurity for watch-ip-sdk 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
All 2 files in this release have been uploaded with provenance metadata.
Attestation for watch_ip_sdk-0.1.1.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Sep 5, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.