<?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: #tags in the Python API in Dropbox API Support &amp; Feedback</title>
    <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629810#M29095</link>
    <description>Oh my god. I’m an idiot. I didn’t see that second link. Thank you!!!</description>
    <pubDate>Mon, 17 Oct 2022 18:08:53 GMT</pubDate>
    <dc:creator>Nprice</dc:creator>
    <dc:date>2022-10-17T18:08:53Z</dc:date>
    <item>
      <title>#tags in the Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629622#M29080</link>
      <description>&lt;P&gt;Hey! Is it possible to add #tags to files and/or folders using the API? I had a quick scan of the docs but couldn’t find it and the search function doesn’t work.&lt;BR /&gt;&lt;BR /&gt;Anyone know?&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 17:24:54 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629622#M29080</guid>
      <dc:creator>Nprice</dc:creator>
      <dc:date>2022-10-17T17:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: #tags in the Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629628#M29082</link>
      <description>&lt;P&gt;Hi &lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/711554"&gt;@Nprice&lt;/a&gt;,&lt;/P&gt;&lt;P&gt;Take a look here: &lt;A href="https://www.dropbox.com/developers/documentation/http/documentation#files-tags-add" target="_blank" rel="noopener"&gt;https://www.dropbox.com/developers/documentation/http/documentation#files-tags-add&lt;/A&gt; &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt; for API end-point.&lt;/P&gt;&lt;P&gt;Hope this helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For Dropbox Python SDK method take a look &lt;A title="Add a tag to an item" href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/dropbox.html#dropbox.dropbox_client.Dropbox.files_tags_add" target="_blank" rel="noopener"&gt;here&lt;/A&gt;.&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 02:21:49 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629628#M29082</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-10-17T02:21:49Z</dc:date>
    </item>
    <item>
      <title>Re: #tags in the Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629629#M29083</link>
      <description>That’s helpful! Thank you&lt;BR /&gt;&lt;BR /&gt;Maybe you can save me some time: would I get the file URL / access the file using Python and then throw each URL + tags into an API url and call it with requests?&lt;BR /&gt;&lt;BR /&gt;I’m new-ish to Python so any pointers would be appreciated!</description>
      <pubDate>Mon, 17 Oct 2022 02:34:28 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629629#M29083</guid>
      <dc:creator>Nprice</dc:creator>
      <dc:date>2022-10-17T02:34:28Z</dc:date>
    </item>
    <item>
      <title>Re: #tags in the Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629697#M29085</link>
      <description>&lt;P&gt;To be honest, I'm not sure what you ask me actually. You don't need any URL neither actual file to add a tag. The only thing you need is a regular &lt;A title="Path formats" href="https://www.dropbox.com/developers/documentation/http/documentation#path-formats" target="_blank" rel="noopener"&gt;file path&lt;/A&gt; (aside of the tag itself), nothing else. This is the same both when using direct API endpoint access or the same through any Dropbox SDK (including Python). There is nothing Python specific. If you mean something else, clarify your question.&lt;/P&gt;&lt;P&gt;Lucky jump into the deep of programming. &lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@41457EF40051AFF130FDBFE21B496926/emoticons/1f609.png" alt=":winking_face:" title=":winking_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 12:04:14 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629697#M29085</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-10-17T12:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: #tags in the Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629800#M29090</link>
      <description>&lt;P&gt;Hey! Thank you for the reply and your help. I managed to figure out a lot of what I needed last night.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I need to do is rename + add hashtags to files based on their path. I got as far as renaming, and that's working. I was having trouble finding the method to add hashtags to a file using the Dropbox SDK.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the relevant part of the code where I have access to the file path, variables with the hashtags, and am renaming files to the convention.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;SPAN&gt;# Create new file name from individual tags + incremental count and add file type&lt;BR /&gt;&lt;/SPAN&gt;new_file_name = &lt;SPAN&gt;f"&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;photographer_name&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;_&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;act_name&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;_&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;artist_name&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;_&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;genre&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;_&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;discipline&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;_&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;media_type&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;_&lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;count&lt;SPAN&gt;}{&lt;/SPAN&gt;file_type&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;"&lt;/SPAN&gt;.replace(&lt;BR /&gt;    &lt;SPAN&gt;" "&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;).replace(&lt;SPAN&gt;"-"&lt;/SPAN&gt;&lt;SPAN&gt;, &lt;/SPAN&gt;&lt;SPAN&gt;""&lt;/SPAN&gt;)&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Get new file path by removing old file name from path&lt;BR /&gt;&lt;/SPAN&gt;new_file_path = &lt;SPAN&gt;""&lt;/SPAN&gt;.join(media_file.path_display.rpartition(&lt;SPAN&gt;'/'&lt;/SPAN&gt;)[:-&lt;SPAN&gt;1&lt;/SPAN&gt;])&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if &lt;/SPAN&gt;rename_file_check:&lt;BR /&gt;    &lt;SPAN&gt;print&lt;/SPAN&gt;(&lt;SPAN&gt;f'Renaming &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;media_file.name&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt; to &lt;/SPAN&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;new_file_name&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;SPAN&gt;'&lt;/SPAN&gt;)&lt;BR /&gt;    &lt;SPAN&gt;# Rename file - old file path, new file path&lt;BR /&gt;&lt;/SPAN&gt;    dbx.files_move_v2(media_file.path_display&lt;SPAN&gt;, &lt;/SPAN&gt;new_file_path + new_file_name)&lt;BR /&gt;&lt;BR /&gt;    &lt;SPAN&gt;# Increment the count to avoid overwriting&lt;BR /&gt;&lt;/SPAN&gt;    count += &lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I just wonder if there is a method similar to .files_move_v2 that I can call to add hashtags to each individual file.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 17:34:09 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629800#M29090</guid>
      <dc:creator>Nprice</dc:creator>
      <dc:date>2022-10-17T17:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: #tags in the Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629803#M29091</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://www.dropboxforum.com/t5/user/viewprofilepage/user-id/711554"&gt;@Nprice&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;I just wonder if there is a method similar to .files_move_v2 that I can call to add hashtags to each individual file.&amp;nbsp;&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;As far as I know there is not such a combined method. You need to make 2 (or more) consecutive calls to rename and to add tag(s).&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 17:52:18 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629803#M29091</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-10-17T17:52:18Z</dc:date>
    </item>
    <item>
      <title>Re: #tags in the Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629804#M29092</link>
      <description>&lt;P&gt;Yeah, I understand that. I'm just wondering *how* do I add the hashtags? What's the method of dropbox.Dropbox in order to do that?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 17:57:27 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629804#M29092</guid>
      <dc:creator>Nprice</dc:creator>
      <dc:date>2022-10-17T17:57:27Z</dc:date>
    </item>
    <item>
      <title>Re: #tags in the Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629805#M29093</link>
      <description>&lt;P&gt;Is it this?&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;dropbox.files.AddTagArg&lt;SPAN class=""&gt;()&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class=""&gt;&lt;A href="https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html" target="_blank" rel="noopener"&gt;https://dropbox-sdk-python.readthedocs.io/en/latest/api/files.html&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 17:59:33 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629805#M29093</guid>
      <dc:creator>Nprice</dc:creator>
      <dc:date>2022-10-17T17:59:33Z</dc:date>
    </item>
    <item>
      <title>Re: #tags in the Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629807#M29094</link>
      <description>&lt;P&gt;&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@D88F213CAFB196B6AB70612B08AD9D31/emoticons/1f601.png" alt=":beaming_face_with_smiling_eyes:" title=":beaming_face_with_smiling_eyes:" /&gt; Seems, you haven't read my previous posts. Take a look on them more careful. Can you find the link? 🧐&lt;img class="lia-deferred-image lia-image-emoji" src="https://www.dropboxforum.com/html/@FBF7D2AB59A0D6E861EBF6A36F93B7E2/emoticons/1f642.png" alt=":slightly_smiling_face:" title=":slightly_smiling_face:" /&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 17 Oct 2022 18:03:48 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629807#M29094</guid>
      <dc:creator>Здравко</dc:creator>
      <dc:date>2022-10-17T18:03:48Z</dc:date>
    </item>
    <item>
      <title>Re: #tags in the Python API</title>
      <link>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629810#M29095</link>
      <description>Oh my god. I’m an idiot. I didn’t see that second link. Thank you!!!</description>
      <pubDate>Mon, 17 Oct 2022 18:08:53 GMT</pubDate>
      <guid>https://www.dropboxforum.com/t5/Dropbox-API-Support-Feedback/tags-in-the-Python-API/m-p/629810#M29095</guid>
      <dc:creator>Nprice</dc:creator>
      <dc:date>2022-10-17T18:08:53Z</dc:date>
    </item>
  </channel>
</rss>

