Skip to content

al-beton/GeoIP2-example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

django-GeoIP2-example

Example project showing the use of GeoIP2 API and setup of city/country lookup.

Setup

To get up and running, you will need to get the data from the MaxMinds project.

See: MaxMinds

You should create an API key and download their latest dataset.

In this GitHub repository, the MaxMinds data from 06/11/2023 is included.

Execution

Ensure that up to date MaxMinds data is placed in the zipped_data folder

Run example.py

A successful run will output the following response to the query of the IP address 123.123.123.123

Beijing, China

China Unicom Beijing Province Network (4808)

Dependencies

This uses the unzip and tar CLI tools which you must have installed.

About

Example project showing the use of GeoIP2 API and setup of city/country lookup

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages