Skip to content

Commit

Permalink
Auto-updated documentation based on branch/tag v3.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
carlos-villavicencio-adsk committed Feb 6, 2024
1 parent 00b1ce1 commit e8115ee
Show file tree
Hide file tree
Showing 68 changed files with 292 additions and 185 deletions.
2 changes: 1 addition & 1 deletion .buildinfo
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: b87aa4a8102a10a2fd7af3c74ffded0a
config: 3e85bd666198641751efdabcdac08925
tags: 645f666f9bcd5a90fca523b33c5a78b7
Binary file modified .doctrees/advanced.doctree
Binary file not shown.
Binary file modified .doctrees/advanced/iron_python.doctree
Binary file not shown.
Binary file modified .doctrees/advanced/packaging.doctree
Binary file not shown.
Binary file modified .doctrees/authentication.doctree
Binary file not shown.
Binary file modified .doctrees/changelog.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/attachments.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/examples/ami_handler.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/examples/ami_version_packager.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/examples/basic_create_shot.doctree
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/cookbook/examples/basic_delete_shot.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/examples/basic_find_shot.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/examples/basic_sg_instance.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/examples/basic_update_shot.doctree
Binary file not shown.
Binary file not shown.
Binary file modified .doctrees/cookbook/examples/svn_integration.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/smart_cut_fields.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/tasks.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/tasks/split_tasks.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/tasks/task_dependencies.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/tasks/updating_tasks.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/tutorials.doctree
Binary file not shown.
Binary file modified .doctrees/cookbook/usage_tips.doctree
Binary file not shown.
Binary file modified .doctrees/environment.pickle
Binary file not shown.
Binary file modified .doctrees/index.doctree
Binary file not shown.
Binary file modified .doctrees/installation.doctree
Binary file not shown.
Binary file modified .doctrees/reference.doctree
Binary file not shown.
10 changes: 5 additions & 5 deletions _modules/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Overview: module code &mdash; python-api v3.4.0 documentation</title>
<title>Overview: module code &mdash; python-api v3.4.1 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/graphviz.css" type="text/css" />
Expand All @@ -28,7 +28,7 @@
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href='http://developer.shotgridsoftware.com'>
<a href='https://help.autodesk.com/view/SGDEV/ENU/'>

<img style='width: 191px;
height: 60px;
Expand Down Expand Up @@ -82,10 +82,10 @@
text-decoration: underline; }
</style>

<b>python-api</b> v3.4.0.<br>
<b>python-api</b> v3.4.1.<br>

For more information, please visit
<a class=custom_post_menu href='https://developer.shotgridsoftware.com'>The ShotGrid developer portal.</a>.
<a class=custom_post_menu href='https://help.autodesk.com/view/SGDEV/ENU/'>The ShotGrid developer portal.</a>.
The code associated with this documentation can be found
<a class=custom_post_menu href='https://github.com/shotgunsoftware/python-api'>here</a>.

Expand Down Expand Up @@ -134,7 +134,7 @@ <h1>All modules for which code is available</h1>
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023, Autodesk.</p>
<p>&#169; Copyright 2024, Autodesk.</p>
</div>


Expand Down
10 changes: 5 additions & 5 deletions _modules/logging.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>logging &mdash; python-api v3.4.0 documentation</title>
<title>logging &mdash; python-api v3.4.1 documentation</title>
<link rel="stylesheet" href="../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../_static/graphviz.css" type="text/css" />
Expand All @@ -28,7 +28,7 @@
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href='http://developer.shotgridsoftware.com'>
<a href='https://help.autodesk.com/view/SGDEV/ENU/'>

<img style='width: 191px;
height: 60px;
Expand Down Expand Up @@ -82,10 +82,10 @@
text-decoration: underline; }
</style>

<b>python-api</b> v3.4.0.<br>
<b>python-api</b> v3.4.1.<br>

For more information, please visit
<a class=custom_post_menu href='https://developer.shotgridsoftware.com'>The ShotGrid developer portal.</a>.
<a class=custom_post_menu href='https://help.autodesk.com/view/SGDEV/ENU/'>The ShotGrid developer portal.</a>.
The code associated with this documentation can be found
<a class=custom_post_menu href='https://github.com/shotgunsoftware/python-api'>here</a>.

Expand Down Expand Up @@ -2353,7 +2353,7 @@ <h1>Source code for logging</h1><div class="highlight"><pre>
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023, Autodesk.</p>
<p>&#169; Copyright 2024, Autodesk.</p>
</div>


