Home / Function/ construct() — anthropic-sdk-python Function Reference

construct() — anthropic-sdk-python Function Reference

Architecture documentation for the construct() function in _models.py from the anthropic-sdk-python codebase.

Function python AnthropicClient AsyncAPI calls 1 called by 12

Entity Profile

Dependency Diagram

graph TD
  4e74c968_63fc_ca6c_ccf4_c01326e7060e["construct()"]
  650dd236_1578_b957_3fd7_c129ccfee18e["FinalRequestOptions"]
  4e74c968_63fc_ca6c_ccf4_c01326e7060e -->|defined in| 650dd236_1578_b957_3fd7_c129ccfee18e
  57e8da7b_af31_35a8_78f7_c274f7fbb350["construct()"]
  57e8da7b_af31_35a8_78f7_c274f7fbb350 -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e
  839eb1b8_70aa_074d_a52b_fad472cf23c5["get()"]
  839eb1b8_70aa_074d_a52b_fad472cf23c5 -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e
  02cfff5e_3d87_fab1_af50_807a35024e60["post()"]
  02cfff5e_3d87_fab1_af50_807a35024e60 -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e
  d930ee05_6ad8_f29b_14ca_02564abee461["patch()"]
  d930ee05_6ad8_f29b_14ca_02564abee461 -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e
  3eb4686b_7ea1_5338_7572_5a1df91005b0["put()"]
  3eb4686b_7ea1_5338_7572_5a1df91005b0 -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e
  51664634_6070_af12_f734_96526c0a04fa["delete()"]
  51664634_6070_af12_f734_96526c0a04fa -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e
  29ba82c2_84c4_d715_dbaa_89eef1782535["get_api_list()"]
  29ba82c2_84c4_d715_dbaa_89eef1782535 -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e
  0321ec6d_be63_d01b_dd18_6d76cd735609["get()"]
  0321ec6d_be63_d01b_dd18_6d76cd735609 -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e
  f21e2892_dedc_333a_91eb_efbaa5aaded3["post()"]
  f21e2892_dedc_333a_91eb_efbaa5aaded3 -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e
  e5242aaa_095d_25da_f39e_7db21a476f1e["patch()"]
  e5242aaa_095d_25da_f39e_7db21a476f1e -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e
  d01d8266_caa3_11ad_83a4_7560fbb7aa62["put()"]
  d01d8266_caa3_11ad_83a4_7560fbb7aa62 -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e
  65dac939_94f8_a0b5_8298_1d86bedb31a1["delete()"]
  65dac939_94f8_a0b5_8298_1d86bedb31a1 -->|calls| 4e74c968_63fc_ca6c_ccf4_c01326e7060e
  57e8da7b_af31_35a8_78f7_c274f7fbb350["construct()"]
  4e74c968_63fc_ca6c_ccf4_c01326e7060e -->|calls| 57e8da7b_af31_35a8_78f7_c274f7fbb350
  style 4e74c968_63fc_ca6c_ccf4_c01326e7060e fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

src/anthropic/_models.py lines 901–914

    def construct(  # type: ignore
        cls,
        _fields_set: set[str] | None = None,
        **values: Unpack[FinalRequestOptionsInput],
    ) -> FinalRequestOptions:
        kwargs: dict[str, Any] = {
            # we unconditionally call `strip_not_given` on any value
            # as it will just ignore any non-mapping types
            key: strip_not_given(value)
            for key, value in values.items()
        }
        if PYDANTIC_V1:
            return cast(FinalRequestOptions, super().construct(_fields_set, **kwargs))  # pyright: ignore[reportDeprecated]
        return super().model_construct(_fields_set, **kwargs)

Subdomains

Calls

Frequently Asked Questions

What does construct() do?
construct() is a function in the anthropic-sdk-python codebase, defined in src/anthropic/_models.py.
Where is construct() defined?
construct() is defined in src/anthropic/_models.py at line 901.
What does construct() call?
construct() calls 1 function(s): construct.
What calls construct()?
construct() is called by 12 function(s): construct, delete, delete, get, get, get_api_list, patch, patch, and 4 more.

Analyze Your Own Codebase

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

Try Supermodel Free