Skip to content

Conversation

@svlandeg
Copy link
Member

Reference docs for Typer 🚀

  • Add reference docs menu to the top navigation bar of the Typer docs
  • Add following items to the reference docs (defined in mkdocs.yml):
    • index.md
    • typer.md: everything about Typer()
    • run_launch.md: about typer.run() and typer.launch()
    • parameters.md: all details about Argument() and Option
    • file_objects.md: FileBinaryRead, FileBinaryWrite, FileText, FileTextWrite
    • context.md: Context and CallbackParam
  • Added links to the tutorial where relevant
  • Add annotated-doc as project requirement

Special cases

Undocumented functionality

The following stuff isn't documented in our Tutorial docs, and in the reference docs here I include a note saying something like

Note: you probably shouldn't use this parameter, it is inherited from Click and supported for compatibility.

then followed by a quick description from the Click docs.

From main.py:

  • subcommand_metavar in main.py
  • chain in main.py
  • result_callback in main.py
  • add_help_option in main.py

From params.py:

  • expose_value in params.py
  • prompt_required in params.py
  • errors (for a file) in params.py
  • show_choices in params.py
  • allow_from_autoenv in params.py

Marked as "will be deprecated"

The following have gotten the following note:

Note: you probably shouldn't use this parameter, it is inherited from Click and supported for compatibility. It is however not fully functional, and will likely be removed in future versions.

From params.py:

  • shell_complete in params.py
  • is_flag in params.py
  • flag_value in params.py

Should perhaps be documented in the tutorial?

  • hidden in main.py (we only document hidden for parameters, not for commands)

Open questions

Any other things that need documenting?

I was thinking about Abort, BadParameter, Exit but these come directly from Click and so the way of documenting these would be different (i.e. not via docstrings).

@svlandeg svlandeg added the docs Improvements or additions to documentation label Jan 26, 2026
@svlandeg svlandeg self-assigned this Jan 26, 2026
@svlandeg svlandeg marked this pull request as ready for review January 26, 2026 16:08
@svlandeg svlandeg removed their assignment Jan 26, 2026
@svlandeg svlandeg linked an issue Jan 26, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Typer python API docs

1 participant