Is there a proper filter for Django Rest Framework to work with PostgreSQL InetAddressField

I am using DRF and PostgreSQL to store IP, Subnet and IP Range data. For the filters I wanted to create a filter that resolves the given reach string and checks if a given IP is not only an exact match, but also part of a subnet or IP range in the database. PostgreSQL does have a number of operators that can be used for a lookup in InetAddressFields. PostgreSQL Documenation

But it seems none are supported by Django/DRF. The django.contrib.postgres.fields package seems to have none of the network address fields.

Is there a well supported module or any other way to implement proper filters for InetAddressField in DRF?

Back to Top