Scan your whole stack
Are you using gdeltforge?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v0.18.0
gdeltforge was last scanned on 23 Nov 2026 at version 0.18.0. Risk score 0 of 100. No malicious behavior was detected.
| Version | Published | Status |
|---|---|---|
| 0.18.0 LATEST | 23 Nov 2026 | No rules fired |
| 0.17.1 | 18 Nov 2026 | No rules fired |
| 0.17.0 | 17 Nov 2026 | No rules fired |
| 0.16.0 | 9 Nov 2026 | Not shown |
| 0.15.0 | 6 Nov 2026 | Not shown |
Findings for v0.18.0. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.
The score describes 0.18.0; other versions have their own rules, not their own score.
The publisher’s own README, as collected from the registry.
pip install gdeltforge
gdeltforge --help
GDELT publishes its full archive (Events since 1979, GKG 1.0 since 2013, GKG 2.1 and Mentions since 2015) as hundreds of thousands of raw files. Drawing a sample from it that another researcher can reproduce, and whose relation to the archive is known, is harder than it should be: GDELT's search APIs answer bounded queries (the DOC API, for instance, returns up to 250 articles from the last three months), and BigQuery's tables stay in Google's warehouse, not on your own disk.
GdeltForge is a command-line pipeline that downloads that archive, converts it to Parquet, repairs GDELT's documented errors, and draws seeded samples whose design (simple random, stratified by period or by column) is stated explicitly, on a single machine. It was written for research on representation learning over GDELT events; see Background and citing.
convert) and repaired (clean) in separate directoriesscrape/convert/clean/sample/crossref) as its own commandOf the ways GDELT offers its data (see Related Work for others), three matter here: its search APIs, BigQuery, and the raw archive, the one published as files to download.
GDELT's search APIs answer bounded queries about news coverage:
None of them returns the Events, Mentions or GKG tables themselves.
BigQuery holds the full history and answers SQL over it, within a free tier of 1 TiB of queries a month. Its tables are hosted by Google, not kept on your own disk, and some research workflows need a local, offline copy.
The raw GDELT archives contain hundreds of thousands of files (the Events directory alone about 5,000). Processing them requires:
GdeltForge performs these steps, one command per stage.
Several other tools work with GDELT, each the better choice for some questions (a recent window, an analysis that fits in memory, SQL over the whole archive). GdeltForge focuses on two things. It treats sampling as a stage of its own: seeded designs that stream over the full archive on one machine and can be stated in a methods section. And it joins Events to GKG 2.1, which carries no event identifier, through Mentions, keeping the many-to-many relation between events and articles.
See Related Work for the other tools, what each is designed for, and when each fits better.
The pipeline follows a single-responsibility, single-stage execution model. Each command performs exactly one transformation:
| Stage | Does |
|---|---|
scrape |
download raw GDELT CSV files (Events, GKG 2.1, GKG 1.0, or Mentions) |
convert |
transform CSV -> Parquet |
clean |
repair known GDELT errors and keep every row by default (rows missing a value are dropped only for the columns listed in clean.columns_to_check), shape the output, mark every file and audit every run |
sample |
reproducibly sample from Parquet files |
crossref |
join a sampled Events output back onto GKG |
Each stage is explicit:
The same stages run independently per dataset (--dataset events, gkg-v2, mentions, ...); crossref is the one stage that reads two datasets at once, joining a sampled Events output against a GKG dataset processed the same way.
Each stage consumes the output of the previous one, enabling incremental execution, streaming-friendly operations, memory-efficient processing, simple debugging, and reusable intermediate data.
pip install gdeltforge
gdeltforge --help
No config file required to get started: GdeltForge falls back to a conservative built-in default (real ./data/... paths, no row/column filtering) and writes it to config/settings.yaml the first time you run a command with nothing else configured, so it works immediately in a fresh environment like a Colab session. See Configuration to customize it instead.
This project uses uv for dependency management; uv sync builds and installs GdeltForge itself (editable), so the gdeltforge command becomes available inside the virtual environment.
# Install uv (if not already installed)
pip install uv
git clone https://github.com/Vinicius-Teixeirac/GdeltForge.git
cd GdeltForge
# Create virtual environment, install dependencies, and install GdeltForge itself
uv sync
# Activate the virtual environment
# Windows
.venv\Scripts\activate
# macOS / Linux
source .venv/bin/activate
# Verify the CLI is installed
gdeltforge --help
Optional, but worth doing for a real project rather than accepting the built-in default: copy the example config and adjust paths:
cp config/settings.example.yaml config/settings.yaml
The test suite is pure unit tests (no network access, no browser, no real GDELT data required) covering the scraping and conversion logic.
uv sync --group dev
uv run pytest
GdeltForge follows a standard src/ package layout, installable via uv sync / pip install.
project_root/
├── config/
│ └── settings.example.yaml # Annotated starting point; copy to settings.yaml and edit
│
├── src/gdeltforge/
│ ├── py.typed # PEP 561 marker: this package ships inline type hints
│ ├── cli.py # Argument parsing + subcommand dispatch
│ ├── launcher.py # The gdeltforge command's entry point: sizes polars' thread pool before polars loads, then runs cli
│ ├── __main__.py # python -m gdeltforge, through the same launcher
│ ├── _version.py # Generated at build time from the git tag (hatch-vcs); not hand-edited
│ │
│ ├── config/
│ │ └── default_settings.yaml # Bundled fallback config, used when no settings.yaml/--config is found at all
│ │
│ ├── data/
│ │ ├── cameo_codes.json # Bundled CAMEO/FIPS code -> name reference data, backs the `codes` command
│ │ └── places.parquet # Bundled place table: one place per (FeatureID, Lat, Long) GDELT wrote, backs clean.places
│ │
│ ├── aggregation/
│ │ └── aggregator.py # Concatenates a period's 15-minute files (GKG 2.1, Mentions, events-15min) into one per day/month/year
│ │
│ ├── conversion/
│ │ └── converter.py # CSV -> Parquet conversion logic
│ │
│ ├── crossref/
│ │ └── crossref.py # Events<->GKG join (direct for GKG 1.0, two-hop via Mentions for GKG 2.1)
│ │
│ ├── cleaning/
│ │ ├── cleaner.py # The clean stage: runs its steps on every file
│ │ ├── places.py # Loads the bundled place table for the places step
│ │ └── steps.py # The stage's steps, applied in one fixed order
│ │
│ ├── filtering/
│ │ └── filter.py # Deprecation shim: the pre-0.12 filter names, forwarding to cleaning/
│ │
│ ├── sampling/
│ │ ├── cameo_codes.py # Loads data/cameo_codes.json, groups columns by code family, backs the `codes` command
│ │ ├── indexer.py # File indexing for reproducible sampling
│ │ ├── rng.py # Random number generation helpers
│ │ └── samplers.py # Indexed, calendar, and filtered sampling
│ │
│ ├── scraping/
│ │ └── scraper.py # Downloader for Events, GKG 2.1, GKG 1.0, and Mentions
│ │
│ └── utils/
│ ├── branding.py # Terminal ANSI colors and the --version banner (brand system's terminal voice)
│ ├── concurrency.py # Sizes each worker's polars thread pools to its share of the machine, and caps concurrent reads (io.max_concurrent_reads)
│ ├── config.py # Config resolution (--config / env var / CWD / bundled default) and YAML loading
│ ├── io.py # File and chunked-IO helpers
│ └── logging.py # Central logging system
│
├── docs/assets/brand/ # Emblem, favicon, wordmark lockups, icon set, GitHub social preview
├── tests/ # pytest suite (unit tests, no network/browser required)
├── tools/ # Maintainer tools that build the place table, with the gazetteer references and repairs it cites
│
├── main.py # Backward-compatible shim: `python main.py <command>` still works
├── pyproject.toml # Package metadata, build backend, gdeltforge console-script entry point
└── README.md
Run pipeline stages using the installed console script:
gdeltforge <command> [options]
python main.py <command> [options] is kept as a backward-compatible equivalent, so existing scripts keep working unchanged. This alias only exists in a source checkout, not in the PyPI package installed above; gdeltforge itself always works either way.
| Command | Description |
|---|---|
scrape |
Download raw GDELT data (ZIP -> CSV) |
convert |
Convert downloaded CSV files to Parquet |
clean |
Clean converted Parquet: the data-quality stage (formerly filter) |
aggregate |
Concatenate the 15-minute datasets' files into one per day, month or year |
sample |
Efficient, reproducible sampling |
crossref |
Join a sampled Events output back onto GKG |
codes |
Look up valid CAMEO/FIPS codes across seven column families |
The CLI intentionally does not chain stages automatically. You run each stage explicitly to maintain full control.
By default the config is read from ./config/settings.yaml (relative to wherever you run the command from). To point at a config file anywhere else on disk, use --config /path/to/settings.yaml or set the GDELTFORGE_CONFIG environment variable, useful once GdeltForge is installed and invoked from outside the repo checkout. If none of those resolve to a real file, GdeltForge falls back to a built-in default instead of failing; see Configuration.
Examples of the common workflows, one stage at a time.
Download the entire archive (--dataset is required on every command; see CLI Reference for the other six choices):
gdeltforge scrape --dataset events
Download only files within a date range (any combination of bounds is valid):
gdeltforge scrape --dataset events --start-date 2020-01-01 --end-date 2023-12-31
gdeltforge scrape --dataset events --start-date 2022-01-01 # from date onward
gdeltforge scrape --dataset events --end-date 2015-12-31 # up to date
The filter applies to all three file types the GDELT archive provides:
| File type | Example filename | Included when |
|---|---|---|
| Daily | 20200315.export.CSV.zip |
day falls within range |
| Monthly | 202003.zip |
month overlaps range |
| Yearly | 2020.zip |
year overlaps range |
Files already present in the download directory are skipped regardless of the date filter.
Downloads run concurrently (scraping.max_workers in config/settings.yaml, default 8) and are checksum-verified: the GDELT index publishes an MD5 per file, which the scraper captures and checks against each download after it completes. A mismatch is treated the same as a network failure: the file is discarded and retried up to scraping.retries times before being reported as failed, so a corrupted or truncated download never silently ends up in the dataset.
The scraper needs to read the file index at data.gdeltproject.org/events/ before it can download anything. That index turns out to be a plain, server-rendered HTML directory listing (not JS-rendered), so a headless browser is unnecessary overhead. scraping.method in config/settings.yaml controls which collector is used:
Find threats in your stack.
OX Radar can check high-priority threats, like critical package CVEs, against your context.
Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.
The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.