Skip to content

Index

PyDOGE Logo

A Python library to interact with Department of Government Efficiency (DOGE) API.


๐Ÿงพ Table of Contents
  1. About The Project
  2. Features
  3. Getting Started

๐Ÿ About The Project

PyDOGE API is an advanced, Python wrapper for interacting with the public-facing API of the Department of Government Efficiency (DOGE) โ€” a federal initiative aimed at increasing transparency and fiscal accountability by sharing detailed datasets on:

  • ๐Ÿ’ธ Cancelled grants
  • ๐Ÿ“‘ Contract terminations
  • ๐Ÿข Lease reductions
  • ๐Ÿงพ Payment transactions

๐Ÿš€ Features

  • Auto-pagination (sync or async, fetch all pages if needed)
  • .export() to CSV, Excel, or JSON with timestamped filenames
  • .to_dataframe() for Pandas users
  • .summary() with analytics (rows, nulls, dtypes, stats)
  • summary(save_as="...") for file logging
  • Returns Pydantic models & dict output
  • Retry-safe client with 429 handling
  • savings.all() โ€” one tidy DataFrame across grants, contracts & leases
  • Modern pydoge CLI (Typer + Rich) for fetch / export / summary
  • Built-in charts (bar, time-series, distribution, US-state choropleth) via the [viz] extra
  • Secure logging powered by PyLogShield (credential scrubbing + on-demand masking)

This package enables data scientists and analysts to programmatically access and analyze the data with ease.

๐Ÿ“Œ Getting Started

Installation

Install:

Bash
pip install pydoge-api
Upgrade:
Text Only
pip install --upgrade pydoge-api

Documentation

Full developer docs with API reference, usage, and model schema:

๐Ÿ‘ช Contributors

All contributions are welcome. If you have a suggestion that would make this better, please fork the repo and create a merge request. You can also simply open an issue with the label 'enhancement'.

Don't forget to give the project a star! Thanks again!

๐Ÿ‘ Acknowledgments

Inspiration, code snippets, etc.