myip

Nim wrapper for the MyIP (https://my-ip.io) API

Wrapper score 15/100 · tests present · no docs generated

Wraps a native library — check OS Compatibility below for platform-specific linking notes.

Summary

Latest Version 0.1.0
License GPL-3.0-only
CI Status Failing
Downloads 0
Last Indexed 2026-07-21 05:27

Authors

  • Nemuel Wainaina

Installation

nimble install myip
choosenim install myip
git clone https://github.com/nemuelw/myip

OS Compatibility

Platform Linux macOS Windows FreeBSD OpenBSD NetBSD Android iOS WASM Embedded
myip - - - - - - -

Dependencies

Package Version Optional
nim >= 1.6 No
jsony - No

Source

Repository https://github.com/nemuelw/myip
Homepage https://github.com/nemuelw/myip
Registry Source nimble_official

README

myip

Nim client for the MyIP (https://my-ip.io) API

Installation

Run this command in your project directory:

nimble install myip

Usage

Import the package

import myip

Get IP info (IPv4 and IPv6 supported)

# getIP(): IP
let ipInfo = getIP()
echo ipInfo

Sample output:

{
  "success": true,
  "ip": "23.88.33.229",
  "type": "IPv4",
  "country": {
    "code": "DE",
    "name": "Germany"
  },
  "region": "Bavaria",
  "city": "Gunzenhausen",
  "location": {
    "lat": 49.1156,
    "lon": 10.7511
  },
  "timeZone": "Europe/Berlin",
  "asn": {
    "number": 24940,
    "name": "Hetzner Online GmbH",
    "network": "23.88.0.0/17"
  }
}

Get IPv4 info

# getIPv4(): IP
let ipInfo = getIPv4()
echo ipInfo.ip

Sample output: 181.211.201.172

Get IPv6 info

# getIPv6(): IP
let ipInfo = getIPv6()
echo ipInfo.ip

Sample output: 3d0c:fe27:142e:f2fd:8c00:c1f8:c301:4dc0

Contributing

Contributions are welcome! Feel free to create an issue or open a pull request.

License

This project is licensed under the terms of the GNU GPL v3.0 License.