bucket
An organisation's bucket, as a client reaches it.
The platform never reaches an organisation's bucket: it signs each request,
and the client sends it from where the organisation's network reaches the
bucket. These helpers send a signed request and read what the bucket
answers: a page of its listing (S3 ListObjectsV2), or a file's size.
ListingPage
dataclass
¶
One page of a listing: the folders one level down, the files, and the next page's token.
full_size(response)
¶
Return the size of the file a ranged GET read the start of.
A bucket answers a range with Content-Range: bytes 0-65535/<size>; one
that sent the whole of a small file sent its size.
parse_listing(xml)
¶
Read a ListObjectsV2 answer, whatever its namespace.
send_signed(request)
async
¶
Send a request the platform signed for the bucket, and return its answer.
Raises:
| Type | Description |
|---|---|
ClientConnectionError
|
If the bucket does not answer, or refuses. |