PyMacIO
Interface with the macaddress.io API
Note: there is a '5 minute' script version in ./script that I would write for myself in a time crunch
The macaddress.io API key is stored in an environment file (or optionally as an environment variable)
- Create your configuration file
cp .env.local .env
- Add your macaddress.io api key where indicated in the sample file
- The API url is predefined and should not need to be changed
You can also set the following environment variables:
- MACIO_API_KEY
- MACIO_API_URL
- Navigate to project root
docker build -t pymacio .
- Run pymacio (using example address 00:00:00:00:00:00)
- See usage:
docker run pymacio -h
- Query company name:
docker run pymacio 00:00:00:00:00:00
- Dump entire JSON response:
docker run pymacio --full 00:00:00:00:00:00
- Accepts address with colons, dashes or no delimiter
- See usage:
- Install Python (>=3.9.6)
- Install curl
- Examples
- Linux:
apt-get install curl
- MacOS:
brew install curl
- Linux:
- Examples
- Install poetry 1.3.2 and add to path
curl -sSL https://install.python-poetry.org | python - --version 1.3.2
export PATH="$POETRY_HOME/bin:$PATH"
- Run the app
- Install dependencies
poetry install --no-root
- See usage:
poetry run pymacio -h
- Query company name:
poetry run pymacio 00:00:00:00:00:00
- Dump entire JSON response:
poetry run pymacio --full 00:00:00:00:00:00
- Install dependencies