Home / Function/ is_uploadfile_sequence_annotation() — fastapi Function Reference

is_uploadfile_sequence_annotation() — fastapi Function Reference

Architecture documentation for the is_uploadfile_sequence_annotation() function in shared.py from the fastapi codebase.

Function python FastAPI Responses calls 2 called by 1

Entity Profile

Dependency Diagram

graph TD
  0dc3f135_78b9_7c51_1a27_130a2c8730e3["is_uploadfile_sequence_annotation()"]
  3e898b29_4dd8_c417_2d9b_a84d867423b4["shared.py"]
  0dc3f135_78b9_7c51_1a27_130a2c8730e3 -->|defined in| 3e898b29_4dd8_c417_2d9b_a84d867423b4
  49606f88_23f6_dc38_1db8_0961cd4412e7["test_is_uploadfile_sequence_annotation()"]
  49606f88_23f6_dc38_1db8_0961cd4412e7 -->|calls| 0dc3f135_78b9_7c51_1a27_130a2c8730e3
  8270df11_9596_bb04_cf3e_ab064ec2d09a["field_annotation_is_sequence()"]
  0dc3f135_78b9_7c51_1a27_130a2c8730e3 -->|calls| 8270df11_9596_bb04_cf3e_ab064ec2d09a
  245eea39_2ef6_5396_6a25_33a04a249c5c["is_uploadfile_or_nonable_uploadfile_annotation()"]
  0dc3f135_78b9_7c51_1a27_130a2c8730e3 -->|calls| 245eea39_2ef6_5396_6a25_33a04a249c5c
  style 0dc3f135_78b9_7c51_1a27_130a2c8730e3 fill:#6366f1,stroke:#818cf8,color:#fff

Relationship Graph

Source Code

fastapi/_compat/shared.py lines 165–177

def is_uploadfile_sequence_annotation(annotation: Any) -> bool:
    origin = get_origin(annotation)
    if origin is Union or origin is UnionType:
        at_least_one = False
        for arg in get_args(annotation):
            if is_uploadfile_sequence_annotation(arg):
                at_least_one = True
                continue
        return at_least_one
    return field_annotation_is_sequence(annotation) and all(
        is_uploadfile_or_nonable_uploadfile_annotation(sub_annotation)
        for sub_annotation in get_args(annotation)
    )

Domain

Subdomains

Frequently Asked Questions

What does is_uploadfile_sequence_annotation() do?
is_uploadfile_sequence_annotation() is a function in the fastapi codebase, defined in fastapi/_compat/shared.py.
Where is is_uploadfile_sequence_annotation() defined?
is_uploadfile_sequence_annotation() is defined in fastapi/_compat/shared.py at line 165.
What does is_uploadfile_sequence_annotation() call?
is_uploadfile_sequence_annotation() calls 2 function(s): field_annotation_is_sequence, is_uploadfile_or_nonable_uploadfile_annotation.
What calls is_uploadfile_sequence_annotation()?
is_uploadfile_sequence_annotation() is called by 1 function(s): test_is_uploadfile_sequence_annotation.

Analyze Your Own Codebase

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

Try Supermodel Free