Skip to main content

aiooui

CI Status Test coverage percentage CodSpeed

Poetry black pre-commit

PyPI Version Supported Python versions License


Source Code: https://github.com/bluetooth-devices/aiooui


Async OUI lookups

Installation

Install this via pip (or your favourite package manager):

pip install aiooui

Usage

Start by importing it:

import aiooui

await aiooui.async_load()
aiooui.get_vendor("00:00:00:11:22:33")  # "XEROX CORPORATION"

How lookups work

The OUI table (src/aiooui/oui.data, ~40k entries, ~770 KB) is not loaded into a dict. async_load() memory-maps the file read-only in an executor, and get_vendor() binary-searches the key array in place with bisect, so the search itself runs in C. The process keeps almost no private memory for the table (against ~5.6 MB for a dict). async_load() touches every page once, in the executor, so lookups on the event loop never wait on disk. Those pages are clean, shared page cache that the kernel can reclaim under memory pressure. If mmap is unavailable, the file is read into bytes and searched the same way.

Data file format

oui.data is a small binary table, all integers little-endian uint32:

section contents
magic OUI1
count number of entries, n
keys n OUIs as 24-bit integers, sorted ascending, unique
offsets n byte offsets of each entry's vendor name inside the blob
blob UTF-8 vendor names, each terminated by \n, deduplicated

Regenerate it only with python build_oui.py, which downloads the IEEE list, then validates, sorts and packs the entries. The release build runs it before packaging, so every release ships fresh data. tests/test_init.py::test_data_file_is_valid fails if the file is out of order or malformed. An unsorted key array would make lookups silently return None.

Contributors ✨

Thanks goes to these wonderful people (emoji key):

This project follows the all-contributors specification. Contributions of any kind welcome!

Credits

This package was created with Copier and the browniebroke/pypackage-template project template.

Release files for aiooui 0.1.11

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

Source distribution (sdist)

Source distribution for aiooui 0.1.11
File Size Uploaded
aiooui-0.1.11.tar.gz 346.2 kB Details

Built distribution (wheel)

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

Total release size: 689.6 kB

Release files / aiooui-0.1.11.tar.gz

Download URL aiooui-0.1.11.tar.gz
Size 346.2 kB
Tags Source
SHA-256 checksum
How to use checksums
737e1c605339a4ca3a860f0c60f1a35af0e256b44c93e8d0487ad62f3addeda8
BLAKE2b-256 checksum
How to use checksums
dbe49ac5dc50921ebaffb625c55d4a057d337cca95fe2de3257649fea946e5e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release files / aiooui-0.1.11-py3-none-any.whl

Download URL aiooui-0.1.11-py3-none-any.whl
Size 343.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
531e808bba926d80213413202243754a125a100b3e7912dadb3cd3f921e1665d
BLAKE2b-256 checksum
How to use checksums
4ca85dd74c2dad63e66ea9b0caf67abaa6ce2ae84207346141b3952e6c703290
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

0.1.11 This release

2 release files

0.1.9

3 release files

0.1.8

3 release files

0.1.7

3 release files

0.1.6

3 release files

0.1.5

3 release files

0.1.4

1 release file

0.1.2

2 release files

0.1.1

2 release files

0.1.0

2 release files

0.0.0

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