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

Omit Class — anthropic-sdk-python Architecture

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

Entity Profile

Dependency Diagram

graph TD
  14d855f4_2395_cbc9_e501_5be17b6905d0["Omit"]
  87f621ac_b3e0_a225_72b3_99f9818f3002["_types.py"]
  14d855f4_2395_cbc9_e501_5be17b6905d0 -->|defined in| 87f621ac_b3e0_a225_72b3_99f9818f3002
  7dd1d5ab_b803_d95a_0c67_14b85bd98cf1["__bool__()"]
  14d855f4_2395_cbc9_e501_5be17b6905d0 -->|method| 7dd1d5ab_b803_d95a_0c67_14b85bd98cf1

Relationship Graph

Source Code

src/anthropic/_types.py lines 161–179

class Omit:
    """
    To explicitly omit something from being sent in a request, use `omit`.

    ```py
    # as the default `Content-Type` header is `application/json` that will be sent
    client.post("/upload/files", files={"file": b"my raw file content"})

    # you can't explicitly override the header as it has to be dynamically generated
    # to look something like: 'multipart/form-data; boundary=0d8382fcf5f8c3be01ca2e11002d2983'
    client.post(..., headers={"Content-Type": "multipart/form-data"})

    # instead you can remove the default `application/json` header by passing omit
    client.post(..., headers={"Content-Type": omit})
    ```
    """

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

Frequently Asked Questions

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

Analyze Your Own Codebase

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

Try Supermodel Free