claude-code-sdk-python/examples
Suzanne Wang f794e17e78
Some checks failed
Lint / lint (push) Has been cancelled
Test / test (3.10) (push) Has been cancelled
Test / test (3.11) (push) Has been cancelled
Test / test (3.12) (push) Has been cancelled
Test / test (3.13) (push) Has been cancelled
Add support for custom env vars (#131)
## Key changes
- Adds env field to `ClaudeCodeOptions`, allowing custom env vars to cli
- Updates tests and examples

## Motivation
Bringing Python SDK to feature parity with TS SDK, which supports custom
env vars

## Notes
- Environment variables are merged in order: system env → user env → SDK
required vars
- This implementation seems slightly more robust than the TypeScript
version, which can exclude OS envs vars if a user passes a minimal env
object
- Some linting changes seem to have been picked up
2025-08-25 14:02:03 -07:00
..
quick_start.py cost_usd -> total_cost_usd in example 2025-06-25 15:18:52 -04:00
streaming_mode.py Add support for custom env vars (#131) 2025-08-25 14:02:03 -07:00
streaming_mode_ipython.py Improve examples 2025-07-19 19:57:17 -07:00
streaming_mode_trio.py Make streaming implementation trio-compatible (#84) 2025-07-22 23:31:42 -07:00