{"id":37067784,"url":"https://github.com/fili/ipapp-python","last_synced_at":"2026-01-14T07:58:07.170Z","repository":{"id":305712665,"uuid":"1021285217","full_name":"fili/ipapp-python","owner":"fili","description":"Python package to query your IP address, ASN, Location (city/country/continent/etc) and TimeZone. ","archived":false,"fork":false,"pushed_at":"2025-07-21T15:24:14.000Z","size":30,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-12-27T02:23:31.267Z","etag":null,"topics":["ip","ipaddr","ipaddress","ipaddresses","python-library","whatismyip","whatismyipaddress","whatismyipaddress-api"],"latest_commit_sha":null,"homepage":"https://github.com/fili/ip.app","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fili.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-07-17T07:08:52.000Z","updated_at":"2025-07-21T15:24:17.000Z","dependencies_parsed_at":"2025-07-21T17:53:17.439Z","dependency_job_id":null,"html_url":"https://github.com/fili/ipapp-python","commit_stats":null,"previous_names":["fili/ipapp-client"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/fili/ipapp-python","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fili%2Fipapp-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fili%2Fipapp-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fili%2Fipapp-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fili%2Fipapp-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fili","download_url":"https://codeload.github.com/fili/ipapp-python/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fili%2Fipapp-python/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413527,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ip","ipaddr","ipaddress","ipaddresses","python-library","whatismyip","whatismyipaddress","whatismyipaddress-api"],"created_at":"2026-01-14T07:58:06.580Z","updated_at":"2026-01-14T07:58:07.164Z","avatar_url":"https://github.com/fili.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ipapp • v4.0.6\n\nTiny **stdlib-only** client for [ip.app](https://ip.app). No dependencies on third party packages.\nQuery your public IP address, ASN data, location, timezone, and more — programmatically *or* from the command line.\n\n---\n\n## 🛠 Installation\n\n```bash\n# From PyPI: https://pypi.org/project/ipapp/\npip install ipapp\n```\n\nPython ≥ 3.8, no external runtime dependencies.\n\n### Using a virtual environment (recommended)\n\nIf your system Python is *externally managed* (PEP 668) you’ll need an isolated environment instead of installing into the OS packages. The fastest path is a **virtual env**:\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate\npython3 -m pip install -e '.[dev]'\n```\n\n(Upgrade `pip` inside the venv if you like: `python -m pip install --upgrade pip`.)\n\nAlternatively you can keep things completely separate with **pipx**:\n\n```bash\n# From PyPI: https://pypi.org/project/ipapp/\npipx install ipapp\n```\n\n---\n\n## 🚀 Quick-start (Python)\n\nEach endpoint gets its own snippet so you can copy/paste exactly what you need.\n\n### Public IP\n\n```python\nimport ipapp\nprint(ipapp.get_ip())          # → \"203.0.113.42\"\n```\n\n### Public IP via HEAD (fastest)\n```python\nimport ipapp\nprint(ipapp.get_ip(head=True))     # \"203.0.113.42\" via X-Ipapp-Ip header\n```\n\n### ASN (plain-text)\n\n```python\nimport ipapp\nprint(ipapp.get_asn())         # → \"AS12345\"\n```\n\n### ASN (JSON)\n\n```python\nimport ipapp\ninfo = ipapp.get_asn(json=True)\n# {'asn': 12345, 'holder': 'Example ISP', 'country': 'DE', ...}\n```\n\n### ASN with caller IP merged (JSON only)\n\n```python\nimport ipapp\ninfo = ipapp.get_asn(json=True, include_ip=True)\n# {'asn': 12345, 'holder': 'Example ISP', ..., 'ip': '203.0.113.42', 'ip_version': '4'}\n```\n\n### Timezone (plain-text)\n\n```python\nimport ipapp\nprint(ipapp.get_tz())          # → \"Europe/Berlin\"\n```\n\n### Timezone (JSON)\n\n```python\nimport ipapp\ninfo = ipapp.get_tz(json=True)\n# {'tz': 'Europe/Berlin', ...}\n```\n\n### Timezone with caller IP merged (JSON only)\n\n```python\nimport ipapp\ninfo = ipapp.get_tz(json=True, include_ip=True)\n# {'tz': 'Europe/Berlin', 'ip': '203.0.113.42', 'ip_version': '4'}\n```\n\n### Location (JSON)\n\n```python\nimport ipapp\ninfo = ipapp.get_location()    # JSON by default\n# {'city': 'Berlin', 'country': 'DE', 'region': 'Berlin', ...}\n```\n\n### Location with caller IP merged (JSON only)\n\n```python\nimport ipapp\ninfo = ipapp.get_location(include_ip=True)\n# {'city': 'Berlin', 'country': 'DE', ..., 'ip': '203.0.113.42', 'ip_version': '4'}\n```\n\n### Location (plain-text)\n\n```python\nimport ipapp\nprint(ipapp.get_location(json=False))  # raw plain-text response\n```\n\nAll helpers raise `ipapp.IPAppError` on network problems or invalid responses.\n\n### Strict mode\n\nAll functions support a `strict=True` parameter that raises `IPAppError` instead of returning `None` when the service responds with \"Unknown\":\n\n```python\nimport ipapp\ntry:\n    ip = ipapp.get_ip(strict=True)\nexcept ipapp.IPAppError:\n    print(\"IP address is unknown\")\n```\n\n---\n\n## 🖥 Quick-start (CLI)\n\nEvery function is mirrored by a sub-command.\nNo arguments prints the IP (nice for scripts):\n\n```bash\nipapp                        # 198.51.100.7\n```\n\nRun each endpoint separately:\n\n```bash\nipapp ip                     # same as default\nipapp ip --json              # {\"ip\": \"198.51.100.7\"}\nipapp ip --head              # header-only mode\n\nipapp asn                    # AS12345\nipapp asn --json             # {\"asn\": 12345, ...}\nipapp asn --json --include-ip # {\"asn\": 12345, ..., \"ip\": \"198.51.100.7\"}\n\nipapp tz                     # Europe/Berlin\nipapp tz --json              # {\"tz\": \"Europe/Berlin\", ...}\nipapp tz --json --include-ip # {\"tz\": \"Europe/Berlin\", \"ip\": \"198.51.100.7\"}\n\nipapp location               # {\"city\": \"Berlin\", \"country\": \"DE\", ...}\nipapp location --include-ip  # {\"city\": \"Berlin\", ..., \"ip\": \"198.51.100.7\"}\nipapp location --head        # header-only mode\n```\n\n---\n\n## 🧪 Running the test suite\n\nTests are network-free (they monkey-patch the internal fetcher) so they run instantly:\n\n```bash\npytest -q\n# 4 passed in 0.02s\n```\n\n---\n\n## 📦 Building \u0026 checking the package\n\n```bash\n# Ensure build tools are present\npipx install build twine\n\n# Remove old version\nrm -rf dist/*\n\n# Build wheel + sdist into ./dist/\npyproject-build\n\n# Verify metadata is valid (no upload)\ntwine check dist/*\n\n# When you're ready to release\ntwine upload dist/*\n```\n\nWait a few minutes and test by reinstalling using pipx:\n\n```bash\npipx reinstall ipapp\n```\n\n---\n\n## 🤝 Contributing\n\n* Fork, create a feature branch, add tests for any new behaviour.\n* Keep code **PEP 8** compliant (the codebase sticks to stdlib only).\n* Open a PR – CI will run `pytest` and basic metadata checks.\n\n---\n\n## 🔗 Links\n\n- **PyPI**: https://pypi.org/project/ipapp/\n- **GitHub**: https://github.com/fili/ipapp-python\n- **IP.app API**: https://ip.app\n- **IP.app API Documentation**: https://github.com/fili/ip.app\n\n---\n\n\u003e Note: Versioning starts at 4.0.0 to avoid conflicts with a previously removed package on PyPI using the same name.\n\nMIT licensed – have fun!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffili%2Fipapp-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffili%2Fipapp-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffili%2Fipapp-python/lists"}