types-ipaddress
Typing stubs for ipaddress
What it is and what it does
This package provides PEP 561 type stub definitions for Python's standard library ipaddress module. Type stubs are metadata files that describe the types and signatures of functions and classes, allowing static type checkers to understand and validate code that uses ipaddress without needing to analyze the standard library source itself.
The stubs are maintained as part of the typeshed project and are generated from its repository. When installed, they enable tools like mypy, PyCharm, and pytype to catch type errors in code working with IP addresses, networks, and related operations. This is particularly useful in larger codebases where type safety helps prevent bugs before runtime.
Use it for:
- Enable mypy or pyright to type-check code that parses or validates IP addresses
- Provide IDE autocomplete and type hints for ipaddress module usage in development environments
- Enforce type safety in network utilities or infrastructure-as-code tools that work with IP ranges
- Validate IP address handling in security or networking libraries during development
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
Provides type stubs for Python's standard library ipaddress module, enabling static type checkers like mypy and PyCharm to validate code that works with IP addresses.
Yes, if you use a static type checker on code that imports ipaddress. It has no runtime cost, no dependencies, and a permissive license. The main caveat is that the package has not been released since 2022-01-30; verify that type coverage matches your Python version and ipaddress usage patterns before relying on it in production type-checking workflows.
Install
types-ipaddress on PyPI
pip
pip install types-ipaddressuv
uv add types-ipaddresspoetry
poetry add types-ipaddressInstalling types-ipaddress
Before you install
Low friction installation with no runtime dependencies. Maintenance is active with recent repository commits, though the package itself has not been released since 2022-01-30.
License in practice
Apache-2.0 permissive license allows use in most projects without restriction, including commercial and proprietary software.
Quickstart
pip install types-ipaddress
# Then use in your code with type checking enabled:
import ipaddress
addr = ipaddress.ip_address('example')
Verify before relying
- Whether type stub coverage is complete for all ipaddress module features in current Python versions
- Compatibility with Python versions released after the 2022-01-30 package date
- Whether the stubs reflect changes to ipaddress since the last package release
Package facts
| License | Apache-2.0 license (permissive) |
| Python support | not specified |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | none |
| Maintenance | actively maintained — 1,657 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 737,271/month — #5,188 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: types_ipaddress-1.0.8-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-backportsProvides PEP 561 type stubs for the backports…
permissive · top 15,000 on PyPI
types-dataclassesProvides type stubs for Python's dataclasses…
permissive · top 15,000 on PyPI
types-attrsProvides PEP 561 type stubs for the attrs…
permissive · top 15,000 on PyPI
types-jwtProvides type stubs for the jwt package,…
permissive · top 15,000 on PyPI
types-cryptographyProvides PEP 561 type stubs for the…
permissive · top 5,000 on PyPI
types-FlaskProvides PEP 561 type stubs for Flask to enable…
permissive · top 5,000 on PyPI
types-WerkzeugProvides PEP 561 type stubs for Werkzeug,…
permissive · top 5,000 on PyPI
types-geoip2Provides type stubs for the geoip2 package,…
permissive · top 15,000 on PyPI
typepyTypepy checks, validates, and converts Python…
permissive · top 5,000 on PyPI
cached-ipaddressCaches IP address object construction and…
permissive · top 15,000 on PyPI