IPInfoManager¶
The IPInfoManager class handles IP geolocation using IPInfo's database with a singleton pattern.
Methods¶
def initialize(self): """Initialize and download the database if needed."""
def get_country(self, ip: str) -> str | None: """Get country code for an IP address."""
def close(self): """Close the database connection."""