{"id":15293151,"url":"https://github.com/fischerscode/dart-maxminddb","last_synced_at":"2025-04-13T12:29:11.027Z","repository":{"id":42895373,"uuid":"413633397","full_name":"fischerscode/dart-maxmindDB","owner":"fischerscode","description":"This dart library is capable of searching IP addresses in MAXMINDs mmdb databases.","archived":false,"fork":false,"pushed_at":"2023-09-04T15:41:30.000Z","size":44,"stargazers_count":6,"open_issues_count":1,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T03:34:44.210Z","etag":null,"topics":["dart","dartlang","geoip2","maxmind"],"latest_commit_sha":null,"homepage":"","language":"Dart","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fischerscode.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-10-05T01:15:42.000Z","updated_at":"2024-04-19T07:58:10.000Z","dependencies_parsed_at":"2024-10-14T21:41:24.404Z","dependency_job_id":null,"html_url":"https://github.com/fischerscode/dart-maxmindDB","commit_stats":null,"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fischerscode%2Fdart-maxmindDB","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fischerscode%2Fdart-maxmindDB/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fischerscode%2Fdart-maxmindDB/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fischerscode%2Fdart-maxmindDB/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fischerscode","download_url":"https://codeload.github.com/fischerscode/dart-maxmindDB/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248713813,"owners_count":21149784,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["dart","dartlang","geoip2","maxmind"],"created_at":"2024-09-30T16:40:00.476Z","updated_at":"2025-04-13T12:29:11.004Z","avatar_url":"https://github.com/fischerscode.png","language":"Dart","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![](https://img.shields.io/pub/v/maxminddb)](https://pub.dev/packages/maxminddb)\n[![CI](https://github.com/fischerscode/dart-maxmindDB/actions/workflows/ci.yaml/badge.svg)](https://github.com/fischerscode/dart-maxmindDB/actions/workflows/ci.yaml)\n\n# dart-maxmindDB\n\nThis dart library is capable of searching ip addresses in [MAXMINDs mmdb databases](https://maxmind.github.io/MaxMind-DB/).\n\nAs its main use case, this library can be used to get the geo location of an IP address by using the [GeoLite2 Database](https://dev.maxmind.com/geoip/geolite2-free-geolocation-data).\n\n## Usage in command line:\n- `dart pub global activate maxminddb`\n- `maxminddb search 1.2.3.4`\n- Usage documentation: `maxminddb -h`\n\n## Usage in a dart program:\n1. Initialize the database:\n   ```dart\n   var database = await MaxMindDatabase.memory(\n        File('GeoLite2-City.mmdb').readAsBytesSync());\n\n   // OR\n\n   var database = await MaxMindDatabase.file(File('GeoLite2-City.mmdb'));\n   ```\n2. Search the database:\n   ```dart\n   print(await database.search('8.8.8.8'));\n   ```\nThe result might vary depending on the database you are using.\n\nThe database can either be loaded in memory or queried from a file system.\nDepending on the compute power and **disk speed**, loading the database in memory should be roughly 20 times faster.\n\nThe library can be benchmarked using the [benchmark example](example/benchmark.dart).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffischerscode%2Fdart-maxminddb","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffischerscode%2Fdart-maxminddb","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffischerscode%2Fdart-maxminddb/lists"}