skillfed

types-netaddr

Typing stubs for netaddr

types-netaddr v1.3.0.20260724 151.6K downloads/30d#10,926 on PyPI37
Permissive license Apache-2.0 Active released

What it is and what it does

types-netaddr is a type stub package that provides type annotations for the netaddr library, allowing static type checkers like mypy and pyright to understand and validate code that uses netaddr. Since netaddr itself does not include inline type hints, these stubs are necessary for type-aware development and IDE support.

The package is maintained as part of the typeshed project, the canonical repository of type stubs for the Python ecosystem. It has no runtime dependencies and is designed purely to improve the development experience by enabling static type checking. The stubs target netaddr version 1.3.* and have been validated against mypy 2.3.0 and pyright 1.1.411.

Use it for:

  • Enable mypy or pyright to type-check code that imports and uses netaddr for network operations.
  • Catch type errors in network address handling code before runtime in a CI/CD pipeline.
  • Provide IDE autocomplete and type hints when working with netaddr in editors that support type stubs.
  • Validate that network address objects are used correctly in type-strict projects.

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

Provides type stubs for the netaddr package, enabling static type checkers like mypy and pyright to validate code that uses netaddr.

Yes, if you use netaddr and want static type checking. It has no runtime cost, low friction, and is actively maintained as part of typeshed. Install it alongside netaddr in any project using a type checker. If you don't use a type checker or don't use netaddr, it's not needed.

Install

types-netaddr on PyPI

pip

pip install types-netaddr

uv

uv add types-netaddr

poetry

poetry add types-netaddr

Installing types-netaddr

Before you install

Low install friction with no runtime dependencies. Actively maintained as part of typeshed, with a recent release 21 days ago and tested against mypy 2.3.0 and pyright 1.1.411.

License in practice

Licensed under Apache-2.0 (permissive), allowing use in most projects without restriction.

Quickstart

pip install types-netaddr

# In your code, import netaddr normally; type checkers will use the stubs
import netaddr
addr = netaddr.IPAddress('10.0.0.1')

Requires Python 3.10 or later.

Verify before relying

  • Whether the stubs cover all netaddr 1.3.* APIs or only a subset of the public interface.
  • How frequently the stubs are updated when netaddr itself is updated.
  • Whether installing types-netaddr automatically enables type checking without additional configuration.

Package facts

License Apache-2.0 (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies none
Maintenance actively maintained — 21 days since the last release
Last repo commit
First released
Downloads 151,579/month — #10,926 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: types_netaddr-1.3.0.20260724-py3-none-any.whl

Programming Language :: Python :: 3Typing :: Stubs Only

Tags

type stubs netaddrnetaddr type hintsmypy netaddr annotationsstatic type checking network addressespyright netaddr typesnetaddr typing supporttype checker stubs
type-stubsstatic-typing

More Software Development packages