diff --git a/src/vpp-api/python/vpp_papi/__init__.py b/src/vpp-api/python/vpp_papi/__init__.py
index e1b7781..c771295 100644
--- a/src/vpp-api/python/vpp_papi/__init__.py
+++ b/src/vpp-api/python/vpp_papi/__init__.py
@@ -1,8 +1,8 @@
 from .vpp_papi import FuncWrapper, VPP, VppApiDynamicMethodHolder  # noqa: F401
-from .vpp_papi import VppEnum, VppEnumType  # noqa: F401
+from .vpp_papi import VppEnum, VppEnumType, VppEnumFlag  # noqa: F401
 from .vpp_papi import VPPIOError, VPPRuntimeError, VPPValueError  # noqa: F401
 from .vpp_papi import VPPApiClient  # noqa: F401
-from .vpp_papi import VPPApiJSONFiles # noqa: F401
+from .vpp_papi import VPPApiJSONFiles  # noqa: F401
 from . macaddress import MACAddress, mac_pton, mac_ntop  # noqa: F401
 
 # sorted lexicographically
diff --git a/src/vpp-api/python/vpp_papi/tests/test_vpp_papi.py b/src/vpp-api/python/vpp_papi/tests/test_vpp_papi.py
index 7effe68..99acb7c 100644
--- a/src/vpp-api/python/vpp_papi/tests/test_vpp_papi.py
+++ b/src/vpp-api/python/vpp_papi/tests/test_vpp_papi.py
@@ -23,7 +23,6 @@
 
 
 class TestVppPapiVPPApiClient(unittest.TestCase):
-
     def test_getcontext(self):
         vpp_papi.VPPApiClient.apidir = '.'
         c = vpp_papi.VPPApiClient(testmode=True, use_socket=True)
@@ -57,7 +56,6 @@
 
 
 class TestVppTypes(unittest.TestCase):
