Mmdb-server - An open source fast API server to lookup IP addresses for their geographic location

Overview

mmdb-server

mmdb-server is an open source fast API server to lookup IP addresses for their geographic location. The server can be used with any MaxMind DB File Format or file in the same format.

mmdb-server includes a free and open GeoOpen-Country database for IPv4 and IPv6 addresses. The file GeoOpen-Country is generated on a regular basis from AS announces and their respective whois records.

Installation

Python 3.8+ is required to run the mmdb-server with some additional requirements.

  • pip3 install -r REQUIREMENTS
  • cp ./etc/server.conf.sample ./etc/server.conf
  • cd bin; python3 server.py

Usage

Lookup of an IP address

curl -s http://127.0.0.1:8000/geolookup/188.65.220.25 | jq .

[
  {
    "country": {
      "iso_code": "BE"
    },
    "meta": {
      "description": {
        "en": "Geo Open MMDB database - https://github.com/adulau/mmdb-server"
      },
      "build_db": "2022-01-23 16:13:05",
      "db_source": "GeoOpen-Country",
      "nb_nodes": 1156125
    }
  }
]

$ curl -s http://127.0.0.1:8000/geolookup/2a02:21d0::68:69:25 | jq .

[
  {
    "country": {
      "iso_code": "BE"
    },
    "meta": {
      "description": {
        "en": "Geo Open MMDB database - https://github.com/adulau/mmdb-server"
      },
      "build_db": "2022-01-23 16:13:05",
      "db_source": "GeoOpen-Country",
      "nb_nodes": 1156125
    }
  }
]

Output format

The output format is an array of JSON object (to support the ability to serve multiple geo location database). Each JSON object of the JSON array includes a meta and a country fields. The country give the geographic location of the IP address queried. The meta field includes the origin of the MMDB database which the the metadata.

License

    Copyright (C) 2022 Alexandre Dulaunoy 

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU Affero General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Affero General Public License for more details.

    You should have received a copy of the GNU Affero General Public License
    along with this program.  If not, see 
   .
You might also like...
LicenseLocation - License Location With Python
LicenseLocation - License Location With Python

LicenseLocation Hi,everyone! ❀ 🧑 πŸ’› πŸ’š πŸ’™ πŸ’œ This is my first project! βœ” Actual

Using Global fishing watch's data to build a machine learning model that can identify illegal fishing and poaching activities through satellite and geo-location data.
Using Global fishing watch's data to build a machine learning model that can identify illegal fishing and poaching activities through satellite and geo-location data.

Using Global fishing watch's data to build a machine learning model that can identify illegal fishing and poaching activities through satellite and geo-location data.

Script that allows to download data with satellite's orbit height and create CSV with their change in time.
Script that allows to download data with satellite's orbit height and create CSV with their change in time.

Satellite orbit height β—Ύ Requirements Python = 3.8 Packages listen in reuirements.txt (run pip install -r requirements.txt) Account on Space Track β—Ύ

Helping data scientists better understand their datasets and models in text classification. With love from ServiceNow.
Helping data scientists better understand their datasets and models in text classification. With love from ServiceNow.

Azimuth, an open-source dataset and error analysis tool for text classification, with love from ServiceNow. Overview Azimuth is an open source applica

A package built to support working with spatial data using open source python

EarthPy EarthPy makes it easier to plot and manipulate spatial data in Python. Why EarthPy? Python is a generic programming language designed to suppo

GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.
GeoNode is an open source platform that facilitates the creation, sharing, and collaborative use of geospatial data.

Table of Contents What is GeoNode? Try out GeoNode Install Learn GeoNode Development Contributing Roadmap Showcase Most useful links Licensing What is

GebPy is a Python-based, open source tool for the generation of geological data of minerals, rocks and complete lithological sequences.
GebPy is a Python-based, open source tool for the generation of geological data of minerals, rocks and complete lithological sequences.

GebPy is a Python-based, open source tool for the generation of geological data of minerals, rocks and complete lithological sequences. The data can be generated randomly or with respect to user-defined constraints, for example a specific element concentration within minerals and rocks or the order of units within a complete lithological profile.

Tile Map Service and OGC Tiles API for QGIS Server

Tiles API Add tiles API to QGIS Server Tiles Map Service API OGC Tiles API Tile Map Service API - TMS The TMS API provides these URLs: /tms/? to get i

Zora is a python program that searches for GeoLocation info for given CIDR networks , with options to search with API or without API
Zora is a python program that searches for GeoLocation info for given CIDR networks , with options to search with API or without API

Zora Zora is a python program that searches for GeoLocation info for given CIDR networks , with options to search with API or without API Installing a

