skillfed

types-ipaddress

Typing stubs for ipaddress

types-ipaddress v1.0.8 737.3K downloads/30d#5,188 on PyPI5,108
Permissive license Apache-2.0 license Active released

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

uv

uv add types-ipaddress

poetry

poetry add types-ipaddress

Installing 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

License :: OSI Approved :: Apache Software LicenseTyping :: Stubs Only

Tags

type stubs ipaddressmypy ipaddress typesstatic type checking ip addressespep 561 stubsipaddress type hintstypeshed stubs
type-stubsstatic-typing

More Software Development packages