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
- Install the package using pip:
pip install django-client-ip
- 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
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)
| File | Size | Uploaded | |
|---|---|---|---|
| django_client_ip-0.12.tar.gz | 3.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| 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
|