Skip to content
This repository has been archived by the owner on Feb 22, 2022. It is now read-only.

Commit

Permalink
Added down examples to doc
Browse files Browse the repository at this point in the history
  • Loading branch information
WardPearce committed Mar 3, 2021
1 parent b78ab28 commit d17e569
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@ aiofile>=3.1.0
aiofiles
asynctest
sphinxcontrib-trio
git+https://github.com/bashtage/sphinx-material.git
sphinx-material
19 changes: 19 additions & 0 deletions source/examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -79,3 +79,22 @@ Uploading parts
parts = file.parts()
parts.file(pathway="path/to/weeb/file.jpg")
parts.finish()
Downloading
~~~~~~~~~~~
.. code-block:: python
data = bucket.file(file_id="...").download()
Async download iterate
~~~~~~~~~~~~~~~~~~~~~~
.. code-block:: python
async for data in bucket.file(file_id="...").download_iterate():
pass
Download by name
~~~~~~~~~~~~~~~~
.. code-block:: python
data = client.download_by_name(bucket_name="...", file_name="foobar.jpg")

0 comments on commit d17e569

Please sign in to comment.