Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Find the vendor for a given MAC address

Project description

Mac Vendor Lookup

This library provides an easy way to get vendor information from a MAC address. It downloads a local copy of the IEEE's OUI prefix list. It has an asynchronous interface using Python 3's asyncio as well as a regular synchronous interface for old-school usage.

Basic Usage

from mac_vendor_lookup import MacLookup




Pre-load the vendor list

The list of MAC vendors is currently about 4MB large. By default a lazy-loading mechanism is used, that loads the list when it's needed. If it is clear that the list is needed and a wait time during the query is not desired, the list can also be loaded when the program is started:

from mac_vendor_lookup import MacLookup

mac = MacLookup()
mac.load_vendors()  # <- This can take a few seconds for the first download
def find_mac(mac_address):
    print(mac.lookup(mac_address))  # <- this will only take a few µs!

Async Interface

There is also an asynchronous interface available:

from mac_vendor_lookup import AsyncMacLookup

async def main():
    mac = AsyncMacLookup()
    print(await mac.lookup("98:ED:5C:FF:EE:01"))


Tesla Motors, Inc

Command line interface

This library provides a rudimentary command line interface:

$ mac_vendor_lookup 50-D3-7F-00-01-00
Yu Fly Mikly Way Science and Technology Co., Ltd.
$ python3 -m mac_vendor_lookup 00:26:12:12:FE
Space Exploration Technologies

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for mac-vendor-lookup, version 0.1.7
Filename, size File type Python version Upload date Hashes
Filename, size mac_vendor_lookup-0.1.7-py3-none-any.whl (3.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size mac_vendor_lookup-0.1.7.tar.gz (6.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page