Skip to main content

A simple tool for formatting MAC addresses

Project description

mac-formatter

A simple library to convert MAC-addresses to different formats.


How to use in terminal(cli).

Run the following to see how mac_formatter is used directly in your terminal

mac-formatter --help

Example usage:

mac-formatter 01ab02cd03ef -f dot

output:

01ab.02cd.03ef

How to use in your code.

from mac_formatter import MacFormatter

mac_address = '01:ab:02:cd:03:ef'
mac = MacFormatter(mac_address)

print(mac.dot)
print(mac.line)
print(mac.space)
print(mac.colon)
print(mac.blank)

output:

01ab.02cd.03ef
01-ab-02-cd-03-ef
01 ab 02 cd 03 ef
01:ab:02:cd:03:ef
01ab02cd03ef


---

thamuppet

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

mac-formatter-0.3.4.tar.gz (4.5 kB view details)

Uploaded Source

Built Distribution

mac_formatter-0.3.4-py3-none-any.whl (3.4 kB view details)

Uploaded Python 3

File details

Details for the file mac-formatter-0.3.4.tar.gz.

File metadata

  • Download URL: mac-formatter-0.3.4.tar.gz
  • Upload date:
  • Size: 4.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.4

File hashes

Hashes for mac-formatter-0.3.4.tar.gz
Algorithm Hash digest
SHA256 13cc078002fd9fd02a7206c94ef22f538627410a0847ccc238d8858dd6dabd0e
MD5 a9a045f985cc30d8b938a9f1bc4ca112
BLAKE2b-256 6236c4db390f2eb76031e14772aebc96f35aa7c49d35f7dd8c2f344cd327340f

See more details on using hashes here.

File details

Details for the file mac_formatter-0.3.4-py3-none-any.whl.

File metadata

File hashes

Hashes for mac_formatter-0.3.4-py3-none-any.whl
Algorithm Hash digest
SHA256 94ca47da96a70a0c037c70cb33e5d858417cc2da0f2f2095fc18c8cd6fa55cae
MD5 234db053fbf8d4a0a6accd1bdebdcd55
BLAKE2b-256 0afc22232ec4ed5f204656abd0c6a7673663bc380547b32a83c61e7b701851b5

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page