Skip to content
DevelopmentFinanceObservatoryPublic

About

Search, Datasets, and Graph APIs that turn questions about development finance into datasets.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Latest commit

 

History

1,470 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

DFO data APIs

HTTP APIs that turn a plain-English question about development finance into a precise data definition, build a versioned dataset from it, and serve the result as CSV, Parquet, or Excel files. The service is a Python FastAPI application that runs as one container image.

It is part of the Development Finance Observatory (DFO), an initiative of ONE Data built on Google Data Commons. The organisation profile lists its repositories.

This repository is under active development. Interfaces, schemas, and data may change without notice.

Use the API

The API is served from the DFO website. Every route is under /api/v1. Requests work without an API key.

curl -fsS https://developmentfinance.org/api/v1/search/healthz

The API guide walks through a full request: resolve a question, create a dataset, and download the files. Concepts explains specs, versions, and the confirmation sentence, and API conventions covers URLs, versioning, and errors.

What's inside

The service mounts these API surfaces on one shared HTTP platform:

  • Search API (/api/search) resolves a natural-language request with Gemini against a Data Commons graph and returns a structured data specification.
  • Datasets API (/api/datasets) creates dataset definitions, materialises observation tables to files, and tracks versions.
  • Graph API (/api/graph) resolves names to graph nodes and describes the data available in the graph.
  • Presentation API (/api/presentation) assembles dataset frames into component specifications for rendering.
  • Skills API (/api/skills) serves the published skills catalogue.

Each API surface, along with storage and composition, has a package in src/. The packages/dfo-data-tools workspace package contains the SDMX client, materialisation pipeline, and shared HTTP platform. Routes, response headers, and configuration variables are in the reference. The package layout is in the maintainer notes.

Getting started

The test suite runs offline against recorded fixtures and works without cloud access. You need Python 3.12 through uv, the just command runner, Docker, and a clone of spec-kit beside this checkout (../dfo-spec-kit) at the commit pyproject.toml pins.

just setup    # env file, dependencies, pre-commit hooks
just check    # lint, type check, workflow lint, the full test suite, and the package smoke check

The just dev recipe starts the server, which requires access to Gemini, a Data Commons graph, and two published artefacts: the coverage index and origin catalogue in ONE's Google Cloud project (dev-fin-observatory). Without that access, read the code, run the tests, and use the public API above.

With access, set GEMINI_API_KEY in .env, then start the server with hot reload on port 8083 and check it:

just dev
curl http://localhost:8083/api/search/healthz

Documentation

  • API guide: quickstart, concepts, and how-tos for the public API.
  • Reference: endpoints, platform headers, and configuration.
  • Maintainer notes: package layout, evaluation harness, CI, containers, and releases.
  • Deployment: Cloud Run, migrations, and scheduled jobs.

Contributing

Issues and pull requests are welcome. See CONTRIBUTING.md.

Licence

MIT. See LICENSE.

About

Search, Datasets, and Graph APIs that turn questions about development finance into datasets.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages