Skip to content

Allow disabling rich using environment variable. #746

@racinmat

Description

@racinmat

Currently, the https://www.structlog.org/en/stable/console-output.html does not allow disabling rectangular stack traces in rich is installed.
Unfortunately, some libraries, e.g. tadata-org/fastapi_mcp#225 have rich as direct dependency, and there is no reasonable way how to uninstall it. For these cases, having environment variable to disable the behavior would be useful.
Other libraries using rich optionally provide this, e.g.

  • typer allows disabling it by setting _TYPER_STANDARD_TRACEBACK=1.
  • fastmcp allows disabling it by setting FASTMCP_ENABLE_RICH_TRACEBACKS=0.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions