generate mac addresses
Project description
pymacgen
Generate MAC addresses from OUIs or prefixes.
Installation
- Using pip (PyPI):
- pip install pymacgen
- Using uv:
- uv add pymacgen
CLI
Run the built-in help to see available options:
pymacgen --help
Python usage
from pymacgen import MACGenerator
# these do not need instantiation of the MACGenerator class
print(MACGenerator.by_mac(str("EA:7B:EE:FB:01:42")))
print(MACGenerator.by_prefix("42:06:66"))
# these utilize the pyoui library, so instantiation of the MACGenerator class is needed
m = MACGenerator("/tmp/oui.txt", True)
# by company name examples
print(m.by_organization("national security agency"))
print(m.by_organization("samsung"))
# by country name examples
print(m.by_country_code("DE"))
print(m.by_country_code("CN"))
# by country code examples
print(m.by_country_name("Germany"))
print(m.by_country_name("China"))
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pymacgen-1.0.0.tar.gz.
File metadata
- Download URL: pymacgen-1.0.0.tar.gz
- Upload date:
- Size: 17.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
489017f9819093a28495a5760f01b642c5893cd6d9f59b837c6aea314906a1c4
|
|
| MD5 |
1bbd195943a1309822a9bbdd80e935f2
|
|
| BLAKE2b-256 |
38d37b7415eee1b28c92ccf91f4974b783a64d3b28123d98dad14b7b974f4b11
|
Provenance
The following attestation bundles were made for pymacgen-1.0.0.tar.gz:
Publisher:
publish.yml on nbdy/pymacgen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymacgen-1.0.0.tar.gz -
Subject digest:
489017f9819093a28495a5760f01b642c5893cd6d9f59b837c6aea314906a1c4 - Sigstore transparency entry: 630374829
- Sigstore integration time:
-
Permalink:
nbdy/pymacgen@ce19e2ef66784040e8d7e307125c40066fd6ce9e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/nbdy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ce19e2ef66784040e8d7e307125c40066fd6ce9e -
Trigger Event:
push
-
Statement type:
File details
Details for the file pymacgen-1.0.0-py3-none-any.whl.
File metadata
- Download URL: pymacgen-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fc708e0bba66c4a8441f214649cbd3873b29f809c062e3633a692174b7e2b0af
|
|
| MD5 |
b7c7d24799ecfc84324c6aa239228dc6
|
|
| BLAKE2b-256 |
de1060bfbee9f25fceb6ce4741ba4b2cb36028b786ec87154a93d07b7a63ff85
|
Provenance
The following attestation bundles were made for pymacgen-1.0.0-py3-none-any.whl:
Publisher:
publish.yml on nbdy/pymacgen
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pymacgen-1.0.0-py3-none-any.whl -
Subject digest:
fc708e0bba66c4a8441f214649cbd3873b29f809c062e3633a692174b7e2b0af - Sigstore transparency entry: 630374830
- Sigstore integration time:
-
Permalink:
nbdy/pymacgen@ce19e2ef66784040e8d7e307125c40066fd6ce9e -
Branch / Tag:
refs/tags/v1.0.0 - Owner: https://github.com/nbdy
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@ce19e2ef66784040e8d7e307125c40066fd6ce9e -
Trigger Event:
push
-
Statement type: