wya
wya is an ip asn and geolocation lookup tool built with flask and geolite2 databases. it dumps out a json that is similar to ipinfo.io, with additional ptr record validation.
# get a pong
$ curl https://ip.example.com/ping
PONG
# query a specific public ip
$ curl https://ip.example.com/`dig +short facebook.com`
{
"ip": "157.240.253.35",
"asn": "AS32934",
"org": "FACEBOOK",
"hostname": [
{
"edge-star-mini-shv-02-fra5.facebook.com.": {
"resolves_back": true
}
}
],
"country": "DE",
"city": "Frankfurt am Main",
"region": "Hesse",
"loc": "50.1187,8.6842",
"tz": "Europe/Berlin"
}
# query your own ip
$ curl https://ip.example.com
{
"ip": "93.184.215.14",
"asn": "AS15133",
"org": "EDGECAST",
"hostname": null,
"country": "US",
"city": null,
"region": null,
"loc": "37.751,-97.822",
"tz": "America/Chicago"
}
installation
# 1. get the compose file
mkdir wya/; cd wya/
curl -LO \
https://raw.githubusercontent.com/gottaeat/wya/master/docker-compose.yml
# 2. create the volume mount for geolite2 databases
mkdir data/
for i in ASN City; do
curl -Lo ./data/GeoLite2-${i}.mmdb https://git.io/GeoLite2-${i}.mmdb
done
# 3. docker compose up
docker compose up -d
wya takes a SIGHUP to reload the databases without service interruption.
example reverse proxy setup
server {
listen 80;
server_name ip.example.com;
return 301 https://$host:443$request_uri;
}
server {
listen 443 ssl;
server_name ip.example.com;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Connection $http_connection;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}
Metadata
Release files for wya 0.2.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 | |
|---|---|---|---|
| wya-0.2.1.tar.gz | 16.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| wya-0.2.1-py2.py3-none-any.whl | Python 3, Python 2 | none | any | Details |
Total release size: 35.1 kB
Release files / wya-0.2.1.tar.gz
| Download URL | wya-0.2.1.tar.gz |
|---|---|
| Size | 16.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e9e0b81a6b53fc8a2990728a13ba6c727391281c2593ab0988bf317e0c8c77c2
|
|
BLAKE2b-256 checksum How to use checksums |
3653c9b99105505aecd59bb02c2fb5294b612e470a0a95381e628e9d81e1db0e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Jun 21, 2025.
Transparency logRelease files / wya-0.2.1-py2.py3-none-any.whl
| Download URL | wya-0.2.1-py2.py3-none-any.whl |
|---|---|
| Size | 18.2 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
64f99db2a4c3961bd0411316f398bc45f90c3d831fa7cf7fc1a05ea5bb8dff9e
|
|
BLAKE2b-256 checksum How to use checksums |
f1131454770fff38c61cc017c84741554f2626c1c5fe162cf489e7dc72ededb3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Jun 21, 2025.
Transparency log