Skip to content

Releases

v0.2.1

Choose a tag to compare

@rustyconover rustyconover released this 29 Nov 20:40

Container image for Orchard hosting: ghcr.io/query-farm/vgi-cloudflare:0.2.1 (multi-arch, cosign-signed), serving HTTP on $PORT by default or stdio with stdio. Published by .github/workflows/docker-publish.yml on each vX.Y.Z tag (:edge from main). Speaks VGI protocol 3.4 (vgi-python 0.55); Orchard hosted mode (VGI_ORCHARD_HOSTED=1) built in. Credentials come only from DuckDB secrets.

v0.2.0

Choose a tag to compare

@rustyconover rustyconover released this 25 Nov 17:55

Full Changelog: v0.1.4...v0.2.0

v0.1.4

Choose a tag to compare

@rustyconover rustyconover released this 17 Nov 00:58

Full Changelog: v0.1.3...v0.1.4

v0.1.3

Choose a tag to compare

@rustyconover rustyconover released this 15 Nov 06:36

Full Changelog: v0.1.2...v0.1.3

v0.1.2

Choose a tag to compare

@rustyconover rustyconover released this 14 Nov 19:35

Patch release.

  • Fix: generated analytics examples were stale or failing. They used fixed September 2026 windows; the hourly/adaptive datasets only keep a few days of data, so Cloudflare rejected those examples ("cannot request data older than 3d1h"). Examples now use rolling windows: the last 7 full days (since := current_date - 7, until := current_date - 1) for daily data and the last 6 hours (date_trunc('hour', now()) - INTERVAL 6 HOUR … date_trunc('hour', now())) for hourly/event data.
  • The analytics functions' docs no longer say windows must be constants in a lateral call: current_date/now() expressions work there, and the docs now mention retention limits.
  • README analytics examples use the rolling window; a broken README sentence is fixed.

Install: uvx --from git+https://github.com/Query-farm/vgi-cloudflare@v0.1.2 vgi-cloudflare

v0.1.1

Choose a tag to compare

@rustyconover rustyconover released this 14 Nov 19:26

Patch release.

  • The composed "traffic vs DNS" example (on analytics.http_requests_daily, the analytics schema and the README) now uses a rolling window, the last 7 full days (since := current_date - 7, until := current_date - 1), instead of the hardcoded 2026-11-01 – 2026-11-07, so it keeps returning current traffic.

Install: uvx --from git+https://github.com/Query-farm/vgi-cloudflare@v0.1.1 vgi-cloudflare

Full notes for the first release: v0.1.0.

v0.1.0

Choose a tag to compare

@rustyconover rustyconover released this 14 Nov 17:35

First release of vgi-cloudflare, a read-only VGI worker that lets you query the Cloudflare API from DuckDB/Haybarn as ordinary tables. It covers zones, DNS, Zero Trust, Workers, security, traffic analytics and Radar, and every answer comes live from Cloudflare's REST and GraphQL APIs using your own API token.

What's inside

  • About 2,000 catalog objects under cloudflare.<schema>.<object>:
    • Tables are the unscoped starting points, such as cloudflare.zones.zones and cloudflare.accounts.accounts.
    • List functions take the ids from their URL as arguments, so one statement fans out across every zone. An example is cloudflare.dns.records(zone_id, type := 'A').
    • Lookup functions fetch one object by id. An example is cloudflare.dns.record(zone_id, id); an unknown id returns no row.
  • Read-only by construction. The client only sends GETs and GraphQL queries, and ids that go into URL paths are percent-encoded.
  • Credentials come from a DuckDB secret: CREATE SECRET (TYPE cloudflare, api_token '...'). A legacy Global API Key with an email also works.

Composed examples

Each of these is listed on the objects and schemas it uses, and in vgi.example_queries:

  • DNS-only proxiable records across every zone combines zones.zones with dns.records.
  • Zone security posture shows each zone's SSL mode, Always Use HTTPS setting and DNSSEC status. It combines zones.zones, zones.setting (used twice) and dns.dnssec.
  • Each zone's DNS record count next to a week of requests and its cache-hit share combines zones.zones, dns.records and analytics.http_requests_daily.

Quick start

You need a VGI 3 client such as Haybarn 2.0.0rc11 or newer.

LOAD vgi;
ATTACH 'cloudflare' (TYPE vgi,
  LOCATION 'launch:uvx --from git+https://github.com/Query-farm/vgi-cloudflare@v0.1.0 vgi-cloudflare');
CREATE SECRET cf (TYPE cloudflare, api_token '<your-api-token>');
SELECT name, status FROM cloudflare.zones.zones;

The worker is not published to PyPI. Install it from this repository as shown above.

Known limits

  • You need a Cloudflare API token, and every query is a live API call, so Cloudflare's rate limits apply. The "Read all resources" token template covers nearly everything. An object your token can't reach fails with Cloudflare's own permission error.
  • It is read-only: there are no writes.
  • Some analytics and Radar datasets depend on your plan or entitlements.
  • Building the catalog takes a couple of seconds on a cold start. Use launch: to keep one warm worker that every connection shares.