Releases(v1.1)
  • v1.1(Oct 15, 2022)

  • v1.0(Jul 9, 2022)

    mmdb-server v1.0 released - an open source fast API server to lookup IP addresses for their geographic location. The server reached version 1.0 as many production servers are running flawlessly with this code. mmdb-server includes the geo-open database from CIRCL.

    Source code(tar.gz)
    Source code(zip)
  • v0.5(Feb 6, 2022)

    mmdb-server (the open and free geo IP server) version 0.5 released (2022-02-06) πŸ—ΊοΈ

    mmdb-server (the open and free geo IP server) version 0.5 released which includes the support for to load multiple MMDB files.

    A new GeoOpen database included to support AS number and AS description lookup.

    New

    • [multiple MMDB file support] MMDB server can now load a list of MMDB files + new GeoOpen file including ASN details added as example. [Alexandre Dulaunoy]

      GeoOpen files for country only -> https://cra.circl.lu/opendata/geo-open/mmdb-country/ GeoOpen files with country and ASN/ASN description -> https://cra.circl.lu/opendata/geo-open/mmdb-country-asn/

    • [db] Country-ASN db added. [Alexandre Dulaunoy]

    • [db] GeoOpen database updated. [Alexandre Dulaunoy]

    Changes

    • [doc] update the documentation and examples with the multiple sources. [Alexandre Dulaunoy]

    • [log] remove old debug. [Alexandre Dulaunoy]

    • [db] renamed. [Alexandre Dulaunoy]

    • [GeoOpen-country] updated. [Alexandre Dulaunoy]

    Other

    • Update README.md. [Alexandre Dulaunoy]
    Source code(tar.gz)
    Source code(zip)
  • v0.2(Jan 24, 2022)

    What's new in v0.2 (2022-01-24)

    New

    • [server] Add additional information about the country including average location, complete name and numeric code. [Alexandre Dulaunoy]

    • [mygeolookup] Query on root of the server will give the geo location of the remote IP address doing the query. [Alexandre Dulaunoy]

    Changes

    • [doc] update JSON output and CIRCL public service. [Alexandre Dulaunoy]

    • [server] display port. [Alexandre Dulaunoy]

    • [server] make port configurable. [Alexandre Dulaunoy]

    Source code(tar.gz)
    Source code(zip)
  • v0.1(Jan 23, 2022)

    mmdb-server is an open source fast API server to lookup IP addresses for their geographic location. The server can be used with any MaxMind DB File Format or file in the same format.

    mmdb-server includes a free and open GeoOpen-Country database for IPv4 and IPv6 addresses. The file GeoOpen-Country is generated on a regular basis from AS announces and their respective whois records.

    Installation

    Python 3.8+ is required to run the mmdb-server with some additional requirements.

    • pip3 install -r REQUIREMENTS
    • cp ./etc/server.conf.sample ./etc/server.conf
    • cd bin; python3 server.py

    Usage

    Lookup of an IP address

    curl -s http://127.0.0.1:8000/geolookup/188.65.220.25 | jq .

    [
      {
        "country": {
          "iso_code": "BE"
        },
        "meta": {
          "description": {
            "en": "Geo Open MMDB database - https://github.com/adulau/mmdb-server"
          },
          "build_db": "2022-01-23 16:13:05",
          "db_source": "GeoOpen-Country",
          "nb_nodes": 1156125
        }
      }
    ]
    

    $ curl -s http://127.0.0.1:8000/geolookup/2a02:21d0::68:69:25 | jq .

    [
      {
        "country": {
          "iso_code": "BE"
        },
        "meta": {
          "description": {
            "en": "Geo Open MMDB database - https://github.com/adulau/mmdb-server"
          },
          "build_db": "2022-01-23 16:13:05",
          "db_source": "GeoOpen-Country",
          "nb_nodes": 1156125
        }
      }
    ]
    

    Output format

    The output format is an array of JSON object (to support the ability to serve multiple geo location database). Each JSON object of the JSON array includes a meta and a country fields. The country give the geo graphic location of the IP address queried. The meta field includes the origin of the MMDB database which the the metadata.

    Source code(tar.gz)
    Source code(zip)
Owner
Alexandre Dulaunoy
Enjoy when human are using machines in unexpected ways. I break stuff and I do stuff.
Alexandre Dulaunoy
Django model field that can hold a geoposition, and corresponding widget

django-geoposition A model field that can hold a geoposition (latitude/longitude), and corresponding admin/form widget. Prerequisites Starting with ve

