getpublicipv4


Namegetpublicipv4 JSON
Version 0.12 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/getpublicipv4
Summaryscript to get the public IP (v4) of a PC
upload_time2024-04-03 02:01:18
maintainerNone
docs_urlNone
authorJohannes Fischer
requires_pythonNone
licenseMIT
keywords requests ip v4
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# script to get the public IP (v4) of a PC 

## Tested against Windows 10 / Python 3.10 / Anaconda - should work on MacOS / Linux

## pip install getpublicipv4


```python
from getpublicipv4 import get_ip_of_this_pc, doiploop
print(get_ip_of_this_pc())

# Added 
doiploop(*args, **kwargs):
    r"""
    This function takes in variable positional and keyword arguments, and it retrieves
    the WAN IP address of the current PC.
    It also allows for a loop timeout (looptimeout) to be specified.
    The function returns the WAN IP address if it is found, and returns None if a
    timeout occurs or an exception is encountered.
    kwargs are passed to requests.get()

    print(doiploop())
    print(
        doiploop(
            proxies={
                "https": "socks5://111.113.119.110:53681",
                "http": "socks5://111.113.119.110:53681",
            }
        )
    )
    """
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/getpublicipv4",
    "name": "getpublicipv4",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "requests, ip, v4",
    "author": "Johannes Fischer",
    "author_email": "aulasparticularesdealemaosp@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/4a/6b/c82271130734aecb870a3b7b58e60006f524729f82fab342d5a9209a5bea/getpublicipv4-0.12.tar.gz",
    "platform": null,
    "description": "\r\n# script to get the public IP (v4) of a PC \r\n\r\n## Tested against Windows 10 / Python 3.10 / Anaconda - should work on MacOS / Linux\r\n\r\n## pip install getpublicipv4\r\n\r\n\r\n```python\r\nfrom getpublicipv4 import get_ip_of_this_pc, doiploop\r\nprint(get_ip_of_this_pc())\r\n\r\n# Added \r\ndoiploop(*args, **kwargs):\r\n    r\"\"\"\r\n    This function takes in variable positional and keyword arguments, and it retrieves\r\n    the WAN IP address of the current PC.\r\n    It also allows for a loop timeout (looptimeout) to be specified.\r\n    The function returns the WAN IP address if it is found, and returns None if a\r\n    timeout occurs or an exception is encountered.\r\n    kwargs are passed to requests.get()\r\n\r\n    print(doiploop())\r\n    print(\r\n        doiploop(\r\n            proxies={\r\n                \"https\": \"socks5://111.113.119.110:53681\",\r\n                \"http\": \"socks5://111.113.119.110:53681\",\r\n            }\r\n        )\r\n    )\r\n    \"\"\"\r\n```\r\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "script to get the public IP (v4) of a PC",
    "version": "0.12",
    "project_urls": {
        "Homepage": "https://github.com/hansalemaos/getpublicipv4"
    },
    "split_keywords": [
        "requests",
        " ip",
        " v4"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "6522185bff0d7d314ba56a3f562c50f9295f8291f143fafda7254c4be8a7731d",
                "md5": "3d93f1724b2551a6536c0e8c261baab0",
                "sha256": "6439f5e75c4ecc71a3cd1470a798492b3ec36270f65fd0ad854b1c9806661113"
            },
            "downloads": -1,
            "filename": "getpublicipv4-0.12-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3d93f1724b2551a6536c0e8c261baab0",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 8365,
            "upload_time": "2024-04-03T02:01:16",
            "upload_time_iso_8601": "2024-04-03T02:01:16.690369Z",
            "url": "https://files.pythonhosted.org/packages/65/22/185bff0d7d314ba56a3f562c50f9295f8291f143fafda7254c4be8a7731d/getpublicipv4-0.12-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "4a6bc82271130734aecb870a3b7b58e60006f524729f82fab342d5a9209a5bea",
                "md5": "7d18a53ec97f955693c5dee8f56b8865",
                "sha256": "e3747c0c5e4e8aecb954203e0fb98ea1f06342ec3ac322431df352fc42cbc1a4"
            },
            "downloads": -1,
            "filename": "getpublicipv4-0.12.tar.gz",
            "has_sig": false,
            "md5_digest": "7d18a53ec97f955693c5dee8f56b8865",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 7150,
            "upload_time": "2024-04-03T02:01:18",
            "upload_time_iso_8601": "2024-04-03T02:01:18.423577Z",
            "url": "https://files.pythonhosted.org/packages/4a/6b/c82271130734aecb870a3b7b58e60006f524729f82fab342d5a9209a5bea/getpublicipv4-0.12.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-03 02:01:18",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "hansalemaos",
    "github_project": "getpublicipv4",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "getpublicipv4"
}
        
Elapsed time: 0.29037s