From 3422fbfa6b6022a20731a3b898ed2132be1a4276 Mon Sep 17 00:00:00 2001 From: Horia Culea Date: Thu, 6 Mar 2025 13:53:24 +0100 Subject: [PATCH 1/2] Add example on reading a file field --- example/example.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/example/example.py b/example/example.py index ccb55a37..01592bc0 100644 --- a/example/example.py +++ b/example/example.py @@ -347,6 +347,14 @@ async def create_attach_and_delete_file_field_item(client: Client): created_item = await client.items.create(to_create) # [developer-docs.sdk.python.create-item-with-file-field]-end + # [developer-docs.sdk.python.read-file-field]-start + # Read the a file field from an item + content = await client.items.files.read( + created_item.vault_id, created_item.id, created_item.files[0] + ) + # [developer-docs.sdk.python.read-file-field]-end + print(content.decode()) + # [developer-docs.sdk.python.attach-file-field-item]-start # Attach a file field to the item attached_item = await client.items.files.attach( From 0c5776e0762b1795542bfa8bb4d8e52f90c21a05 Mon Sep 17 00:00:00 2001 From: Horia Culea <45151601+hculea@users.noreply.github.com> Date: Thu, 6 Mar 2025 14:01:48 +0100 Subject: [PATCH 2/2] Update example/example.py Co-authored-by: Mohammed Omar Miraj <103403052+MOmarMiraj@users.noreply.github.com> --- example/example.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/example.py b/example/example.py index 01592bc0..423c7b3f 100644 --- a/example/example.py +++ b/example/example.py @@ -348,7 +348,7 @@ async def create_attach_and_delete_file_field_item(client: Client): # [developer-docs.sdk.python.create-item-with-file-field]-end # [developer-docs.sdk.python.read-file-field]-start - # Read the a file field from an item + # Read the file field from an item content = await client.items.files.read( created_item.vault_id, created_item.id, created_item.files[0] )