All Projects → maxmind → MaxMind-DB-Reader-ruby

maxmind / MaxMind-DB-Reader-ruby

Licence: other
Ruby reader for the MaxMind DB Database Format

Programming Languages

ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to MaxMind-DB-Reader-ruby

MaxMind-DB-Reader-java
Java reader for the MaxMind DB format
Stars: ✭ 88 (+151.43%)
Mutual labels:  geoip2, geoip, maxmind, mmdb
mmdbwriter
Go library for writing MaxMind DB (mmdb) files
Stars: ✭ 44 (+25.71%)
Mutual labels:  geoip2, geoip, maxmind, mmdb
MaxMind-DB-Writer-perl
Create MaxMind DB database files
Stars: ✭ 63 (+80%)
Mutual labels:  geoip2, geoip, maxmind, mmdb
GeoIP2-ruby
Ruby API for GeoIP2 webservice client and database reader
Stars: ✭ 41 (+17.14%)
Mutual labels:  geoip2, geoip, maxmind, mmdb
MaxMind-DB-Reader-python
Python MaxMind DB reader extension
Stars: ✭ 131 (+274.29%)
Mutual labels:  geoip2, geoip, maxmind, mmdb
Geoip2 Php
PHP API for GeoIP2 webservice client and database reader
Stars: ✭ 1,956 (+5488.57%)
Mutual labels:  geoip2, geoip, maxmind, mmdb
GeoIP2-perl
Perl API for MaxMind's GeoIP2 web services and databases
Stars: ✭ 18 (-48.57%)
Mutual labels:  geoip2, geoip, maxmind, mmdb
geoip2-rs
Fast GeoIP2 Reader for Rust
Stars: ✭ 25 (-28.57%)
Mutual labels:  geoip2, geoip, maxmind
geoip2
GeoIP2 Reader for Go
Stars: ✭ 54 (+54.29%)
Mutual labels:  geoip2, geoip, maxmind
nodejs-geoip2ws
Maxmind GeoIP2 Web Services for Node.js
Stars: ✭ 47 (+34.29%)
Mutual labels:  geoip2, geoip, maxmind
locus
MMDB reader for geolocation and ASN lookup of IP addresses
Stars: ✭ 93 (+165.71%)
Mutual labels:  geoip2, geoip, mmdb
lua-resty-maxminddb
A Lua library for reading MaxMind's Geolocation database
Stars: ✭ 72 (+105.71%)
Mutual labels:  geoip, maxmind
sawmill
Sawmill is a JSON transformation Java library
Stars: ✭ 92 (+162.86%)
Mutual labels:  geoip, maxmind
GeoLite2-City
GeoLite2-City.mmdb.gz CDN files based on Free Open Source CDN jsDelivr!
Stars: ✭ 170 (+385.71%)
Mutual labels:  geoip, maxmind
pf-azure-sentinel
Parse pfSense/OPNSense logs using Logstash, GeoIP tag entities, add additional context to logs, then send to Azure Sentinel for analysis.
Stars: ✭ 24 (-31.43%)
Mutual labels:  geoip, maxmind
GeoLite2-Country
GeoLite2-Country.mmdb.gz CDN files based on Free Open Source CDN jsDelivr!
Stars: ✭ 69 (+97.14%)
Mutual labels:  geoip, maxmind
GeoIP2-CN
小巧精悍、准确、实用 GeoIP2 数据库
Stars: ✭ 3,965 (+11228.57%)
Mutual labels:  geoip2, geoip
Vendor-Threat-Triage-Lookup
Lookup file hashes, domain names and IP addresses using various vendors to assist with triaging potential threats.
Stars: ✭ 17 (-51.43%)
Mutual labels:  geoip
nginx-log-analyzer
A lightweight (simplistic) log analyzer for Nginx.
Stars: ✭ 17 (-51.43%)
Mutual labels:  geoip
ip-location-db
ip to location database by ASN, GeoFeed, Whois, iptoasn.com, db-ip lite, GeoLite2
Stars: ✭ 160 (+357.14%)
Mutual labels:  geoip

MaxMind DB Reader Ruby API

Description

This is the Ruby API for reading MaxMind DB files. MaxMind DB is a binary file format that stores data indexed by IP address subnets (IPv4 or IPv6).

Installation

gem install maxmind-db

Usage

require 'maxmind/db'

reader = MaxMind::DB.new('GeoIP2-City.mmdb', mode: MaxMind::DB::MODE_MEMORY)

record = reader.get('1.1.1.1')
if record.nil?
  puts '1.1.1.1 was not found in the database'
else
  puts record['country']['iso_code']
  puts record['country']['names']['en']
end

reader.close

For more information see the documentation.

Requirements

This code requires Ruby version 2.5 or higher.

Contributing

Patches and pull requests are encouraged. Please include unit tests whenever possible.

Support

Please report all issues with this code using the GitHub issue tracker.

If you are having an issue with a MaxMind service that is not specific to the client API, please see our support page.

Versioning

This library uses Semantic Versioning.

Copyright and License

This software is Copyright (c) 2018 - 2021 by MaxMind, Inc.

This is free software, licensed under the Apache License, Version 2.0 or the MIT License, at your option.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].