getpubip 0.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
getpubip/__init__.py ADDED
@@ -0,0 +1 @@
1
+ from .core import get_ip
getpubip/__main__.py ADDED
@@ -0,0 +1,3 @@
1
+ from .core import get_ip
2
+
3
+ print(get_ip())
getpubip/core.py ADDED
@@ -0,0 +1,4 @@
1
+ from urllib.request import urlopen
2
+
3
+ def get_ip(timeout=5):
4
+ return urlopen("https://api.ipify.org", timeout=timeout).read().decode()
@@ -0,0 +1,30 @@
1
+ Metadata-Version: 2.4
2
+ Name: getpubip
3
+ Version: 0.1.0
4
+ Summary: Get the public IP address
5
+ Requires-Python: >=3.8
6
+ Description-Content-Type: text/markdown
7
+
8
+ # getpubip
9
+
10
+ Get your public IP address.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pip install getpubip
16
+ ```
17
+
18
+ ## Usage
19
+
20
+ ```python
21
+ from getpubip import get_ip
22
+
23
+ print(get_ip())
24
+ ```
25
+
26
+ Or from the terminal:
27
+
28
+ ```bash
29
+ python -m getpubip
30
+ ```
@@ -0,0 +1,7 @@
1
+ getpubip/__init__.py,sha256=3UDE1EfOcqvKLPLXq11Jx9BUUwH517QldsFbm75yJKc,25
2
+ getpubip/__main__.py,sha256=FM9vAGvX8wvIBayJD43VCBkgWrWyuOvkkuctooUCc4k,42
3
+ getpubip/core.py,sha256=NaEIT4uLK8OF6QzQVS8rYeV_p2CqucwzvURYgG1Qo68,136
4
+ getpubip-0.1.0.dist-info/METADATA,sha256=kgnglSCNekBiCpBOaE1CZ1R5Nu0c7ikwHBTi_-f_Wmk,392
5
+ getpubip-0.1.0.dist-info/WHEEL,sha256=YVMoNqKzERt-wjUZwJ33xBGAwnFl-4cqbYkTtWa4itE,91
6
+ getpubip-0.1.0.dist-info/top_level.txt,sha256=nYPeq60bToo_JuixhhQVG-kfhWQ0FhClWb_LDKiD7qo,9
7
+ getpubip-0.1.0.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (84.0.0)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1 @@
1
+ getpubip