{"id":24002,"library":"mac-vendor-lookup","title":"mac-vendor-lookup","description":"Looks up the vendor (manufacturer) for a given MAC address using the IEEE OUI database. Current version is 0.1.15, compatible with Python >=3.5 and <4. Released as needed, with stable API.","status":"active","version":"0.1.15","language":"python","source_language":"en","source_url":"https://github.com/bauerj/mac_vendor_lookup","tags":["mac","vendor","oui","lookup"],"install":[{"cmd":"pip install mac-vendor-lookup","lang":"bash","label":"install from PyPI"}],"dependencies":[],"imports":[{"note":"Old or incorrect module references may try to import the package name as a class.","wrong":"from mac_vendor_lookup import mac_vendor_lookup","symbol":"MacLookup","correct":"from mac_vendor_lookup import MacLookup"}],"quickstart":{"code":"import asyncio\nfrom mac_vendor_lookup import MacLookup\n\nasync def main():\n    mac = MacLookup()\n    await mac.update_vendors()\n    vendor = await mac.lookup('00:11:22:33:44:55')\n    print(vendor)\n\nasyncio.run(main())","lang":"python","description":"Initialize MacLookup, update the OUI database, and look up a MAC address."},"warnings":[{"fix":"Use 'await mac.lookup(...)' in an async function, or use 'asyncio.run()' as shown in quickstart.","message":"The library requires an asynchronous context: lookup is async and must be awaited. Running synchronous code will raise a coroutine TypeError.","severity":"gotcha","affected_versions":"all"},{"fix":"Ensure network access on first run, or use a local cache file by setting the 'MAC_VENDOR_CACHE' environment variable (not officially documented). Consider calling update_vendors() during setup.","message":"The vendor database file is downloaded on first call to update_vendors(). If the download fails or takes long, the call blocks the event loop.","severity":"gotcha","affected_versions":"all"},{"fix":"Always use async/await pattern.","message":"The synchronous method 'lookup' used to exist? No, the API has always been async. Some older commits may show sync wrappers, but official releases are async.","severity":"deprecated","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Add 'await' before mac.lookup('00:11:22:33:44:55') and make sure the calling function is async.","cause":"Calling lookup() without await returns a coroutine, not the vendor string.","error":"'coroutine' object is not subscriptable"},{"fix":"Call await mac.update_vendors() first (or set a cache) to download the latest IEEE OUI list.","cause":"MAC address not found in the OUI database, or database not updated.","error":"ValueError: Could not determine vendor for 00:11:22:33:44:55"},{"fix":"Use 'from mac_vendor_lookup import MacLookup'.","cause":"Importing the top-level module instead of the class.","error":"AttributeError: module 'mac_vendor_lookup' has no attribute 'MacLookup'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}