The IpInfoDb class simplifies geolocation tasks based on IP addresses. I developed this class one day during a trip when I was feeling particularly bored. Its functionality is straightforward and becomes evident when you explore the code. Once you provide the IP and your API key to the API, you can utilize the functions to retrieve all the necessary data effortlessly.
To use this class, you'll need:
- The
.pyfile of the class (you can download it as a zip or clone this repository) - The
requestslibrary and the Pythonjsonlibrary (they are standard, but if you don't have them, you can install them using pip) - An IP Info API key, which you can obtain here
And that's all you need to get started!
While I have thoroughly tested this library and it generally works well, I'm only human. There might be bugs, code errors, suboptimal optimizations, or other issues. Additionally, I should mention (although it might be evident) that this is my first GitHub repository, and I'm still learning the ropes of this platform.
Feel free to open a pull request or an issue to report a bug or suggest improvements. Your feedback is invaluable!