Skip to main content

🛡️ pyoui

CodeFactor

pyoui is a lightweight Python utility to lookup and parse the IEEE OUI (Organizationally Unique Identifier) database. Easily identify network device vendors by their MAC addresses or search through the IEEE registry.

✨ Features

  • 🔍 Flexible Search: Lookup by MAC address, prefix, organization name, or country.
  • 🚀 CLI & Library: Use it as a standalone tool or a Python package.
  • 📅 Auto-Managed Data: Automatically downloads and caches the latest IEEE OUI data.
  • 🛠️ Modern Tooling: Built with uv, ruff, and type hints.

🚀 Installation

For Users

pip install pyoui

For Developers (using uv)

uv add pyoui

From Source

pip install git+https://github.com/nbdy/pyoui

📖 Usage

Command Line Interface

Quickly search the OUI database from your terminal:

# Search by MAC prefix
pyoui --prefix 00:22:72

# Search by organization name
pyoui --organization "national security"

# Search by country code (ISO 3166-1 alpha-2)
pyoui --country-code US

Run pyoui --help to see all available flags and options (like output formats: JSON, CSV, Table).

Python API

Integrate pyoui into your own scripts:

from pyoui import OUI

# Initialize and parse the OUI data
# It will download the database if it doesn't exist or is older than 30 days
entries = OUI().parse()

# Lookup by MAC address
entry = next(entries.by_mac("BC:23:92:42:42:42"))
print(f"Vendor: {entry.organization.name}")

# Search by organization name
for entry in entries.by_organization("national security"):
    print(f"{entry.prefix} -> {entry.organization.name}")

# Filter by country
us_entries = list(entries.by_country_code("US"))
print(f"Found {len(us_entries)} US-based organizations.")

🧑‍💻 Development

This project uses uv for dependency management.

Setup

  1. Clone the repository:

    git clone https://github.com/nbdy/pyoui.git
    cd pyoui
    
  2. Sync dependencies:

    uv sync
    
  3. Install pre-commit hooks: We use pre-commit to ensure code quality.

    uv run pre-commit install
    

Common Tasks

  • Run Tests: uv run pytest
  • Lint Code: uv run ruff check .
  • Build Package: uv build
  • Run CLI locally: uv run pyoui --help

Release files for pyoui 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyoui 1.1.1
File Size Uploaded
pyoui-1.1.1.tar.gz 43.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyoui 1.1.1
File Interpreter ABI Platform
pyoui-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 52.8 kB

Release files / pyoui-1.1.1.tar.gz

Download URL pyoui-1.1.1.tar.gz
Size 43.4 kB
Tags Source
SHA-256 checksum
How to use checksums
64bc9a60d5274611c9709413acb093549c8e97344a95b8ec1a6783314a0b187d
BLAKE2b-256 checksum
How to use checksums
5848dde0e4e05637ec2f2ba0a3da13010289f3726b16c5e441852af4e8bcdc17
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.

Transparency log

Release files / pyoui-1.1.1-py3-none-any.whl

Download URL pyoui-1.1.1-py3-none-any.whl
Size 9.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4753c0d844f0d960c750a1c62af69c4d2ba73f078871d48947d372a8462b504d
BLAKE2b-256 checksum
How to use checksums
0fd5b0a98fdf018e0c3381787dd61f744b88eff54b5d4077167f1daf10761efe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 20, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.53

3 release files

0.52

3 release files

0.44

3 release files

0.43

3 release files

0.42

2 release 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