MCPcopy Create free account
hub / github.com/openai/openai-agents-python / parse_args

Function parse_args

examples/run_examples.py:372–463  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

370
371
372def parse_args() -> argparse.Namespace:
373 parser = argparse.ArgumentParser(description="Run example scripts sequentially.")
374 parser.add_argument(
375 "--filter",
376 "-f",
377 action="append",
378 default=[],
379 help="Case-insensitive substring filter applied to the relative path.",
380 )
381 parser.add_argument(
382 "--dry-run", action="store_true", help="List commands without running them."
383 )
384 parser.add_argument(
385 "--include-interactive",
386 action="store_true",
387 help="Include examples that prompt for user input or human-in-the-loop approvals.",
388 )
389 parser.add_argument(
390 "--include-server",
391 action="store_true",
392 help="Include long-running server-style examples (HTTP servers, background services).",
393 )
394 parser.add_argument(
395 "--include-audio",
396 action="store_true",
397 help="Include voice or realtime audio examples that require a microphone/speaker.",
398 )
399 parser.add_argument(
400 "--include-external",
401 action="store_true",
402 help="Include examples that rely on extra services like Redis, Dapr, Twilio, or Playwright.",
403 )
404 parser.add_argument(
405 "--verbose",
406 action="store_true",
407 help="Show detected tags for each example entry.",
408 )
409 parser.add_argument(
410 "--logs-dir",
411 default=str(LOG_DIR_DEFAULT),
412 help="Directory for per-example logs and main log.",
413 )
414 parser.add_argument(
415 "--main-log",
416 default=str(DEFAULT_MAIN_LOG),
417 help="Path to write the main summary log.",
418 )
419 parser.add_argument(
420 "--artifacts-dir",
421 default=str(ARTIFACTS_DIR_DEFAULT),
422 help="Directory for example-generated artifacts.",
423 )
424 parser.add_argument(
425 "--rerun-file",
426 help="Only run examples listed in this file (one relative path per line).",
427 )
428 parser.add_argument(
429 "--write-rerun",

Callers 1

mainFunction · 0.70

Calls 1

getMethod · 0.45

Tested by

no test coverage detected