# 使用 Homebrew 安装 geoip2fast

查看 geoip2fast 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

## 安装

```sh
sudo av install brew:geoip2fast
```

其他安装命令:

### macOS

- Homebrew (100%):

```sh
brew install geoip2fast
```

  证据: local Homebrew formula metadata

## 软件包事实

- **软件包键:** brew:geoip2fast
- **软件包管理器:** Homebrew
- **版本:** 1.2.2
- **来源摘要:** GeoIP2 country/ASN lookup tool
- **主页:** <https://github.com/rabuchaim/geoip2fast>
- **仓库:** <https://github.com/rabuchaim/geoip2fast>
- **已生成:** 2026-08-03T19:37:03+00:00

## 可执行文件

- geoip2dat (别名)
- geoip2fast (别名)

## 安装行为

- Bottle: 不可用

## 版本和新鲜度

- 页面生成时间: 2026-08-03
- 管理器版本: 1.2.2
## 项目历史与用法

GeoIP2Fast is a small Python GeoIP lookup library and command-line tool built around preprocessed `.dat.gz` data files derived from MaxMind GeoLite2 CSV data. Its README emphasizes pure-Python operation, no external database or web-service dependency, IPv4 and IPv6 support, country, city, ASN, CIDR, and private-network results, and very fast in-memory lookups.

### 项目历史

The authoritative public history is mostly the repository README and changelog rather than a separate project history. The repository records a Python implementation, a legacy directory, generated GeoIP2Fast data files, and command-line tools such as `geoip2fast` and `geoip2dat` for lookup and data conversion workflows.

Version 1.2.2, documented in June 2024, recorded data-format compatibility changes, MaxMind CSV field handling, optional reduced single-file variants, self-test and coverage methods, and command-line selection of data files.

### 采用历史

GeoIP2Fast appears to serve a narrower package audience than MaxMind's official clients, but it fills a practical niche for Python users who want local IP-to-country, city, and ASN lookup without a service call or external database server. Homebrew packaging adds a Unix command-line installation path alongside Python packaging.

### 使用方式

Practitioners use GeoIP2Fast by loading a bundled or generated `.dat.gz` file into memory and calling `lookup()` from Python, or by invoking the CLI with one or more IP addresses. The project also supports updating data files from release artifacts, generating data files from GeoLite2 CSV input, running speed tests, checking database coverage, and printing JSON-like lookup results.

### 为什么软件包爱好者会关心

For package users, GeoIP2Fast is interesting because it trades a larger resident data structure for dependency-light local lookups. It is most useful in scripts, batch enrichment jobs, log analysis, and small services where avoiding network calls and database setup matters more than using MaxMind's official binary database reader stack.

### 时间线

- 2024: Version 1.2.2 documented MaxMind GeoLite2 CSV field handling and v1.2 data-file compatibility changes.
- 2024: The README documented automatic `.dat.gz` downloads, CLI update commands, coverage checks, and speed-test options.

### Related projects

- GeoIP2Fast depends on MaxMind GeoLite2 CSV data as an upstream data source. Its problem space overlaps MaxMind's GeoIP database tools and local GeoIP lookup libraries, but its implementation centers on its own compressed data-file format.

### 来源

- <https://formulae.brew.sh/formula/geoip2fast>
- <https://github.com/rabuchaim/geoip2fast>


## 安全说明

narrow executable package without higher-risk signals.

- **Geiger 风险:** 绿色 / 低
- narrow executable package without higher-risk signals


## Combined YAML source

View the package source record on GitHub. [combined/geoip2fast.yml](https://github.com/mxcl/pkgdb/blob/main/combined/geoip2fast.yml)


## 来源

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- cross-ecosystem install command graph
