Ravenports generated: 10 Feb 2024 22:55
[ravenports.git] / bucket_BB / python-macaddress
1 # Buildsheet autogenerated by ravenadm tool -- Do not edit.
2
3 NAMEBASE=               python-macaddress
4 VERSION=                2.0.2
5 KEYWORDS=               python
6 VARIANTS=               v11 v12
7 SDESC[v11]=             MAC hardware identifier module (3.11)
8 SDESC[v12]=             MAC hardware identifier module (3.12)
9 HOMEPAGE=               https://github.com/mentalisttraceur/python-macaddress
10 CONTACT=                Python_Automaton[python@ironwolf.systems]
11
12 DOWNLOAD_GROUPS=        main
13 SITES[main]=            PYPIWHL/6e/40/cfad5b515667b0465a3169757b5c9f17639dc1da145c65248e5b9fe481d8
14 DISTFILE[1]=            macaddress-2.0.2-py3-none-any.whl:main
15 DF_INDEX=               1
16 SPKGS[v11]=             single
17 SPKGS[v12]=             single
18
19 OPTIONS_AVAILABLE=      PY311 PY312
20 OPTIONS_STANDARD=       none
21 VOPTS[v11]=             PY311=ON PY312=OFF
22 VOPTS[v12]=             PY311=OFF PY312=ON
23
24 DISTNAME=               macaddress-2.0.2.dist-info
25
26 GENERATED=              yes
27
28 [PY311].USES_ON=                        python:v11,wheel
29
30 [PY312].USES_ON=                        python:v12,wheel
31
32 [FILE:2304:descriptions/desc.single]
33 macaddress
34 ==========
35
36 A module for handling hardware identifiers like MAC addresses.
37
38 This module makes it easy to:
39
40 1. check if a string represents a valid MAC address, or a similar
41    hardware identifier like an EUI-64, OUI, etc,
42
43 2. convert between string and binary forms of MAC addresses and
44    other hardware identifiers,
45
46 and so on.
47
48 Heavily inspired by the ipaddress module, but not yet quite
49 as featureful.
50
51 Versioning
52 ----------
53
54 This library's version numbers follow the `SemVer 2.0.0
55 specification <https://semver.org/spec/v2.0.0.html>`_.
56
57 Installation
58 ------------
59
60 ::
61
62     pip install macaddress
63
64 Usage
65 -----
66
67 Import:
68
69 .. code:: python
70
71     >>> import macaddress
72
73 Classes are provided for the common hardware identifier
74 types: EUI48 (also available as MAC), EUI64,
75 OUI, and so on. If those aren't enough, you can
76 easily define others with just a few lines of code.
77
78 Parse or Validate String
79 ~~~~~~~~~~~~~~~~~~~~~~~~
80
81 When only one address type is valid:
82
83 All provided classes support the standard and common formats.
84 For example, the EUI48 class supports the following
85 formats:
86
87 .. code:: python
88
89     >>> macaddress.EUI48('01-23-45-67-89-ab')
90     EUI48('01-23-45-67-89-AB')
91     >>> macaddress.EUI48('01:23:45:67:89:ab')
92     EUI48('01-23-45-67-89-AB')
93     >>> macaddress.EUI48('0123.4567.89ab')
94     EUI48('01-23-45-67-89-AB')
95     >>> macaddress.EUI48('0123456789ab')
96     EUI48('01-23-45-67-89-AB')
97
98 You can inspect what formats a hardware address class supports
99 by looking at its formats attribute:
100
101 .. code:: python
102
103     >>> macaddress.OUI.formats
104     ('xx-xx-xx', 'xx:xx:xx', 'xxxxxx')
105
106 Each x in the format string matches one hexadecimal
107 "digit", and all other characters are matched literally.
108
109 If the string does not match one of the formats, a
110 ValueError is raised:
111
112 .. code:: python
113
114     >>> try:
115     ...     macaddress.MAC('foo bar')
116     ... except ValueError as error:
117     ...     print(error)
118     ...
119     'foo bar' cannot be parsed as EUI48
120
121 If you need to parse in a format that isn't supported,
122 you can define a subclass and add the formats:
123
124 .. code:: python
125
126     >>> class MAC(macaddress.MAC):
127     ...     formats = macaddress.MAC.formats + (
128     ...         'xx-xx-xx-xx-xx-xx-',
129     ...         'xx:xx:xx:xx:xx:xx:',
130     ...         'xxxx.xxxx.xxxx.',
131     ...     )
132     ...
133
134
135 [FILE:112:distinfo]
136 6f4a0430f9b5af6d98a582b8d527ba2cd3f0825fce5503a9ce5c73acb772c30f         8027 macaddress-2.0.2-py3-none-any.whl
137