{"id":24503,"library":"randmac","title":"randmac","description":"A simple library to generate random 12-digit MAC addresses. Current version is 0.1, with no active development since 2014.","status":"maintenance","version":"0.1","language":"python","source_language":"en","source_url":"https://github.com/joshschmelzle/randmac","tags":["mac-address","random","generator"],"install":[{"cmd":"pip install randmac","lang":"bash","label":"Install via pip"}],"dependencies":[],"imports":[{"note":"No common import mistakes; the package is straightforward.","wrong":null,"symbol":"RandMac","correct":"from randmac import RandMac"}],"quickstart":{"code":"from randmac import RandMac\n\nmac = RandMac()\nmac_address = str(mac)\nprint(mac_address)\n# Example output: '00:0c:29:1a:2b:3c'","lang":"python","description":"Instantiate a RandMac object and convert to string to generate a random MAC address."},"warnings":[{"fix":"Consider using more modern or actively maintained libraries if additional MAC address functionality is needed.","message":"The 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.","severity":"gotcha","affected_versions":"all"},{"fix":"If a specific OUI is required, you need to implement custom logic or use a different library.","message":"RandMac() 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.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Run 'pip install randmac' in your current Python environment.","cause":"Package not installed or installed in wrong environment.","error":"ImportError: No module named randmac"},{"fix":"Use str(mac) to get the MAC address string, e.g., mac_address = str(RandMac()).","cause":"Attempting to call the object as a function instead of converting to string.","error":"TypeError: 'RandMac' object is not callable"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}