macaddress
Advanced tools
| Metadata-Version: 1.1 | ||
| Name: macaddress | ||
| Version: 1.1.1 | ||
| Version: 1.1.2 | ||
| Summary: Like ``ipaddress``, but for hardware identifiers such as MAC addresses. | ||
@@ -227,30 +227,9 @@ Home-page: https://github.com/mentalisttraceur/python-macaddress | ||
| >>> str(mac) | ||
| 01-02-03-04-05-06 | ||
| '01-02-03-04-05-06' | ||
| >>> str(mac).replace('-', ':') | ||
| '01:02:03:04:05:06' | ||
| >>> str(mac).replace('-', '') | ||
| '010203040506' | ||
| The first format listed in ``formats`` is used when | ||
| stringifying the object. If you want to use a | ||
| different format, you can override the ``formats`` | ||
| attribute on the instance, or on a subclass: | ||
| .. code:: python | ||
| >>> mac.formats = ('xx:xx:xx:xx:xx:xx',) | ||
| >>> str(mac) | ||
| 01-02-03-04-05-06 | ||
| >>> class MACWithColonsByDefault(macaddress.MAC): | ||
| ... formats = ('xx:xx:xx:xx:xx:xx',) + macaddress.MAC.formats | ||
| ... | ||
| >>> MACWithColonsByDefault('ab:cd:ef:01:02:03') | ||
| MACWithColonsByDefault('AB:CD:EF:01:02:03') | ||
| >>> str(MACWithColonsByDefault('ab-cd-ef-01-02-03')) | ||
| AB:CD:EF:01:02:03 | ||
| >>> str(MACWithColonsByDefault(int(mac))) | ||
| 01:02:03:04:05:06 | ||
| Note that appending the original ``formats`` | ||
| tuple to the new custom formats ensures that | ||
| you can still *parse* all the valid formats. | ||
| Get as Bytes | ||
@@ -356,2 +335,4 @@ ~~~~~~~~~~~~ | ||
| ) | ||
| # All formats are tried when parsing from string, | ||
| # and the first format is used when stringifying. | ||
@@ -358,0 +339,0 @@ Platform: UNKNOWN |
@@ -1,2 +0,1 @@ | ||
| LICENSE | ||
| README.rst | ||
@@ -3,0 +2,0 @@ macaddress.py |
+1
-2
@@ -6,3 +6,2 @@ # SPDX-License-Identifier: 0BSD | ||
| __all__ = ( | ||
@@ -16,3 +15,3 @@ 'HWAddress', | ||
| ) | ||
| __version__ = '1.1.1' | ||
| __version__ = '1.1.2' | ||
@@ -19,0 +18,0 @@ |
+8
-27
| Metadata-Version: 1.1 | ||
| Name: macaddress | ||
| Version: 1.1.1 | ||
| Version: 1.1.2 | ||
| Summary: Like ``ipaddress``, but for hardware identifiers such as MAC addresses. | ||
@@ -227,30 +227,9 @@ Home-page: https://github.com/mentalisttraceur/python-macaddress | ||
| >>> str(mac) | ||
| 01-02-03-04-05-06 | ||
| '01-02-03-04-05-06' | ||
| >>> str(mac).replace('-', ':') | ||
| '01:02:03:04:05:06' | ||
| >>> str(mac).replace('-', '') | ||
| '010203040506' | ||
| The first format listed in ``formats`` is used when | ||
| stringifying the object. If you want to use a | ||
| different format, you can override the ``formats`` | ||
| attribute on the instance, or on a subclass: | ||
| .. code:: python | ||
| >>> mac.formats = ('xx:xx:xx:xx:xx:xx',) | ||
| >>> str(mac) | ||
| 01-02-03-04-05-06 | ||
| >>> class MACWithColonsByDefault(macaddress.MAC): | ||
| ... formats = ('xx:xx:xx:xx:xx:xx',) + macaddress.MAC.formats | ||
| ... | ||
| >>> MACWithColonsByDefault('ab:cd:ef:01:02:03') | ||
| MACWithColonsByDefault('AB:CD:EF:01:02:03') | ||
| >>> str(MACWithColonsByDefault('ab-cd-ef-01-02-03')) | ||
| AB:CD:EF:01:02:03 | ||
| >>> str(MACWithColonsByDefault(int(mac))) | ||
| 01:02:03:04:05:06 | ||
| Note that appending the original ``formats`` | ||
| tuple to the new custom formats ensures that | ||
| you can still *parse* all the valid formats. | ||
| Get as Bytes | ||
@@ -356,2 +335,4 @@ ~~~~~~~~~~~~ | ||
| ) | ||
| # All formats are tried when parsing from string, | ||
| # and the first format is used when stringifying. | ||
@@ -358,0 +339,0 @@ Platform: UNKNOWN |
+7
-26
@@ -219,30 +219,9 @@ macaddress | ||
| >>> str(mac) | ||
| 01-02-03-04-05-06 | ||
| '01-02-03-04-05-06' | ||
| >>> str(mac).replace('-', ':') | ||
| '01:02:03:04:05:06' | ||
| >>> str(mac).replace('-', '') | ||
| '010203040506' | ||
| The first format listed in ``formats`` is used when | ||
| stringifying the object. If you want to use a | ||
| different format, you can override the ``formats`` | ||
| attribute on the instance, or on a subclass: | ||
| .. code:: python | ||
| >>> mac.formats = ('xx:xx:xx:xx:xx:xx',) | ||
| >>> str(mac) | ||
| 01-02-03-04-05-06 | ||
| >>> class MACWithColonsByDefault(macaddress.MAC): | ||
| ... formats = ('xx:xx:xx:xx:xx:xx',) + macaddress.MAC.formats | ||
| ... | ||
| >>> MACWithColonsByDefault('ab:cd:ef:01:02:03') | ||
| MACWithColonsByDefault('AB:CD:EF:01:02:03') | ||
| >>> str(MACWithColonsByDefault('ab-cd-ef-01-02-03')) | ||
| AB:CD:EF:01:02:03 | ||
| >>> str(MACWithColonsByDefault(int(mac))) | ||
| 01:02:03:04:05:06 | ||
| Note that appending the original ``formats`` | ||
| tuple to the new custom formats ensures that | ||
| you can still *parse* all the valid formats. | ||
| Get as Bytes | ||
@@ -348,1 +327,3 @@ ~~~~~~~~~~~~ | ||
| ) | ||
| # All formats are tried when parsing from string, | ||
| # and the first format is used when stringifying. |
-12
| Copyright 2021 Alexander Kozhevnikov <mentalisttraceur@gmail.com> | ||
| Permission to use, copy, modify, and distribute this software for any | ||
| purpose with or without fee is hereby granted. | ||
| THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES | ||
| WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | ||
| MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR | ||
| ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES | ||
| WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN | ||
| ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF | ||
| OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
43208
-5.96%9
-10%