# AGENTS.md

The official Python library for the OpenAI API

## Setup

```
pnpm install
```

## Commands

```
pytest         # run the test suite
ruff check .   # lint
```

## Layout

- `src/`      1531 source files
- `tests/`    215 source files
- `examples/` 44 source files
- `scripts/`  12 source files

## Conventions

- Tests live alongside the code they cover, following `scripts/castiron/test_custom_code_budget.py`.
- CI defines what passing means. See `.github/workflows/castiron-custom-code-comment.yml`, and keep it green.
- TODO: add the two or three conventions a newcomer always gets wrong here.

## Gotchas

- `src/openai/resources/beta/responses/responses.py` is 250KB. It will not fit comfortably in context, so read it in parts.

---

Drafted by agentreadme.com from what is in this repository. Everything marked TODO
needs a human. Check it in as AGENTS.md at the root.
