Registry / serialization / randmac

randmac

JSON →
library0.1pypypi✓ verified 86d ago

A simple library to generate random 12-digit MAC addresses. Current version is 0.1, with no active development since 2014.

pip install randmac
INSTALL
IMPORT
SIG · RANDMAC
R
randmac
serializationpythonv0.1
Install
1.5s avg
Import
10ms
Disk
16MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.002s · 17.8MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 1.5s · import 0.002s · 18MB
16MB installed
● package 16MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

RandMac
from randmac import RandMac
No common import mistakes; the package is straightforward.

Instantiate a RandMac object and convert to string to generate a random MAC address.

from randmac import RandMac mac = RandMac() mac_address = str(mac) print(mac_address) # Example output: '00:0c:29:1a:2b:3c'
randmac --version
Debug
Known issues
gotchaThe library has not been updated since 2014 and is purely for generating random MAC addresses. Do not use for network security or production-critical tasks.
fix
Consider using more modern or actively maintained libraries if additional MAC address functionality is needed.
affects: all
gotchaRandMac() generates a new random MAC on each instantiation; there is no method to specify a vendor prefix or OUI. Generated MACs are completely random and may not be valid for real network interfaces.
fix
If a specific OUI is required, you need to implement custom logic or use a different library.
affects: all
Errors
Common errors & fixes
ImportError: No module named randmac
Package not installed or installed in wrong environment.
fix
Run 'pip install randmac' in your current Python environment.
TypeError: 'RandMac' object is not callable
Attempting to call the object as a function instead of converting to string.
fix
Use str(mac) to get the MAC address string, e.g., mac_address = str(RandMac()).
Upgrade
Version history
0.1latest on PyPI · released Sep 13, 2020
Audit
Dependencies

No dependency data recorded yet.

Agent activity
9 hits · last 30 days
node
6
Resources
randmac — pip install randmac · libregistry