<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: databricks pyspark/ python download data from shared url and password in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/databricks-pyspark-python-download-data-from-shared-url-and/m-p/391104#M21618</link>
    <description>&lt;P&gt;We can't offer help on the Databricks/Pyspark side of this, as that's made by a third party, but to programmatically download file data from a password-protected&amp;nbsp;Dropbox shared link, we&amp;nbsp;recommend using &lt;A href="https://github.com/dropbox/dropbox-sdk-python" target="_self"&gt;the official&amp;nbsp;Dropbox API v2 Python SDK&lt;/A&gt;. Specifically, you can use &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.sharing_get_shared_link_file" target="_self"&gt;the&amp;nbsp;sharing_get_shared_link_file method&lt;/A&gt; to download file data from a shared link, optionally supplying the password if needed.&lt;/P&gt;
&lt;P&gt;That would look like this:&lt;/P&gt;
&lt;PRE&gt;import dropbox

ACCESS_TOKEN = "..."

dbx = dropbox.Dropbox(ACCESS_TOKEN)

shared_link = "https://www.dropbox.com/s/..."
password = "..."

metadata, res = dbx.sharing_get_shared_link_file(url=shared_link, link_password=password)
print(metadata)
print(res.text)&lt;/PRE&gt;
&lt;P&gt;The second variable in the returned tuple is a&amp;nbsp;&lt;A href="https://2.python-requests.org/en/master/api/#requests.Response" target="_self"&gt;requests.Response&lt;/A&gt; object, which offers a few methods for reading out the file content.&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jan 2020 16:48:14 GMT</pubDate>
    <dc:creator>Greg-DB</dc:creator>
    <dc:date>2020-01-21T16:48:14Z</dc:date>
    <item>
      <title>databricks pyspark/ python download data from shared url and password</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/databricks-pyspark-python-download-data-from-shared-url-and/m-p/390828#M21612</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have received a dropbox shared secure link and password which I want to connect to my databricks environment so that I can download the files from dropbox to my databricks environment.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Appreciate if someone can share an example code to do that. I have a dropbox url and password.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jan 2020 18:29:32 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/databricks-pyspark-python-download-data-from-shared-url-and/m-p/390828#M21612</guid>
      <dc:creator>ankg</dc:creator>
      <dc:date>2020-01-20T18:29:32Z</dc:date>
    </item>
    <item>
      <title>Re: databricks pyspark/ python download data from shared url and password</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/databricks-pyspark-python-download-data-from-shared-url-and/m-p/391104#M21618</link>
      <description>&lt;P&gt;We can't offer help on the Databricks/Pyspark side of this, as that's made by a third party, but to programmatically download file data from a password-protected&amp;nbsp;Dropbox shared link, we&amp;nbsp;recommend using &lt;A href="https://github.com/dropbox/dropbox-sdk-python" target="_self"&gt;the official&amp;nbsp;Dropbox API v2 Python SDK&lt;/A&gt;. Specifically, you can use &lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox.Dropbox.sharing_get_shared_link_file" target="_self"&gt;the&amp;nbsp;sharing_get_shared_link_file method&lt;/A&gt; to download file data from a shared link, optionally supplying the password if needed.&lt;/P&gt;
&lt;P&gt;That would look like this:&lt;/P&gt;
&lt;PRE&gt;import dropbox

ACCESS_TOKEN = "..."

dbx = dropbox.Dropbox(ACCESS_TOKEN)

shared_link = "https://www.dropbox.com/s/..."
password = "..."

metadata, res = dbx.sharing_get_shared_link_file(url=shared_link, link_password=password)
print(metadata)
print(res.text)&lt;/PRE&gt;
&lt;P&gt;The second variable in the returned tuple is a&amp;nbsp;&lt;A href="https://2.python-requests.org/en/master/api/#requests.Response" target="_self"&gt;requests.Response&lt;/A&gt; object, which offers a few methods for reading out the file content.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jan 2020 16:48:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/databricks-pyspark-python-download-data-from-shared-url-and/m-p/391104#M21618</guid>
      <dc:creator>Greg-DB</dc:creator>
      <dc:date>2020-01-21T16:48:14Z</dc:date>
    </item>
  </channel>
</rss>

