$npx skillfedfor your agent

python-ipware

A Python package to retrieve user's IP address

With conditionsPyPI WWW/HTTPReleased Apr 20245.3M downloads / moMITPure Python

Decision gist · record as of 2026-08-14

pure-Python wheel — python_ipware-3.0.0-py3-none-any.whl
v3.0.0 · released 2024-04-19 · Python >=3.7

Yes, if you need straightforward client IP extraction in a web framework and are willing to accept dormant maintenance. The package is stable, has no dependencies, and handles the common proxy scenarios well. However, do not rely on it as a primary security mechanism—always pair it with firewall rules and validate proxy chains carefully if IP spoofing is a concern in your threat model.AI-flagged interpretation of the facts on this page — verify before relying

Before you install

  • Requires a request object with META (Django) or environ (Flask) attributes; IP spoofing is possible without additional proxy validation—use proxy_list or proxy_count parameters to verify trusted proxies.
  • Low friction: pure Python wheel with no runtime dependencies.
  • Dormant maintenance status (last commit April 2024, 847 days since release) means no active development, but the codebase is stable and the package supports current Python versions (3.7–3.12).

License · maintenance · safety

MIT (permissive) — MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.

last release 2024-04-19 (847 days) · last repo commit 2024-04-19 · 43 stars

0 known vulnerabilities (OSV.dev, 2026-08-14) · 5,327,253 downloads/mo, #2,119 on PyPI

Verify before relying

pip install python-ipware

from python_ipware import IpWare

ipw = IpWare()
ip, trusted_route = ipw.get_client_ip(meta=request.META)  # Django
# or: ipw.get_client_ip(meta=request.environ)  # Flask
  • Whether the package handles IPv6 addresses correctly in all proxy scenarios.
  • Performance impact when checking against large proxy lists or custom header precedence orders.
  • How the package behaves with non-standard or malformed X-Forwarded-For headers.
Same gist for agents: .md · .json

What it is and what it does

python-ipware is a lightweight utility for web applications to retrieve the client's real IP address from HTTP request headers. It handles the complexity of proxy chains and multiple header formats by checking a configurable precedence order of headers (X-Forwarded-For, HTTP_CLIENT_IP, REMOTE_ADDR, and others) and returning an IPv4Address or IPv6Address object with properties like is_global, is_private, and is_loopback.

The package is designed for Django, Flask, and similar frameworks where the request object is available. It supports proxy validation through proxy_list (trusted proxy IP prefixes) and proxy_count (expected number of proxies in the chain) parameters to help filter spoofed requests. The documentation emphasizes that IP spoofing cannot be completely prevented and recommends using the package only as an additional security layer alongside firewall rules, not as a primary defense mechanism.

Use it for

  • Log or track client IP addresses in web application request handlers for auditing or analytics.
  • Implement geolocation-based features by extracting the real client IP behind load balancers or CDNs.
  • Validate incoming requests against IP allowlists or blocklists in security middleware.
  • Detect and filter requests from known proxy or VPN services by examining trusted proxy chains.
  • Attach client IP metadata to user sessions or API calls for debugging and monitoring.

Worth the install?

AI-flagged interpretation of the facts on this page. Verify before relying on it.

With conditions

Yes, if you need straightforward client IP extraction in a web framework and are willing to accept dormant maintenance.

The package is stable, has no dependencies, and handles the common proxy scenarios well. However, do not rely on it as a primary security mechanism—always pair it with firewall rules and validate proxy chains carefully if IP spoofing is a concern in your threat model.

Install

python-ipware on PyPI

Before you install

Low friction: pure Python wheel with no runtime dependencies. Dormant maintenance status (last commit April 2024, 847 days since release) means no active development, but the codebase is stable and the package supports current Python versions (3.7–3.12).

Requires a request object with META (Django) or environ (Flask) attributes; IP spoofing is possible without additional proxy validation—use proxy_list or proxy_count parameters to verify trusted proxies.

License in practice

MIT license (permissive) places no restrictions on use, modification, or distribution in proprietary or open-source projects.

Quickstart

pip install python-ipware

from python_ipware import IpWare

ipw = IpWare()
ip, trusted_route = ipw.get_client_ip(meta=request.META)  # Django
# or: ipw.get_client_ip(meta=request.environ)  # Flask

Verify before relying

  • Whether the package handles IPv6 addresses correctly in all proxy scenarios.
  • Performance impact when checking against large proxy lists or custom header precedence orders.
  • How the package behaves with non-standard or malformed X-Forwarded-For headers.

Package facts

LicenseMIT permissive
Python supportSupports the current Python release >=3.7
Install frictionLow. Pure-Python wheel
Runtime dependenciesNone
MaintenanceDormant 847 days since the last release
Last repo commit
First released
Downloads5,327,253 / month, #2,119 on PyPI 30-day window, as of 2026-08-14
Known vulnerabilitiesNone known OSV.dev, checked 2026-08-14
Classifiers
Development Status :: 4 - BetaIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseNatural Language :: EnglishProgramming Language :: PythonProgramming Language :: Python :: 3Programming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.7Programming Language :: Python :: 3.8Programming Language :: Python :: 3.9

Evidence: python_ipware-3.0.0-py3-none-any.whl

Tags

Capabilities
get client ip address from requestextract ip from http headersproxy aware ip detectiondjango flask client iptrusted proxy ip lookupx-forwarded-for parsingremote address extraction
Topics
web-framework-integrationip-detectionproxy-handling

Let your AI agent find packages like this

Example. Real query, live index.

You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.

wish › “get client ip address from request”

  • python-ipwareExtracts a client's IP address from web request headers, handling…
  • django-ipwareRetrieves the client's IP address from a Django request object,…
  • django-ratelimitProvides a Django decorator to rate-limit views based on IP address…

Give your agent the search over MCP, or paste the wish link into any chat.

More WWW/HTTP packages

urllib3 Worth it
PyPI · Libraries · released May 2026

urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.

MITpure Python · 3.10+
1.8Bdownloads / mo
requests Worth it
PyPI · Libraries · released May 2026

Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.

Apache-2.0pure Python · 3.10+
1.8Bdownloads / mo
h11 With conditions
PyPI · WWW/HTTP · released Apr 2025

h11 is a pure-Python HTTP/1.1 protocol implementation that handles parsing and serializing HTTP messages without any built-in I/O, letting you integrate it with any network layer you choose.

MITpure Python · 3.8+aging
894.9Mdownloads / mo
httpx Worth it
PyPI · WWW/HTTP · released Dec 2024

HTTPX is a fully featured HTTP client library for Python that provides both sync and async APIs, with support for HTTP/1.1 and HTTP/2, plus an integrated command-line client.

Install it if you are building new projects or modernizing existing ones that rely on HTTP.

BSD-3-Clausepure Python · 3.8+
797.0Mdownloads / mo
httpcore With conditions
PyPI · WWW/HTTP · released Apr 2025

A minimal low-level HTTP client library that sends HTTP requests with thread-safe and task-safe connection pooling, supporting HTTP/1.1, HTTP/2, proxies, and both sync and async interfaces.

BSD-3-Clausepure Python · 3.8+aging
783.6Mdownloads / mo
aiohttp Worth it
PyPI · WWW/HTTP · released Jul 2026

aiohttp is an async HTTP client and server framework built on asyncio, supporting both WebSockets and middleware-based routing for building concurrent web applications.

Install it if you need async HTTP client or server capabilities in asyncio-based applications.

permissive licensecompiled wheel · 3.10+
643.6Mdownloads / mo

See also django-ipware · django-xff · proxy-protocol · proxyproviders · vercel-headers · ipaddr · iptools · cached-ipaddress · ipaddress · django-revproxy