Metadata-Version: 2.1
Name: public-ip
Version: 0.1
Summary: A Python function to get your public IP address.
Home-page: https://github.com/vterron/public-ip
Author: Víctor Terrón
Author-email: quintanar@gmail.com
License: UNKNOWN
Project-URL: Bug Tracker, https://github.com/vterron/public-ip/issues
Platform: UNKNOWN
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Requires-Python: >=3.0
Description-Content-Type: text/markdown
License-File: LICENSE

A Python function to get your public IP address.

# Installation

```bash
pip install public-ip
```

# Usage example

```python
import public_ip as ip

ip.get()
```

Sample output:

```
212.51.139.31
```

# How it works

The function queries in parallel six different websites...

1. https://api.ipify.org
1. https://checkip.amazonaws.com
1. https://icanhazip.com
1. https://ifconfig.co/ip'
1. https://ipecho.net/plain
1. https://ipinfo.io/ip

... and returns the most common IP among the responses. This approach seeks to ensure that (a) we don't depend on a single external service and (b) we can determine the IP correctly as long as a _majority_ of these sites return the right value.

