skillfed

types-geoip2

Typing stubs for geoip2

types-geoip2 v3.0.0 164.6K downloads/30d#10,543 on PyPI5,108
Permissive license Apache-2.0 license Active released

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-geoip2

uv

uv add types-geoip2

poetry

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 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

License :: OSI Approved :: Apache Software LicenseTyping :: Typed

Tags

type stubs geoip2mypy geoip2 typingstatic type checking geolocationpep 561 type hintsgeoip2 type annotations
type-stubsstatic-analysis

More Software Development packages