Home / Class/ NotGiven Class — anthropic-sdk-python Architecture

NotGiven Class — anthropic-sdk-python Architecture

Architecture documentation for the NotGiven class in _types.py from the anthropic-sdk-python codebase.

Entity Profile

Dependency Diagram

graph TD
  f30eca5a_2fa0_68c1_64aa_b52331a2dcc8["NotGiven"]
  87f621ac_b3e0_a225_72b3_99f9818f3002["_types.py"]
  f30eca5a_2fa0_68c1_64aa_b52331a2dcc8 -->|defined in| 87f621ac_b3e0_a225_72b3_99f9818f3002
  4fede1dd_6e2e_66f1_76f9_703c4691713e["__bool__()"]
  f30eca5a_2fa0_68c1_64aa_b52331a2dcc8 -->|method| 4fede1dd_6e2e_66f1_76f9_703c4691713e
  8c41a6de_647c_299b_5451_f48df643cbc1["__repr__()"]
  f30eca5a_2fa0_68c1_64aa_b52331a2dcc8 -->|method| 8c41a6de_647c_299b_5451_f48df643cbc1

Relationship Graph

Source Code

src/anthropic/_types.py lines 128–153

class NotGiven:
    """
    For parameters with a meaningful None value, we need to distinguish between
    the user explicitly passing None, and the user not passing the parameter at
    all.

    User code shouldn't need to use not_given directly.

    For example:

    ```py
    def create(timeout: Timeout | None | NotGiven = not_given): ...


    create(timeout=1)  # 1s timeout
    create(timeout=None)  # No timeout
    create()  # Default timeout behavior
    ```
    """

    def __bool__(self) -> Literal[False]:
        return False

    @override
    def __repr__(self) -> str:
        return "NOT_GIVEN"

Frequently Asked Questions

What is the NotGiven class?
NotGiven is a class in the anthropic-sdk-python codebase, defined in src/anthropic/_types.py.
Where is NotGiven defined?
NotGiven is defined in src/anthropic/_types.py at line 128.

Analyze Your Own Codebase

Get architecture documentation, dependency graphs, and domain analysis for your codebase in minutes.

Try Supermodel Free