$npx skillfedfor your agent

django-netfields

Django PostgreSQL netfields implementation

Worth itPyPI UtilitiesReleased Mar 2026179.6K downloads / moBSDPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — django_netfields-1.4.1-py3-none-any.whl
v1.4.1 · released 2026-03-05 · Python >=3.5 · 2 runtime deps: netaddr, django

Yes. The package is actively maintained, has no known vulnerabilities, and solves a real problem—efficient network data handling in Django+PostgreSQL. Install if you need to store or query IP/CIDR/MAC data; skip if you're not using PostgreSQL or don't need network-specific lookups.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires PostgreSQL backend; psycopg2 or psycopg driver must be installed separately.
  • Django >= 1.11 required.
  • Low friction: pure Python wheel with only netaddr and django as runtime dependencies.

License · maintenance · safety

BSD (permissive) — BSD license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

last release 2026-03-05 (162 days) · last repo commit 2026-03-05 · 162 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 179,571 downloads/mo, #10,168 on PyPI

Verify before relying

pip install django-netfields

from netfields import InetAddressField, NetManager
from django.db import models

class Example(models.Model):
    inet = InetAddressField()
    objects = NetManager()

# Query with network lookups
Example.objects.filter(inet__net_contained='10.0.0.0/8')
  • Whether the package supports Django versions newer than 1.11
  • Performance characteristics of network lookups on large datasets
  • Compatibility with psycopg2 vs. psycopg driver versions
Same gist for agents: .md · .json

What it is and what it does

django-netfields extends Django's ORM with proper PostgreSQL network data types, replacing the inefficient built-in IP fields with native INET, CIDR, MACADDR, and MACADDR8 field types. The package maps these PostgreSQL types to Python's ipaddress module (for IP fields) and netaddr.EUI (for MAC fields), eliminating costly HOST() casts in queries and enabling IPv6 support.

The package includes NetManager, which unlocks advanced network-based lookups directly in the ORM—containment checks, overlap detection, family matching, prefix length filtering, and more—corresponding to PostgreSQL's native network functions. It also exposes Postgres network functions (Family, Masklen, Broadcast, etc.) as Django database functions for complex queries and annotations.

Use it for

  • Store and query IP addresses and subnets efficiently in Django models backed by PostgreSQL
  • Perform network containment and overlap queries without application-level filtering
  • Track MAC addresses in network device or inventory models
  • Build IP-based access control or firewall rule systems with native database queries
  • Annotate models with extracted network metadata (family, netmask length, broadcast address)

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

Worth it

Yes.

The package is actively maintained, has no known vulnerabilities, and solves a real problem—efficient network data handling in Django+PostgreSQL. Install if you need to store or query IP/CIDR/MAC data; skip if you're not using PostgreSQL or don't need network-specific lookups.

Install

django-netfields on PyPI

Before you install

Low friction: pure Python wheel with only netaddr and django as runtime dependencies. Actively maintained with a recent commit on 2026-03-05 and no known vulnerabilities.

Requires PostgreSQL backend; psycopg2 or psycopg driver must be installed separately. Django >= 1.11 required.

License in practice

BSD license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.

Quickstart

pip install django-netfields

from netfields import InetAddressField, NetManager
from django.db import models

class Example(models.Model):
    inet = InetAddressField()
    objects = NetManager()

# Query with network lookups
Example.objects.filter(inet__net_contained='10.0.0.0/8')

Verify before relying

  • Whether the package supports Django versions newer than 1.11
  • Performance characteristics of network lookups on large datasets
  • Compatibility with psycopg2 vs. psycopg driver versions

Package facts

LicenseBSD permissive
Python supportSupports the current Python release >=3.5
Install frictionLow. Pure-Python wheel
Runtime dependencies
2 packages
netaddrdjango
MaintenanceActively maintained 162 days since the last release
Last repo commit
First released
Downloads179,571 / month, #10,168 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 5 - Production/StableEnvironment :: Web EnvironmentFramework :: DjangoIntended Audience :: DevelopersLicense :: OSI Approved :: BSD LicenseOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3Topic :: Utilities

Evidence: django_netfields-1.4.1-py3-none-any.whl

Tags

Capabilities
django postgresql network fieldsip address field djangocidr network django ormmac address field djangopostgresql inet field djangonetwork lookup djangoipv6 django model field
Topics
postgresqlnetwork-dataorm-extension

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “django postgresql network fields”

  • django-netfieldsProvides Django model fields for PostgreSQL network types (INET,…
  • django-citextProvides PostgreSQL CIText field types for Django models, enabling…
  • drf-extra-fieldsProvides specialized serializer fields for Django REST Framework,…

Give your agent the search over MCP, or paste the wish link into any chat.

More Utilities packages

idna Worth it
PyPI · Python Modules · released Jun 2026

Converts domain names between Unicode and ASCII-compatible encoding (Punycode) according to IDNA 2008 and Unicode Technical Standard 46, with security validation and broader script coverage than the standard library.

Install it if you work with internationalized domain names, need to validate domains, or use HTTP clients that depend on it transitively.

BSD-3-Clausepure Python · 3.9+
1.8Bdownloads / mo
charset-normalizer Worth it
PyPI · Utilities · released Aug 2026

Detects and normalizes text encoding from unknown or ambiguous sources, supporting all IANA character sets that Python's core library provides codecs for, with the ability to register custom codecs.

permissive licensepure Python · 3.7+
1.7Bdownloads / mo
setuptools Worth it
PyPI · Python Modules · released Aug 2026

Setuptools is a Python build backend and package management tool that handles building, distributing, and installing Python packages, including support for C/C++ extension modules.

MITpure Python · 3.10+
1.6Bdownloads / mo
pluggy Worth it
PyPI · Libraries · released May 2025

Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.

Install it if you're building an extensible application or framework.

MITpure Python · 3.9+aging
1.3Bdownloads / mo
Pygments Worth it
PyPI · Utilities · released Mar 2026

Pygments is a syntax highlighter that colorizes source code and text in over 500 languages and formats, outputting to HTML, LaTeX, RTF, SVG, images, or ANSI terminal sequences.

Install it if you need to display or transform source code.

BSD-2-Clausepure Python · 3.9+
1.3Bdownloads / mo
six With conditions
PyPI · Libraries · released Dec 2024

Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.

MITpure Python
1.2Bdownloads / mo

See also django-allow-cidr · netaddr · django-citext · ipaddress · iptools · django-user-sessions · IPy · py-radix · ipaddr