# myIPaddress 🌎
### Module Overview:
This module provides functionality to fetch IP information, including public and private IP addresses, location details, open ports, and more.
## How to Use:
- `myIPaddress.{function_name}()`
### Public IP:
- **`.info`** - Returns all public information in JSON format.
- **`.public_ip()`** - Returns the public IP address.
- **`.public_hostname()`** - Returns the public hostname.
- **`.public_city()`** - Returns the public city.
- **`.public_region()`** - Returns the public region.
- **`.public_country()`** - Returns the public country.
- **`.public_loc()`** - Returns the public location.
- **`.public_organization()`** - Returns the public organization.
- **`.public_postal()`** - Returns the public postal code.
- **`.public_fulladdress()`** - Returns a formatted string of public city, region, country, and postal code.
- **`.public_timezone()`** - Returns the public timezone.
### Private IP:
- **`.private_ip()`** - Returns the private IP address.
### Other Networking Information:
- **`.open_ports()`** - Returns a list of open ports on the local machine.
- **`.ip_probe(ip_address, indent=False)`** - Retrieves IP information for a specified IP address using the "https://ipinfo.io/{ip_address}/json" API.
### Example Usage:
Example:
```python
import myIPaddress as myip
ip_info = myip.public_ip()
print(f"Public IP Address: {ip_info}")
```
Output:
```python
Public IP Address: 8.8.8.8
Raw data
{
"_id": null,
"home_page": "https://github.com/ericdennis7/myIPaddress",
"name": "myipaddress",
"maintainer": "",
"docs_url": null,
"requires_python": "",
"maintainer_email": "",
"keywords": "IP,myip,IP address,geolocation,public IP,private IP,socket,ports,open ports",
"author": "Eric Dennis",
"author_email": "ericdennis11@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/aa/9e/9982b7d841715f83b55a458079354cf58a9f5383dc7cd98ce32c9aba1e12/myipaddress-1.0.2.tar.gz",
"platform": null,
"description": "# myIPaddress \ud83c\udf0e\n\n### Module Overview:\n\nThis module provides functionality to fetch IP information, including public and private IP addresses, location details, open ports, and more.\n\n## How to Use:\n\n- `myIPaddress.{function_name}()`\n\n### Public IP:\n\n- **`.info`** - Returns all public information in JSON format.\n\n- **`.public_ip()`** - Returns the public IP address.\n\n- **`.public_hostname()`** - Returns the public hostname.\n\n- **`.public_city()`** - Returns the public city.\n\n- **`.public_region()`** - Returns the public region.\n\n- **`.public_country()`** - Returns the public country.\n\n- **`.public_loc()`** - Returns the public location.\n\n- **`.public_organization()`** - Returns the public organization.\n\n- **`.public_postal()`** - Returns the public postal code.\n\n- **`.public_fulladdress()`** - Returns a formatted string of public city, region, country, and postal code.\n\n- **`.public_timezone()`** - Returns the public timezone.\n\n ### Private IP:\n\n- **`.private_ip()`** - Returns the private IP address.\n\n ### Other Networking Information:\n\n- **`.open_ports()`** - Returns a list of open ports on the local machine.\n\n- **`.ip_probe(ip_address, indent=False)`** - Retrieves IP information for a specified IP address using the \"https://ipinfo.io/{ip_address}/json\" API.\n\n### Example Usage:\n\nExample:\n\n```python\nimport myIPaddress as myip\n\nip_info = myip.public_ip()\nprint(f\"Public IP Address: {ip_info}\")\n```\n\nOutput:\n\n```python\nPublic IP Address: 8.8.8.8\n\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "A package to get your/others IP information.",
"version": "1.0.2",
"project_urls": {
"Homepage": "https://github.com/ericdennis7/myIPaddress"
},
"split_keywords": [
"ip",
"myip",
"ip address",
"geolocation",
"public ip",
"private ip",
"socket",
"ports",
"open ports"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "68e8c34ba7a68dbe0cb0c0193d60c74db95ed7d81f1c794589650229e5ddc657",
"md5": "7c902bfd197ffa882f9359a7d15c5601",
"sha256": "3c27efcbfe4b8c43a9809631bb5bf10dba6c61f672d1f4941546340c7d98c07d"
},
"downloads": -1,
"filename": "myipaddress-1.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "7c902bfd197ffa882f9359a7d15c5601",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": null,
"size": 3618,
"upload_time": "2024-01-17T22:32:44",
"upload_time_iso_8601": "2024-01-17T22:32:44.012973Z",
"url": "https://files.pythonhosted.org/packages/68/e8/c34ba7a68dbe0cb0c0193d60c74db95ed7d81f1c794589650229e5ddc657/myipaddress-1.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "aa9e9982b7d841715f83b55a458079354cf58a9f5383dc7cd98ce32c9aba1e12",
"md5": "a16882754a0f39be3912b91492c59e97",
"sha256": "b58c431f22a905e5f8f1873dbd753c2a0173fe07934d9fa6daf0ddbfaf929fbc"
},
"downloads": -1,
"filename": "myipaddress-1.0.2.tar.gz",
"has_sig": false,
"md5_digest": "a16882754a0f39be3912b91492c59e97",
"packagetype": "sdist",
"python_version": "source",
"requires_python": null,
"size": 3347,
"upload_time": "2024-01-17T22:32:45",
"upload_time_iso_8601": "2024-01-17T22:32:45.664203Z",
"url": "https://files.pythonhosted.org/packages/aa/9e/9982b7d841715f83b55a458079354cf58a9f5383dc7cd98ce32c9aba1e12/myipaddress-1.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-01-17 22:32:45",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "ericdennis7",
"github_project": "myIPaddress",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "myipaddress"
}