Skip to main content

mac-vendors-client

Lightweight, offline MAC address -> vendor lookups against a pre-built SQLite database export.

  • Zero dependencies - reads the export via the standard library sqlite3.
  • Fast - range/bits index lookup, no network, no per-call cost.
  • Read-only - opens the export file read-only; never modifies it.

Use it when you have a downloaded SQLite export and want fast, local lookups with no network calls. For live queries against the hosted API, use the online SDK (mac-vendors-sdk) instead.

Install

pip install mac-vendors-client

Usage

from mac_vendors_client import MacVendorsClient

with MacVendorsClient("vendors.db") as client:
    match = client.lookup("00:50:56:AA:BB:CC")
    if match:
        print(match.organization_name)   # "VMware, Inc."
        print(match.assignment, match.bits)

    # Name only
    name = client.lookup_name("00-50-56-aa-bb-cc")

    # Batch (invalid entries map to None instead of raising)
    results = client.lookup_batch(["0050.56AA.BBCC", "FF:FF:FF:00:00:00"])

    # Export metadata
    info = client.info()
    print(info.exported_at, info.total_records)

MAC input accepts any common format (:/-/. separators or bare hex), and a shorter prefix such as a 6-hex OUI. The most specific (largest-bits) match wins when prefixes overlap (e.g. an MA-S assignment inside an MA-L block).

The export contract

The export is a SQLite database with this schema:

CREATE TABLE mac_addresses (
    id INTEGER PRIMARY KEY,
    assignment TEXT NOT NULL,
    organization_name TEXT,
    organization_address TEXT,
    range_begin INTEGER NOT NULL,   -- 48-bit MAC range start
    range_end   INTEGER NOT NULL,   -- 48-bit MAC range end
    bits INTEGER NOT NULL           -- 24 / 28 / 36
);
CREATE TABLE metadata (key TEXT PRIMARY KEY, value TEXT);  -- updated_at, exported_at, total_records

A lookup resolves a MAC M to the row where range_begin <= int(M) <= range_end, ordered by bits DESC (most specific first).

License

MIT

Download files

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

Source Distribution

mac_vendors_client-1.0.0.tar.gz (8.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mac_vendors_client-1.0.0-py3-none-any.whl (6.7 kB view details)

Uploaded Python 3

File details

Details for the file mac_vendors_client-1.0.0.tar.gz.

File metadata

  • Download URL: mac_vendors_client-1.0.0.tar.gz
  • Upload date:
  • Size: 8.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for mac_vendors_client-1.0.0.tar.gz
Algorithm Hash digest
SHA256 4e351a293f879b6c0612669f883ae3939db04636fd221c1712a51c1061103838
MD5 d7698c79a832fd4b5c9e32d4ffee20d6
BLAKE2b-256 ad5b83f9a0d15a2bf162affcec37d8c1154d077080ec0187332d79bb7a819bc0

See more details on using hashes here.

Provenance

The following attestation bundles were made for mac_vendors_client-1.0.0.tar.gz:

Publisher: publish.yml on mac-vendors/mac-vendors-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mac_vendors_client-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for mac_vendors_client-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 92c33c4727dd1ef299e57e566249069be09f1763f4124a784351f9dcb0c06022
MD5 6c5b66f21d9ff87356789db3197e91ff
BLAKE2b-256 44182c818ed78e14e7ddf44c3d97dd45872e7f4aa047c9fb559dd16e478d5673

See more details on using hashes here.

Provenance

The following attestation bundles were made for mac_vendors_client-1.0.0-py3-none-any.whl:

Publisher: publish.yml on mac-vendors/mac-vendors-client

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page