deamwork / jbgpq3

A JSON wrapper for bgpq3 with caching.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

jbgpq3

A HTTP/JSON wrapper for bgpq3 with simple caching. This tool returns RADB data in a JSON format and provides a little bit of cacheing. It is useful if you want to provide access to RPSL data to development teams in a simple JSON format.

Requirements

Python, Flask, and the bgpq3 binary installed on the local machine.

Usage:

Call /prefix/[as-set] or /prefix/AS[as-number] and you will get some JSON to consume

tatou:sputnik andy$ curl http://localhost:5010/prefix/as44504
{
  "as_set": "as44504", 
  "cache_age_seconds": 0, 
  "cache_hit": false, 
  "prefixes_ipv4": [
    {
      "exact": true, 
      "prefix": "91.194.68.0/24"
    }
  ], 
  "prefixes_ipv6": []
}

About

A JSON wrapper for bgpq3 with caching.


Languages

Language:Python 100.0%