--- id: types-geoip2 version: "3.0.0" license: Apache-2.0 license license_treatment: permissive maintenance: active --- # types-geoip2 — Typing stubs for geoip2 License: permissive · Maintenance: active · Downloads: 164.6K/mo ## What it is and what it does types-geoip2 is a PEP 561 type stub package that provides type information for the geoip2 library. It allows static type checkers like mypy, PyCharm, and pytype to understand the types and signatures in geoip2 code, catching type errors before runtime. This is useful when working with older versions of geoip2 that did not include their own type annotations. The package is maintained as part of typeshed, the central repository of type stubs for the Python ecosystem. It depends on types-maxminddb for its own type information. The description notes that geoip2 itself has included type annotations since version 4.0.2, and recommends uninstalling this package if using that version or later. Use it for: - Enable mypy or PyCharm type checking on codebases using older geoip2 releases - Catch type errors in geolocation lookup code during development rather than at runtime - Maintain strict type safety in projects that depend on geoip2 without built-in type support ## Worth the install? AI-flagged interpretation of the facts above — verify before relying. Provides type stubs for the geoip2 package, enabling static type checking of geoip2 code with tools like mypy and PyCharm. Yes, if you are using geoip2 before version 4.0.2 and want static type checking. No, if you are already on geoip2 4.0.2 or later—uninstall this package and use geoip2's built-in type annotations instead. The package itself is stable and permissively licensed. ## Install pip install types-geoip2 uv add types-geoip2 poetry add types-geoip2 ## Installing types-geoip2 Before you install: Low install friction with a single lightweight runtime dependency (types-maxminddb). The package is actively maintained via typeshed, though the latest release was in 2021. License in practice: Licensed under Apache-2.0 (permissive), imposing no restrictions on use in proprietary or open-source projects. Quickstart: pip install types-geoip2 import geoip2.database # Type checker now understands geoip2 types Verify before relying: - Whether geoip2 version 4.0.2 or later is already in use (would make this package unnecessary) - Current maintenance cadence and whether the package will receive updates as geoip2 evolves ## Package facts - License: Apache-2.0 license (permissive) - Python support: unspecified - Install friction: low - Maintenance: active - Downloads: 164.6K/month (top 15,000 on PyPI) - Known vulnerabilities: none known ## Tags type stubs geoip2, mypy geoip2 typing, static type checking geolocation, pep 561 type hints, geoip2 type annotations, type-stubs, static-analysis [View on SkillFed](https://skillfed.io/packages/types-geoip2) · [View on PyPI](https://pypi.org/project/types-geoip2/)