types-netaddr
Typing stubs for netaddr
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-netaddruv
uv add types-netaddrpoetry
poetry add types-netaddrInstalling 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
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-mypy-extensionsProvides type stubs for mypy-extensions,…
permissive · top 15,000 on PyPI
types-pyasn1Provides type stubs for the pyasn1 package,…
permissive · top 5,000 on PyPI
types-google-cloud-ndbProvides type stubs for google-cloud-ndb,…
permissive · top 15,000 on PyPI
types-pyflakesProvides type stubs for the pyflakes static…
permissive · top 15,000 on PyPI
types-networkxProvides type stubs for networkx to enable…
permissive · top 5,000 on PyPI
types-pytzProvides type stubs for the pytz timezone…
permissive · top 1,000 on PyPI
types-httplib2Provides type stubs for the httplib2 HTTP…
permissive · top 5,000 on PyPI
types-oauthlibProvides type stubs for the oauthlib package,…
permissive · top 5,000 on PyPI
types-boltonsProvides type stubs for the boltons library,…
permissive · top 15,000 on PyPI
types-waitressProvides type stubs for the waitress WSGI…
permissive · top 15,000 on PyPI