Skip to main content

IP Lookup plugin for Sopel

Project description

Sopel plugin .ip command:

16:22 <SnoopJ> !ip 8.8.8.8
16:22 <testibot> [IP/Host Lookup] Downloading GeoIP database, please wait...
16:22 <testibot> [IP/Host Lookup] Hostname: dns.google | Location: United States | ISP: AS15169 GOOGLE

Install

The recommended way to install this plugin is to use pip:

$ pip install sopel-iplookup

Note that this plugin requires Python 3.7+ and Sopel 7.1+. It won’t work on Python versions that are not supported by the version of Sopel you are using.

Configure

sopel-iplookup can be configured by invoking Sopel’s interactive wizard:

$ sopel-plugins configure iplookup
Configure Sopel GeoIP Lookup Plugin
Please consult sopel-iplookup's README to learn about its settings.

Path to existing GeoIP db files (leave empty to auto download):
MaxMind license key (optional): (hidden input)

By default, sopel-iplookup will look in a few standard locations for GeoIP database files. If it can’t find existing database files, it will download them from an automated mirror on GitHub.

You can optionally provide your own MaxMind license key, and the plugin will download directly from them instead. Alternatively, if your OS distribution already has GeoIP database files kept up-to-date by the system package manager, you can provide the path where those files are stored.

Notes

This plugin replaces a built-in Sopel plugin formerly called ip, you may need to update your bot configuration to replace ip with iplookup if you are e.g. excluding this plugin.

Changelog

1.1.0

  • plugin, config: add config field for MaxMind license key (#4, #5)
    • If no MaxMind key is provided, the plugin will download from a mirror of the .mmdb files on GitHub. With a license key, the plugin downloads directly from MaxMind.

  • plugin: slightly better logging during/after DB downloads

  • meta: add automated release workflow using PyPI Trusted Publishing (#7)

1.0.0

Initial release. Replaces ip plugin formerly shipped as part of sopel.

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

sopel_iplookup-1.1.0.tar.gz (6.8 kB view hashes)

Uploaded Source

Built Distribution

sopel_iplookup-1.1.0-py3-none-any.whl (7.5 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page