MCPcopy Index your code
hub / github.com/fastapi/fastapi / read

Method read

fastapi/datastructures.py:86–102  ·  view source on GitHub ↗

Read some bytes from the file. To be awaitable, compatible with async, this is run in threadpool.

(
        self,
        size: Annotated[
            int,
            Doc(
                """
                The number of bytes to read from the file.
                """
            ),
        ] = -1,
    )

Source from the content-addressed store, hash-verified

84 return await super().write(data)
85
86 async def read(
87 self,
88 size: Annotated[
89 int,
90 Doc(
91 """
92 The number of bytes to read from the file.
93 """
94 ),
95 ] = -1,
96 ) -> bytes:
97 """
98 Read some bytes from the file.
99
100 To be awaitable, compatible with async, this is run in threadpool.
101 """
102 return await super().read(size)
103
104 async def seek(
105 self,

Callers 5

test_upload_fileFunction · 0.95
_extract_form_bodyFunction · 0.80
test_eventsFunction · 0.80
testFunction · 0.80
testFunction · 0.80

Calls

no outgoing calls

Tested by 4

test_upload_fileFunction · 0.76
test_eventsFunction · 0.64
testFunction · 0.64
testFunction · 0.64