Philipp Bosch 324 Oct 17, 2022
A Django application that provides country choices for use with forms, flag icons static files, and a country field for models.

Django Countries A Django application that provides country choices for use with forms, flag icons static files, and a country field for models. Insta

Chris Beaven 1.2k Jan 03, 2023
Python bindings and utilities for GeoJSON

geojson This Python library contains: Functions for encoding and decoding GeoJSON formatted data Classes for all GeoJSON Objects An implementation of

Jazzband 763 Dec 26, 2022
Advanced raster and geometry manipulations

buzzard In a nutshell, the buzzard library provides powerful abstractions to manipulate together images and geometries that come from different kind o

Earthcube Lab 30 Jun 20, 2022
Python script to locate mobile number

Python script to locate mobile number How to use this script run the command to install the required libraries pip install -r requirements.txt run the

Shekhar Gupta 8 Oct 10, 2022
Creates 3D geometries from 2D vector graphics, for use in geodynamic models

geomIO - creating 3D geometries from 2D input This is the Julia and Python version of geomIO, a free open source software to generate 3D volumes and s

3 Feb 01, 2022
A ninja python package that unifies the Google Earth Engine ecosystem.

A Python package that unifies the Google Earth Engine ecosystem. EarthEngine.jl | rgee | rgee+ | eemont GitHub: https://github.com/r-earthengine/ee_ex

47 Dec 27, 2022
Google Maps keeps old satellite imagery around for a while – this tool collects what's available for a user-specified region in the form of a GIF.

google-maps-at-88-mph The folks maintaining Google Maps regularly update the satellite imagery it serves its users, but outdated versions of the image

Noah Doersing 111 Sep 27, 2022
A public data repository for datasets created from TransLink GTFS data.

TransLink Spatial Data What: TransLink is the statutory public transit authority for the Metro Vancouver region. This GitHub repository is a collectio

Henry Tang 3 Jan 14, 2022
A utility to search, download and process Landsat 8 satellite imagery

Landsat-util Landsat-util is a command line utility that makes it easy to search, download, and process Landsat imagery. Docs For full documentation v

Development Seed 681 Dec 07, 2022
A ready-to-use curated list of Spectral Indices for Remote Sensing applications.

A ready-to-use curated list of Spectral Indices for Remote Sensing applications. GitHub: https://github.com/davemlz/awesome-ee-spectral-indices Docume

David Montero Loaiza 488 Jan 03, 2023
This is the antenna performance plotted from tinyGS reception data.

tinyGS-antenna-map This is the antenna performance plotted from tinyGS reception data. See their repository. The code produces a plot that provides Az

Martin J. Levy 14 Aug 21, 2022
Search and download Copernicus Sentinel satellite images

sentinelsat Sentinelsat makes searching, downloading and retrieving the metadata of Sentinel satellite images from the Copernicus Open Access Hub easy

837 Dec 28, 2022
Platform for building statistical models of cities and regions

UrbanSim UrbanSim is a platform for building statistical models of cities and regions. These models help forecast long-range patterns in real estate d

Urban Data Science Toolkit 419 Dec 30, 2022
Python library to visualize circular plasmid maps

Plasmidviewer Plasmidviewer is a Python library to visualize plasmid maps from GenBank. This library provides only the function to visualize circular

Mori Hideto 9 Dec 04, 2022
ProjPicker (projection picker) is a Python module that allows the user to select all coordinate reference systems (CRSs)

ProjPicker ProjPicker (projection picker) is a Python module that allows the user to select all coordinate reference systems (CRSs) whose extent compl

Huidae Cho 4 Feb 06, 2022
A service to auto provision devices in Aruba Central based on the Geo-IP location

Location Based Provisioning Service for Aruba Central A service to auto provision devices in Aruba Central based on the Geo-IP location Geo-IP auto pr

Will Smith 3 Mar 22, 2022
Water Detect Algorithm

WaterDetect Synopsis WaterDetect is an end-to-end algorithm to generate open water cover mask, specially conceived for L2A Sentinel 2 imagery from MAJ

142 Dec 30, 2022
Location field and widget for Django. It supports Google Maps, OpenStreetMap and Mapbox

django-location-field Let users pick locations using a map widget and store its latitude and longitude. Stable version: django-location-field==2.1.0 D

Caio Ariede 481 Dec 29, 2022
GebPy is a Python-based, open source tool for the generation of geological data of minerals, rocks and complete lithological sequences.

GebPy is a Python-based, open source tool for the generation of geological data of minerals, rocks and complete lithological sequences. The data can be generated randomly or with respect to user-defi

Maximilian Beeskow 16 Nov 29, 2022