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
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 โ—พ

Alicja Musiaล‚ 2 Jan 17, 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 toolbox for processing earth observation data with Python.

eo-box eobox is a Python package with a small collection of tools for working with Remote Sensing / Earth Observation data. Package Overview So far, t

13 Jan 06, 2022
peartree: A library for converting transit data into a directed graph for sketch network analysis.

peartree ๐Ÿ ๐ŸŒณ peartree is a library for converting GTFS feed schedules into a representative directed network graph. The tool uses Partridge to conve

Kuan Butts 183 Dec 29, 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
Open Data Cube analyses continental scale Earth Observation data through time

Open Data Cube Core Overview The Open Data Cube Core provides an integrated gridded data analysis environment for decades of analysis ready earth obse

Open Data Cube 410 Dec 13, 2022
Rasterio reads and writes geospatial raster datasets

Rasterio Rasterio reads and writes geospatial raster data. Geographic information systems use GeoTIFF and other formats to organize and store gridded,

Mapbox 1.9k Jan 07, 2023
Processing and interpolating spatial data with a twist of machine learning

Documentation | Documentation (dev version) | Contact | Part of the Fatiando a Terra project About Verde is a Python library for processing spatial da

Fatiando a Terra 468 Dec 20, 2022
A part of HyRiver software stack for handling geospatial data manipulations

Package Description Status PyNHD Navigate and subset NHDPlus (MR and HR) using web services Py3DEP Access topographic data through National Map's 3DEP

Taher Chegini 5 Dec 14, 2022
Geocode rows in a SQLite database table

Geocode rows in a SQLite database table

Chris Amico 225 Dec 08, 2022
Expose a GDAL file as a HTTP accessible on-the-fly COG

cogserver Expose any GDAL recognized raster file as a HTTP accessible on-the-fly COG (Cloud Optimized GeoTIFF) The on-the-fly COG file is not material

Even Rouault 73 Aug 04, 2022
:earth_asia: Python Geocoder

Python Geocoder Simple and consistent geocoding library written in Python. Table of content Overview A glimpse at the API Forward Multiple results Rev

Denis 1.5k Jan 02, 2023
Python package for earth-observing satellite data processing

Satpy The Satpy package is a python library for reading and manipulating meteorological remote sensing data and writing it to various image and data f

PyTroll 882 Dec 27, 2022
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

GeoNode Development Team 1.2k Dec 26, 2022
Mmdb-server - An open source fast API server to lookup IP addresses for their geographic location

mmdb-server mmdb-server is an open source fast API server to lookup IP addresses

Alexandre Dulaunoy 67 Nov 25, 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
Geographic add-ons for Django REST Framework. Maintained by the OpenWISP Project.

django-rest-framework-gis Geographic add-ons for Django Rest Framework - Mailing List. Install last stable version from pypi pip install djangorestfra

OpenWISP 981 Jan 03, 2023
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
Computer Vision in Python

Mahotas Python Computer Vision Library Mahotas is a library of fast computer vision algorithms (all implemented in C++ for speed) operating over numpy

Luis Pedro Coelho 792 Dec 20, 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