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
Manage your XYZ Hub or HERE Data Hub spaces from Python.

XYZ Spaces for Python Manage your XYZ Hub or HERE Data Hub spaces and Interactive Map Layer from Python. FEATURED IN: Online Python Machine Learning C

HERE Technologies 30 Oct 18, 2022
List of Land Cover datasets in the GEE Catalog

List of Land Cover datasets in the GEE Catalog A list of all the Land Cover (or discrete) datasets in Google Earth Engine. Values, Colors and Descript

David Montero Loaiza 5 Aug 24, 2022
WebGL2 powered geospatial visualization layers

deck.gl | Website WebGL2-powered, highly performant large-scale data visualization deck.gl is designed to simplify high-performance, WebGL-based visua

Vis.gl 10.5k Jan 08, 2023
scalable analysis of images and time series

thunder scalable analysis of image and time series analysis in python Thunder is an ecosystem of tools for the analysis of image and time series data

thunder-project 813 Dec 29, 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
ArcGIS Python Toolbox for WhiteboxTools

WhiteboxTools-ArcGIS ArcGIS Python Toolbox for WhiteboxTools. This repository is related to the ArcGIS Python Toolbox for WhiteboxTools, which is an A

Qiusheng Wu 190 Dec 30, 2022
EOReader is a multi-satellite reader allowing you to open optical and SAR data.

Remote-sensing opensource python library reading optical and SAR sensors, loading and stacking bands, clouds, DEM and index.

ICube-SERTIT 152 Dec 30, 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
A trivia questions about Europe

EUROPE TRIVIA QUIZ IN PYTHON Project Outline Ask user if he / she knows more about Europe. If yes show the Trivia main screen, else show the end Trivi

David Danso 1 Nov 17, 2021
Logging the position of the car on an sdcard

audi-mmi-3g-gps-logging Logging the position of the car on an sdcard, startup script origin not clear to me, logging setup and time change is what I d

2 May 31, 2022
Evaluation of file formats in the context of geo-referenced 3D geometries.

Geo-referenced Geometry File Formats Classic geometry file formats as .obj, .off, .ply, .stl or .dae do not support the utilization of coordinate syst

Advanced Information Systems and Technology 11 Mar 02, 2022
Google maps for Jupyter notebooks

gmaps gmaps is a plugin for including interactive Google maps in the IPython Notebook. Let's plot a heatmap of taxi pickups in San Francisco: import g

Pascal Bugnion 747 Dec 19, 2022
Python bindings to libpostal for fast international address parsing/normalization

pypostal These are the official Python bindings to https://github.com/openvenues/libpostal, a fast statistical parser/normalizer for street addresses

openvenues 651 Dec 16, 2022
FDTD simulator that generates s-parameters from OFF geometry files using a GPU

Emport Overview This repo provides a FDTD (Finite Differences Time Domain) simulator called emport for solving RF circuits. Emport outputs its simulat

4 Dec 15, 2022
WhiteboxTools Python Frontend

whitebox-python Important Note This repository is related to the WhiteboxTools Python Frontend only. You can report issues to this repo if you have pr

Qiusheng Wu 304 Dec 15, 2022
This app displays interesting statistical weather records and trends which can be used in climate related research including study of global warming.

This app displays interesting statistical weather records and trends which can be used in climate related research including study of global warming.

0 Dec 27, 2021
Tool to display your current position and angle above your radar

πŸ›  Tool to display your current position and angle above your radar. As a response to the CS:GO Update on 1.2.2022, which makes cl_showpos a cheat-pro

Miko 6 Jan 04, 2023
Read and write rasters in parallel using Rasterio and Dask

dask-rasterio dask-rasterio provides some methods for reading and writing rasters in parallel using Rasterio and Dask arrays. Usage Read a multiband r

Dymaxion Labs 85 Aug 30, 2022
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

ServiceNow 145 Dec 23, 2022
🌐 Local tile server for viewing geospatial raster files with ipyleaflet or folium

🌐 Local Tile Server for Geospatial Rasters Need to visualize a rather large (gigabytes) raster you have locally? This is for you. A Flask application

Bane Sullivan 192 Jan 04, 2023