types-geoip2
Typing stubs for geoip2
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 on this page — 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
types-geoip2 on PyPI
pip
pip install types-geoip2uv
uv add types-geoip2poetry
poetry add types-geoip2Installing 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 | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 1 — types-maxminddb |
| Maintenance | actively maintained — 1,812 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 164,560/month — #10,543 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_geoip2-3.0.0-py3-none-any.whl
Tags
More Software Development packages
Provides backported and experimental type hints…
permissive · top 100 on PyPI
numpyNumPy provides an N-dimensional array object…
permissive · top 100 on PyPI
fastapiFastAPI is a Python web framework for building…
permissive · top 100 on PyPI
annotated-docProvides a way to document function parameters,…
permissive · top 100 on PyPI
typerTyper builds command-line applications from…
permissive · top 1,000 on PyPI
distlibDistlib provides low-level packaging utilities…
permissive · top 1,000 on PyPI
types-maxminddbProvides type stubs for the maxminddb package,…
permissive · top 15,000 on PyPI
types-Jinja2Provides PEP 561 type stubs for Jinja2,…
permissive · top 5,000 on PyPI
types-FlaskProvides PEP 561 type stubs for Flask to enable…
permissive · top 5,000 on PyPI
types-pkg-resourcesProvides type stubs for pkg_resources to enable…
permissive · top 15,000 on PyPI
types-PyJWTProvides type stubs for PyJWT to enable static…
permissive · top 15,000 on PyPI
types-ipaddressProvides type stubs for Python's standard…
permissive · top 15,000 on PyPI
types-WerkzeugProvides PEP 561 type stubs for Werkzeug,…
permissive · top 5,000 on PyPI
types-clickProvides PEP 561 type stubs for the click…
permissive · top 5,000 on PyPI
types-filelockProvides type stubs for the filelock package to…
permissive · top 15,000 on PyPI
types-backportsProvides PEP 561 type stubs for the backports…
permissive · top 15,000 on PyPI