-    
     def test_enum_from_json(self):
         json_api = """\
 {
@@ -114,9 +112,126 @@
         self.assertTrue(str(t).startswith("VPPEnumType"))
         self.assertEqual(t.name, type_name)
 
+    def test_enumflagmixed_from_json(self):
+        json_api = """\
+{
+    "enums": [
+
+        [
+            "address_family",
+            [
+                "ADDRESS_IP4",
+                0
+            ],
+            [
+                "ADDRESS_IP6",
+                1
+            ],
+            {
+                "enumtype": "u8"
+            }
+        ]
+        ],
+    "enumflags": [
+
+        [
+            "if_type",
+            [
+                "IF_API_TYPE_HARDWARE",
+                0
+            ],
+            [
+                "IF_API_TYPE_SUB",
+                1
+            ],
+            [
+                "IF_API_TYPE_P2P",
+                2
+            ],
+            [
+                "IF_API_TYPE_PIPE",
+                3
+            ],
+            {
+                "enumtype": "u32"
+            }
+        ]
+    ]
+}
+"""
+
+        processor = vpp_papi.VPPApiJSONFiles()
+
+        # add the types to vpp_serializer
+        processor.process_json_str(json_api)
+
+        vpp_transport_shmem.VppTransport = mock.MagicMock()
+        ac = vpp_papi.VPPApiClient(apifiles=[], testmode=True)
+        print(ac)
+        type_name = "vl_api_if_type_t"
+        t = ac.get_type(type_name)
+        print(t)
+        self.assertTrue(str(t).startswith("VPPEnumType"))
+        self.assertEqual(t.name, type_name)
+
+    def test_enumflag_from_json(self):
+        json_api = """\
+{
+    "enumflags": [
+
+        [
+            "address_family",
+            [
+                "ADDRESS_IP4",
+                0
+            ],
+            [
+                "ADDRESS_IP6",
+                1
+            ],
+            {
+                "enumtype": "u8"
+            }
+        ],
+        [
+            "if_type",
+            [
+                "IF_API_TYPE_HARDWARE",
+                0
+            ],
+            [
+                "IF_API_TYPE_SUB",
+                1
+            ],
+            [
+                "IF_API_TYPE_P2P",
+                2
+            ],
+            [
+                "IF_API_TYPE_PIPE",
+                3
+            ],
+            {
+                "enumtype": "u32"
+            }
+        ]
+    ]
+}
+"""
+        processor = vpp_papi.VPPApiJSONFiles()
+
+        # add the types to vpp_serializer
+        processor.process_json_str(json_api)
+
+        vpp_transport_shmem.VppTransport = mock.MagicMock()
+        ac = vpp_papi.VPPApiClient(apifiles=[], testmode=True)
+        type_name = "vl_api_if_type_t"
+        t = ac.get_type(type_name)
+        self.assertTrue(str(t).startswith("VPPEnumType"))
+        self.assertEqual(t.name, type_name)
+
 
 class TestVppPapiLogging(unittest.TestCase):
-
     def test_logger(self):
         class Transport:
             connected = True
diff --git a/src/vpp-api/python/vpp_papi/tests/test_vpp_serializer.py b/src/vpp-api/python/vpp_papi/tests/test_vpp_serializer.py
index 21b23bd..c9b3d67 100755
--- a/src/vpp-api/python/vpp_papi/tests/test_vpp_serializer.py
+++ b/src/vpp-api/python/vpp_papi/tests/test_vpp_serializer.py
@@ -1,7 +1,7 @@
 #!/usr/bin/env python3
 
 import unittest
-from vpp_papi.vpp_serializer import VPPType, VPPEnumType
+from vpp_papi.vpp_serializer import VPPType, VPPEnumType, VPPEnumFlagType
 from vpp_papi.vpp_serializer import VPPUnionType, VPPMessage
 from vpp_papi.vpp_serializer import VPPTypeAlias, VPPSerializerValueError
 from vpp_papi import MACAddress
@@ -122,6 +122,9 @@
         af = VPPEnumType('vl_api_address_family_t', [["ADDRESS_IP4", 0],
                                                      ["ADDRESS_IP6", 1],
                                                      {"enumtype": "u32"}])
+        aff = VPPEnumFlagType('vl_api_address_family_flag_t', [["ADDRESS_IP4", 0],
+                                                               ["ADDRESS_IP6", 1],
+                                                               {"enumtype": "u32"}])
         ip4 = VPPTypeAlias('vl_api_ip4_address_t', {'type': 'u8',
                                                     'length': 4})
         ip6 = VPPTypeAlias('vl_api_ip6_address_t', {'type': 'u8',
diff --git a/src/vpp-api/python/vpp_papi/vpp_papi.py b/src/vpp-api/python/vpp_papi/vpp_papi.py
index e22b88b..b4d4686 100644
--- a/src/vpp-api/python/vpp_papi/vpp_papi.py
+++ b/src/vpp-api/python/vpp_papi/vpp_papi.py
@@ -31,7 +31,7 @@
 import atexit
 import time
 from . vpp_format import verify_enum_hint
-from . vpp_serializer import VPPType, VPPEnumType, VPPUnionType
+from . vpp_serializer import VPPType, VPPEnumType, VPPEnumFlagType, VPPUnionType
 from . vpp_serializer import VPPMessage, vpp_get_type, VPPTypeAlias
 
 try:
@@ -48,7 +48,7 @@
 logger.addHandler(logging.NullHandler())
 
 __all__ = ('FuncWrapper', 'VPP', 'VppApiDynamicMethodHolder',
-           'VppEnum', 'VppEnumType',
+           'VppEnum', 'VppEnumType', 'VppEnumFlag',
            'VPPIOError', 'VPPRuntimeError', 'VPPValueError',
            'VPPApiClient', )
 
@@ -72,6 +72,11 @@
     pass
 
 
+@metaclass(VppEnumType)
+class VppEnumFlag:
+    pass
+
+
 def vpp_atexit(vpp_weakref):
     """Clean up VPP connection on shutdown."""
     vpp_instance = vpp_weakref()
@@ -80,8 +85,6 @@
         vpp_instance.disconnect()
 
 
-
-
 def add_convenience_methods():
     # provide convenience methods to IP[46]Address.vapi_af
     def _vapi_af(self):
@@ -281,7 +284,12 @@
                 types[t[0]] = {'type': 'enum', 'data': t}
         except KeyError:
             pass
-
+        try:
+            for t in api['enumflags']:
+                t[0] = 'vl_api_' + t[0] + '_t'
+                types[t[0]] = {'type': 'enum', 'data': t}
+        except KeyError:
+            pass
         try:
             for t in api['unions']:
                 t[0] = 'vl_api_' + t[0] + '_t'
@@ -318,6 +326,12 @@
                             VPPEnumType(t[0], t[1:])
                         except ValueError:
                             unresolved[k] = v
+                if not vpp_get_type(k):
+                    if v['type'] == 'enumflag':
+                        try:
+                            VPPEnumFlagType(t[0], t[1:])
+                        except ValueError:
+                            unresolved[k] = v
                     elif v['type'] == 'union':
                         try:
                             VPPUnionType(t[0], t[1:])
diff --git a/src/vpp-api/python/vpp_papi/vpp_serializer.py b/src/vpp-api/python/vpp_papi/vpp_serializer.py
index 81ce53e..644aeac 100644
--- a/src/vpp-api/python/vpp_papi/vpp_serializer.py
+++ b/src/vpp-api/python/vpp_papi/vpp_serializer.py
@@ -356,7 +356,10 @@
         )
 
 
+# Will change to IntEnum after 21.04 release
 class VPPEnumType(Packer):
+    output_class = IntFlag
+
     def __init__(self, name, msgdef, options=None):
         self.size = types['u32'].size
         self.name = name
@@ -371,9 +374,9 @@
                 continue
             ename, evalue = f
             e_hash[ename] = evalue
-        self.enum = IntFlag(name, e_hash)
+        self.enum = self.output_class(name, e_hash)
         types[name] = self
-        class_types[name] = VPPEnumType
+        class_types[name] = self.__class__
         self.options = options
 
     def __getattr__(self, name):
@@ -382,7 +385,6 @@
     def __bool__(self):
         return True
 
-
     def pack(self, data, kwargs=None):
         if data is None:  # Default to zero if not specified
             if self.options and 'default' in self.options:
@@ -396,16 +398,23 @@
         x, size = types[self.enumtype].unpack(data, offset)
         return self.enum(x), size
 
-    @staticmethod
-    def _get_packer_with_options(f_type, options):
-        return VPPEnumType(f_type, types[f_type].msgdef, options=options)
+    @classmethod
+    def _get_packer_with_options(cls, f_type, options):
+        return cls(f_type, types[f_type].msgdef, options=options)
 
     def __repr__(self):
-        return "VPPEnumType(name=%s, msgdef=%s, options=%s)" % (
-            self.name, self.msgdef, self.options
+        return "%s(name=%s, msgdef=%s, options=%s)" % (
+            self.__class__.__name__, self.name, self.msgdef, self.options
         )
 
 
+class VPPEnumFlagType(VPPEnumType):
+    output_class = IntFlag
+
+    def __init__(self, name, msgdef, options=None):
+        super(VPPEnumFlagType, self).__init__(name, msgdef, options)
+
+
 class VPPUnionType(Packer):
     def __init__(self, name, msgdef):
         self.name = name
