@@ -75,7 +75,7 @@ Common attributes are: `concrete_type`, `storage_location_id`, `storage_type`,
7575## 1. Set up and get project
7676
7777``` python
78- { ! docs/ tutorials/ python/ tutorial_scripts/ storage_location.py! lines:" start: setup" : " end:setup " }
78+ -- 8 < -- " docs/tutorials/python/tutorial_scripts/storage_location.py!lines:setup"
7979```
8080
8181## 2. Create an external S3 storage location
@@ -85,7 +85,7 @@ properly configured with an `owner.txt` file. Synapse will transfer data
8585directly to and from this bucket on the user's behalf.
8686
8787``` python
88- { ! docs/ tutorials/ python/ tutorial_scripts/ storage_location.py! lines:" start: create_s3_storage_location" : " end:create_s3_storage_location " }
88+ -- 8 < -- " docs/tutorials/python/tutorial_scripts/storage_location.py!lines:create_s3_storage_location"
8989```
9090
9191<details class =" example " >
@@ -103,7 +103,7 @@ Create a folder and assign it the S3 storage location. All files uploaded into
103103this folder will be stored in your S3 bucket.
104104
105105``` python
106- { ! docs/ tutorials/ python/ tutorial_scripts/ storage_location.py! lines:" start: create_folder_with_s3_storage_location" : " end:create_folder_with_s3_storage_location] " }
106+ -- 8 < -- " docs/tutorials/python/tutorial_scripts/storage_location.py!lines:create_folder_with_s3_storage_location"
107107```
108108
109109<details class =" example " >
@@ -120,25 +120,24 @@ Create a storage location backed by a Google Cloud Storage bucket and assign it
120120to a folder.
121121
122122``` python
123- { ! docs/ tutorials/ python/ tutorial_scripts/ storage_location.py! lines:" start: create_gcs_storage_location" : " end:create_gcs_storage_location " }
123+ -- 8 < -- " docs/tutorials/python/tutorial_scripts/storage_location.py!lines:create_gcs_storage_location"
124124```
125125
126126## 5. Create an SFTP storage location
127127
128128SFTP storage locations point to an external SFTP server, where files are stored outside of Synapse. Synapse only manages the metadata and does not handle the file transfer itself. This setup requires the pysftp package, and files must be uploaded separately through the ** client** once configured.
129129
130130``` python
131- { ! docs/ tutorials/ python/ tutorial_scripts/ storage_location.py! lines:" start: create_sftp_storage_location" : " end:create_sftp_storage_location " }
131+ -- 8 < -- " docs/tutorials/python/tutorial_scripts/storage_location.py!lines:create_sftp_storage_location"
132132```
133-
134133## 6. Create an HTTPS storage location
135134
136135` EXTERNAL_HTTPS ` uses the same underlying API type as ` EXTERNAL_SFTP ` but is
137136used when the external server is accessed over HTTPS. Note that the Python
138137client does NOT support uploading files to HTTPS storage locations directly yet. To add files, use the Synapse REST API directly.
139138
140139``` python
141- { ! docs/ tutorials/ python/ tutorial_scripts/ storage_location.py! lines:" start: create_https_storage_location" : " end:create_https_storage_location " }
140+ -- 8 < -- " docs/tutorials/python/tutorial_scripts/storage_location.py!lines:create_https_storage_location"
142141```
143142
144143## 7. Create an External Object Store storage location
@@ -162,7 +161,7 @@ profile_name = my-s3-profile
162161```
163162
164163``` python
165- { ! docs/ tutorials/ python/ tutorial_scripts/ storage_location.py! lines:" start: create_object_store_storage_location" : " end:create_object_store_storage_location " }
164+ -- 8 < -- " docs/tutorials/python/tutorial_scripts/storage_location.py!lines:create_object_store_storage_location"
166165```
167166
168167## 8. Create a Proxy storage location
@@ -172,7 +171,7 @@ authentication and access to the underlying storage. Files are registered by
172171creating a ` ProxyFileHandle ` via the REST API. Then, files can be uploaded via store function with data_file_handle_id.
173172
174173``` python
175- { ! docs/ tutorials/ python/ tutorial_scripts/ storage_location.py! lines:" start: create_proxy_storage_location" : " end:create_proxy_storage_location " }
174+ -- 8 < -- " docs/tutorials/python/tutorial_scripts/storage_location.py!lines:create_proxy_storage_location"
176175```
177176
178177## 9. Retrieve and inspect storage location settings
@@ -181,7 +180,7 @@ You can retrieve a storage location by ID. Only fields relevant to the storage
181180type are populated.
182181
183182``` python
184- { ! docs/ tutorials/ python/ tutorial_scripts/ storage_location.py! lines:" start: retrieve_storage_location" : " end:retrieve_storage_location " }
183+ -- 8 < -- " docs/tutorials/python/tutorial_scripts/storage_location.py!lines:retrieve_storage_location"
185184```
186185
187186<details class =" example " >
@@ -202,7 +201,7 @@ creation. To "update" a storage location, create a new one with the desired
202201settings and reassign it to the folder or project.
203202
204203``` python
205- { ! docs/ tutorials/ python/ tutorial_scripts/ storage_location.py! lines:" start: update_storage_location" : " end:update_storage_location " }
204+ -- 8 < -- " docs/tutorials/python/tutorial_scripts/storage_location.py!lines:update_storage_location"
206205```
207206
208207## References used in this tutorial
0 commit comments