Skip to content
DevelopmentFinanceObservatoryPublic

About

Python and TypeScript clients for the Development Finance Observatory APIs

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

DFO SDK

Client libraries for the Development Finance Observatory APIs at developmentfinance.org. Ask a question about aid, debt, or development indicators in your own words, check what DFO understood, and get a versioned table back.

pip install "development-finance[pandas]"
import dfo

answer = dfo.search("ODA from Germany to Nigeria")
print(answer)
df = answer.fetch().to_pandas()
Germany's gross disbursements to Nigeria for official development assistance, 1960 to 2024. Current US dollars · OECD DAC2a.
  Fetch: answer.fetch()

The Python package imports as dfo. Its README has a recipe for each common task:

TypeScript

npm install @developmentfinance/client

The client has the search, choose, fetch, ref, lookup, analysis, card, and share calls under TypeScript names, and no CLI or disk cache. It runs in Node, Bun, Deno, Workers, and browsers. The API's CORS admits only the origins it lists, so a page on another origin calls your own server route, or a same-origin proxy of the API with baseUrl: "/api/v1". Its README covers the quickstart and a web-app route.

The contract

Both clients follow the client contract kept in spec-kit, which contract/ copies at the commit contract/SOURCE names. A dataset ref and a saved answer written by one client work in the other. The TypeScript client reads the credentials file the Python CLI writes. CONTRIBUTING.md explains how the contract is synced and how releases are cut.

About

Python and TypeScript clients for the Development Finance Observatory APIs

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages