Skip to main content

django-client-ip

django-client-ip is a Django middleware that retrieves the client IP address and optionally fetches geolocation data using ip-api.com.

Installation

  1. Install the package using pip:
pip install django-client-ip
  1. Add the middleware to your Django project in settings.py:
MIDDLEWARE = [
    # Other middlewares
    'django_client_ip.GetClientIP',
]

Usage

Once installed, every request object will have a client_ip attribute containing the IP address and geolocation data (if available).

Author

Hadi Cahyadi

Buy Me a Coffee

Donate via Ko-fi Support me on Patreon

Metadata

Release files for django-client-ip 0.12

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for django-client-ip 0.12
File Size Uploaded
django_client_ip-0.12.tar.gz 3.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for django-client-ip 0.12
File Interpreter ABI Platform
django_client_ip-0.12-py3-none-any.whl Python 3 none any Details

Total release size: 6.9 kB

Release files / django_client_ip-0.12.tar.gz

Download URL django_client_ip-0.12.tar.gz
Size 3.4 kB
Tags Source
SHA-256 checksum
How to use checksums
6b51e0b19468511dde34827cb030ab10ce77f0acee7aa04c192585f3be079650
BLAKE2b-256 checksum
How to use checksums
3ab27c0fabb4495d99e76dac9d72fbdebf8a808e3f61d156aff967de56d7f44c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release files / django_client_ip-0.12-py3-none-any.whl

Download URL django_client_ip-0.12-py3-none-any.whl
Size 3.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
4f1f51b4fa1b9ad72fa5b537ba86ec3ac97d73ba4f55854394edafe6f207b100
BLAKE2b-256 checksum
How to use checksums
86ebf08bdba69522e56c7e0d686c0a8c180b1183a2aade7be4b9e3dbcdb292ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.4

Release history Release notifications | RSS feed

This release

0.12 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page