Skip to content

Commit 939e9d3

Browse files
authored
docs(projects): add raw file download docs
Fixes #969
1 parent ec6e04c commit 939e9d3

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

docs/gl_objects/projects.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -343,6 +343,13 @@ Get a file::
343343

344344
# get the decoded content
345345
print(f.decode())
346+
347+
Get a raw file::
348+
349+
raw_content = project.files.raw(file_path='README.rst', ref='master')
350+
print(raw_content)
351+
with open('/tmp/raw-download.txt', 'wb') as f:
352+
project.files.raw(file_path='README.rst', ref='master', streamed=True, action=f.write)
346353

347354
Create a new file::
348355

0 commit comments

Comments
 (0)