Gipsy gives you your public IP address as JSON.
You'll need the following:
Local development setup:
# Clone the repo
git clone git@github.com:taeram/gipsy.git
cd ./gipsy
# Setup and activate virtualenv
virtualenv .venv
source ./.venv/bin/activate
# Install the pip requirements
pip install -r requirements.txt
# Start the application
python main.py
Docker setup:
docker run --publish 8080:80 taeram/gipsy:latest
To get your system's IP address:
curl http://localhost:8080/
Response:
{
"address": "184.71.226.22"
}
If you're using JSON in a shell script, you might try jq to simplify parsing the JSON.