Async OUI Lookups

0.1.9 · active · verified Thu Apr 16

aiooui offers an asynchronous approach to perform Organisationally Unique Identifier (OUI) lookups, enabling efficient identification of vendors based on MAC addresses in Python applications. It supports asynchronous programming models, making it suitable for use in modern Python asynchronous frameworks. The current version is 0.1.9, with a fairly active release cadence, frequently publishing minor updates and bug fixes.

Common errors

Warnings

Install

Imports

Quickstart

This quickstart demonstrates how to initialize the OUI lookup client and perform an asynchronous vendor lookup for a given MAC address. The `OUI` class handles fetching and caching OUI data. The example uses known MAC prefixes for demonstration.

import asyncio
from aiooui import OUI

async def main():
    oui = OUI()
    mac_address = '00:08:DC:FF:FF:FF' # Example MAC address (Cisco)
    vendor = await oui.lookup(mac_address)
    print(f"Vendor for {mac_address}: {vendor}")
    # Optionally, look up another known vendor
    mac_address_2 = 'F8:F0:05:00:00:00' # Example MAC address (Apple)
    vendor_2 = await oui.lookup(mac_address_2)
    print(f"Vendor for {mac_address_2}: {vendor_2}")

if __name__ == "__main__":
    asyncio.run(main())

view raw JSON →