Expand Down
63 changes: 49 additions & 14 deletions _modules/shotgun_api3/shotgun.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>shotgun_api3.shotgun &mdash; python-api v3.4.0 documentation</title>
<title>shotgun_api3.shotgun &mdash; python-api v3.4.1 documentation</title>
<link rel="stylesheet" href="../../_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="../../_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="../../_static/graphviz.css" type="text/css" />
Expand All @@ -28,7 +28,7 @@
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href='http://developer.shotgridsoftware.com'>
<a href='https://help.autodesk.com/view/SGDEV/ENU/'>

<img style='width: 191px;
height: 60px;
Expand Down Expand Up @@ -82,10 +82,10 @@
text-decoration: underline; }
</style>

<b>python-api</b> v3.4.0.<br>
<b>python-api</b> v3.4.1.<br>

For more information, please visit
<a class=custom_post_menu href='https://developer.shotgridsoftware.com'>The ShotGrid developer portal.</a>.
<a class=custom_post_menu href='https://help.autodesk.com/view/SGDEV/ENU/'>The ShotGrid developer portal.</a>.
The code associated with this documentation can be found
<a class=custom_post_menu href='https://github.com/shotgunsoftware/python-api'>here</a>.

Expand Down Expand Up @@ -248,7 +248,7 @@ <h1>Source code for shotgun_api3.shotgun</h1><div class="highlight"><pre>

<span class="c1"># ----------------------------------------------------------------------------</span>
<span class="c1"># Version</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s2">&quot;3.4.0&quot;</span>
<span class="n">__version__</span> <span class="o">=</span> <span class="s2">&quot;3.4.1&quot;</span>

<span class="c1"># ----------------------------------------------------------------------------</span>
<span class="c1"># Errors</span>
Expand Down Expand Up @@ -3387,6 +3387,43 @@ <h1>Source code for shotgun_api3.shotgun</h1><div class="highlight"><pre>

<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_call_rpc</span><span class="p">(</span><span class="s2">&quot;preferences_read&quot;</span><span class="p">,</span> <span class="p">{</span><span class="s2">&quot;prefs&quot;</span><span class="p">:</span> <span class="n">prefs</span><span class="p">})</span></div>

