---
name: tiny-dsa
description: >
  A Python implementation of the Tiny-DSA Excel workbook, a stylized debt-sustainability tool for computing the debt-to-GDP ratio over a five-year horizon with one configurable shock. Use when writing Python code that uses the tiny_dsa package.
compatibility: Requires Python >=3.13.
---

# Tiny DSA

A Python implementation of the Tiny-DSA Excel workbook, a stylized debt-sustainability tool for computing the debt-to-GDP ratio over a five-year horizon with one configurable shock.

## Installation

```bash
pip install tiny-dsa
```

## API overview

### Functions

Public functions

- `compute_all`: Compute all target cells and return results
- `make_context`: Create an EvalContext with merged inputs
- `list_setters`: Return generated series-binding setter function names
- `list_computes`: Return generated series-binding compute function names
- `set_country_initial_debt`: Set the initial debt-to-GDP ratios for countries in the profile table
- `set_country_name`: Set the country name for the debt sustainability analysis
- `set_growth_baseline`: Set baseline real GDP growth rates for projection years 1 through 5
- `set_interest_baseline`: Set the baseline real interest rates for projection years 1 through 5
- `set_primary_balance_baseline`: Set the baseline primary balance path for projection years 1 through 5
- `set_shock_magnitudes`: Set the shock magnitudes for each shock parameter (growth, interest, primary balance)
- `set_shock_type`: Set the shock type for the scenario configuration
- `set_shock_year`: Set the shock year in the Tiny-DSA Inputs sheet
- `compute_output_baseline`: Compute the baseline debt-to-GDP trajectory for projection years 1 through 5
- `compute_output_delta`: Compute the difference between the shocked and baseline debt-to-GDP paths over the projection horizon
- `compute_output_shocked`: Returns the shocked debt-to-GDP path as a series of records

## Resources

- [llms.txt](llms.txt) — Indexed API reference for LLMs
- [llms-full.txt](llms-full.txt) — Comprehensive documentation for LLMs
