Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Ruby reader for the MaxMind DB Database Format

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
NotificationsYou must be signed in to change notification settings

maxmind/MaxMind-DB-Reader-ruby

Repository files navigation

Description

This is the Ruby API for readingMaxMindDB files. MaxMind DB is a binaryfile 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')ifrecord.nil?puts'1.1.1.1 was not found in the database'elseputsrecord['country']['iso_code']putsrecord['country']['names']['en']endreader.close

For more information see thedocumentation.

Requirements

This code requires Ruby version 3.2 or higher.

Contributing

Patches and pull requests are encouraged. Please include unit testswhenever possible.

Support

Please report all issues with this code using theGitHub issuetracker.

If you are having an issue with a MaxMind service that is not specific to theclient API, please seeour support page.

Versioning

This library usesSemantic Versioning.

Copyright and License

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

This is free software, licensed under theApache License, Version2.0 or theMIT License, at your option.

About

Ruby reader for the MaxMind DB Database Format

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks

Packages

No packages published

[8]ページ先頭

©2009-2025 Movatter.jp