<div class="viewcode-block" id="Shotgun.user_subscriptions_read"><a class="viewcode-back" href="../../reference.html#shotgun_api3.shotgun.Shotgun.user_subscriptions_read">[docs]</a> <span class="k">def</span> <span class="nf">user_subscriptions_read</span><span class="p">(</span><span class="bp">self</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Get the list of user subscriptions.</span>

<span class="sd"> :returns: A list of user subscriptions where each subscription is a</span>
<span class="sd"> dictionary containing the ``humanUserId`` and ``subscription``</span>
<span class="sd"> fields.</span>
<span class="sd"> :rtype: list</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="k">return</span> <span class="bp">self</span><span class="o">.</span><span class="n">_call_rpc</span><span class="p">(</span><span class="s2">&quot;user_subscriptions_read&quot;</span><span class="p">,</span> <span class="kc">None</span><span class="p">)</span></div>

<div class="viewcode-block" id="Shotgun.user_subscriptions_create"><a class="viewcode-back" href="../../reference.html#shotgun_api3.shotgun.Shotgun.user_subscriptions_create">[docs]</a> <span class="k">def</span> <span class="nf">user_subscriptions_create</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">users</span><span class="p">):</span>
<span class="c1"># type: (list[dict[str, Union[str, list[str], None]) -&gt; bool</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Assign subscriptions to users.</span>

<span class="sd"> :param list users: list of user subscriptions to assign.</span>
<span class="sd"> Each subscription must be a dictionary with the ``humanUserId`` and</span>
<span class="sd"> ``subscription`` fields.</span>
<span class="sd"> The ``subscription`` is either ``None``, a single string, or an</span>
<span class="sd"> array of strings with subscription information.</span>

<span class="sd"> :returns: ``True`` if the request succedeed, ``False`` if otherwise.</span>
<span class="sd"> :rtype: bool</span>
<span class="sd"> &quot;&quot;&quot;</span>

<span class="n">response</span> <span class="o">=</span> <span class="bp">self</span><span class="o">.</span><span class="n">_call_rpc</span><span class="p">(</span>
<span class="s2">&quot;user_subscriptions_create&quot;</span><span class="p">,</span>
<span class="p">{</span><span class="s2">&quot;users&quot;</span><span class="p">:</span> <span class="n">users</span><span class="p">}</span>
<span class="p">)</span>

<span class="k">if</span> <span class="ow">not</span> <span class="nb">isinstance</span><span class="p">(</span><span class="n">response</span><span class="p">,</span> <span class="nb">dict</span><span class="p">):</span>
<span class="k">return</span> <span class="kc">False</span>

<span class="k">return</span> <span class="n">response</span><span class="o">.</span><span class="n">get</span><span class="p">(</span><span class="s2">&quot;status&quot;</span><span class="p">)</span> <span class="o">==</span> <span class="s2">&quot;success&quot;</span></div>

<span class="k">def</span> <span class="nf">_build_opener</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">handler</span><span class="p">):</span>
<span class="w"> </span><span class="sd">&quot;&quot;&quot;</span>
<span class="sd"> Build urllib2 opener with appropriate proxy handler.</span>
Expand Down Expand Up @@ -3533,8 +3570,8 @@ <h1>Source code for shotgun_api3.shotgun</h1><div class="highlight"><pre>
<span class="c1"># We&#39;ve seen some rare instances of SG returning 502 for issues that</span>
<span class="c1"># appear to be caused by something internal to SG. We&#39;re going to</span>
<span class="c1"># allow for limited retries for those specifically.</span>
<span class="k">if</span> <span class="n">attempt</span> <span class="o">!=</span> <span class="n">max_attempts</span> <span class="ow">and</span> <span class="n">e</span><span class="o">.</span><span class="n">errcode</span> <span class="o">==</span> <span class="mi">502</span><span class="p">:</span>
<span class="n">LOG</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">&quot;Got a 502 response. Waiting and retrying...&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">attempt</span> <span class="o">!=</span> <span class="n">max_attempts</span> <span class="ow">and</span> <span class="n">e</span><span class="o">.</span><span class="n">errcode</span> <span class="ow">in</span> <span class="p">[</span><span class="mi">502</span><span class="p">,</span> <span class="mi">504</span><span class="p">]:</span>
<span class="n">LOG</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">&quot;Got a 502 or 504 response. Waiting and retrying...&quot;</span><span class="p">)</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="nb">float</span><span class="p">(</span><span class="n">attempt</span><span class="p">)</span> <span class="o">*</span> <span class="n">backoff</span><span class="p">)</span>
<span class="n">attempt</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="k">continue</span>
Expand Down Expand Up @@ -4234,16 +4271,14 @@ <h1>Source code for shotgun_api3.shotgun</h1><div class="highlight"><pre>
<span class="n">LOG</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">&quot;Completed request to </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="n">request</span><span class="o">.</span><span class="n">get_method</span><span class="p">())</span>

<span class="k">except</span> <span class="n">urllib</span><span class="o">.</span><span class="n">error</span><span class="o">.</span><span class="n">HTTPError</span> <span class="k">as</span> <span class="n">e</span><span class="p">:</span>
<span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">code</span> <span class="o">==</span> <span class="mi">500</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ShotgunError</span><span class="p">(</span><span class="s2">&quot;Server encountered an internal error.</span><span class="se">\n</span><span class="si">%s</span><span class="se">\n</span><span class="si">%s</span><span class="se">\n\n</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">storage_url</span><span class="p">,</span> <span class="n">e</span><span class="p">))</span>
<span class="k">elif</span> <span class="n">attempt</span> <span class="o">!=</span> <span class="n">max_attempts</span> <span class="ow">and</span> <span class="n">e</span><span class="o">.</span><span class="n">code</span> <span class="o">==</span> <span class="mi">503</span><span class="p">:</span>
<span class="n">LOG</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">&quot;Got a 503 response. Waiting and retrying...&quot;</span><span class="p">)</span>
<span class="k">if</span> <span class="n">attempt</span> <span class="o">!=</span> <span class="n">max_attempts</span> <span class="ow">and</span> <span class="n">e</span><span class="o">.</span><span class="n">code</span> <span class="ow">in</span> <span class="p">[</span><span class="mi">500</span><span class="p">,</span> <span class="mi">503</span><span class="p">]:</span>
<span class="n">LOG</span><span class="o">.</span><span class="n">debug</span><span class="p">(</span><span class="s2">&quot;Got a </span><span class="si">%s</span><span class="s2"> response. Waiting and retrying...&quot;</span> <span class="o">%</span> <span class="n">e</span><span class="o">.</span><span class="n">code</span><span class="p">)</span>
<span class="n">time</span><span class="o">.</span><span class="n">sleep</span><span class="p">(</span><span class="nb">float</span><span class="p">(</span><span class="n">attempt</span><span class="p">)</span> <span class="o">*</span> <span class="n">backoff</span><span class="p">)</span>
<span class="n">attempt</span> <span class="o">+=</span> <span class="mi">1</span>
<span class="k">continue</span>
<span class="k">elif</span> <span class="n">e</span><span class="o">.</span><span class="n">code</span> <span class="ow">in</span> <span class="p">[</span><span class="mi">500</span><span class="p">,</span> <span class="mi">503</span><span class="p">]:</span>
<span class="k">raise</span> <span class="n">ShotgunError</span><span class="p">(</span><span class="s2">&quot;Got a </span><span class="si">%s</span><span class="s2"> response when uploading to </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">e</span><span class="o">.</span><span class="n">code</span><span class="p">,</span> <span class="n">storage_url</span><span class="p">,</span> <span class="n">e</span><span class="p">))</span>
<span class="k">else</span><span class="p">:</span>
<span class="k">if</span> <span class="n">e</span><span class="o">.</span><span class="n">code</span> <span class="o">==</span> <span class="mi">503</span><span class="p">:</span>
<span class="k">raise</span> <span class="n">ShotgunError</span><span class="p">(</span><span class="s2">&quot;Got a 503 response when uploading to </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">storage_url</span><span class="p">,</span> <span class="n">e</span><span class="p">))</span>
<span class="k">raise</span> <span class="n">ShotgunError</span><span class="p">(</span><span class="s2">&quot;Unanticipated error occurred uploading to </span><span class="si">%s</span><span class="s2">: </span><span class="si">%s</span><span class="s2">&quot;</span> <span class="o">%</span> <span class="p">(</span><span class="n">storage_url</span><span class="p">,</span> <span class="n">e</span><span class="p">))</span>

<span class="k">else</span><span class="p">:</span>
Expand Down Expand Up @@ -4565,7 +4600,7 @@ <h1>Source code for shotgun_api3.shotgun</h1><div class="highlight"><pre>
<hr/>

<div role="contentinfo">
<p>&#169; Copyright 2023, Autodesk.</p>
<p>&#169; Copyright 2024, Autodesk.</p>
</div>


Expand Down
1 change: 0 additions & 1 deletion _sources/index.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ ShotGrid Python API3
Release |version|. (:ref:`Installation <installation>`)

.. image:: https://img.shields.io/badge/shotgun-api-blue.svg
.. image:: https://secure.travis-ci.org/shotgunsoftware/python-api.svg?branch=master



Expand Down
10 changes: 9 additions & 1 deletion _sources/reference.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,14 @@ control, these methods are available.
.. automethod:: Shotgun.set_session_uuid
.. automethod:: Shotgun.info

Subscription Management
=======================

These methods are used for reading and assigning user subscriptions.

.. automethod:: Shotgun.user_subscriptions_read
.. automethod:: Shotgun.user_subscriptions_create

CRUD Methods
============

Expand Down Expand Up @@ -289,7 +297,7 @@ Operators and Arguments
# note that brackets are not literal (eg. ['start_date', 'in_last', 1, 'DAY'])
'in_next' [[int], 'HOUR' | 'DAY' | 'WEEK' | 'MONTH' | 'YEAR']
# note that brackets are not literal (eg. ['start_date', 'in_next', 1, 'DAY'])
'in' [[field_value] | None, ...] # Array of field values
'in' [[field_value], ...] # Array of field values
'type_is' [string] | None # Shotgun entity type
'type_is_not' [string] | None # Shotgun entity type
'in_calendar_day' [int] # Offset (e.g. 0 = today, 1 = tomorrow,
Expand Down
2 changes: 1 addition & 1 deletion _static/documentation_options.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
var DOCUMENTATION_OPTIONS = {
URL_ROOT: document.getElementById("documentation_options").getAttribute('data-url_root'),
VERSION: 'v3.4.0',
VERSION: 'v3.4.1',
LANGUAGE: 'en',
COLLAPSE_INDEX: false,
BUILDER: 'html',
Expand Down
Loading

0 comments on commit e8115ee

Please sign in to comment.