Skip to content

Commit 6c0ae36

Browse files
authored
[duguids] SG-29232- replacing shotgun with shotgrid (#274)
* SG-29232 replacing shotgun w shotgrid * Updated with Julien's feedback Co-authored-by: Shayna Duguid <shayna.duguid@autodesk.com>
1 parent d33cda1 commit 6c0ae36

28 files changed

Lines changed: 163 additions & 164 deletions

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
[![Build Status](https://dev.azure.com/shotgun-ecosystem/Python%20API/_apis/build/status/shotgunsoftware.python-api?branchName=master)](https://dev.azure.com/shotgun-ecosystem/Python%20API/_build/latest?definitionId=108&branchName=master)
55
[![Coverage Status](https://coveralls.io/repos/github/shotgunsoftware/python-api/badge.svg?branch=master)](https://coveralls.io/github/shotgunsoftware/python-api?branch=master)
66

7-
# Shotgun Python API
7+
# ShotGrid Python API
88

99
ShotGrid provides a simple Python-based API for accessing ShotGrid and integrating with other tools. This is the official API that is maintained by ShotGrid Software (https://knowledge.autodesk.com/contact-support)
1010

@@ -133,7 +133,7 @@ Integration and unit tests are provided.
133133
- Add more detailed information regarding the changes in this release. This is a great place to add examples, and reasons for the change!
134134

135135
### Letting the world know
136-
Post a message in the [Pipeline Community channel](https://community.shotgunsoftware.com/c/pipeline) and send an email to [shotgun-dev](https://groups.google.com/a/shotgunsoftware.com/forum/#!forum/shotgun-dev) with a link to the community post.
136+
Post a message in the [Pipeline Community channel](https://community.shotgridsoftware.com/c/pipeline).
137137

138138
### Prepare for the Next Dev Cycle
139139
1) Update the `__version__` value in `shotgun_api3/shotgun.py` to the next version number with `.dev` appended to it. For example, `v3.0.24.dev`

docs/advanced/packaging.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ There are caveats you need to be aware of when creating such an app.
1414
********************************
1515
HTTPS Validation and cacerts.txt
1616
********************************
17-
When creating the connection to Shotgun a file is used to validate the Shotgun certificate. This
17+
When creating the connection to ShotGrid a file is used to validate the ShotGrid certificate. This
1818
file is located at ``shotgun_api3/lib/httplib2/cacerts.txt``. Because this file is not a Python
1919
file imported by your application, py2app will not know to include it in your package, it will
2020
need to be explicitly specified in your ``setup.py`` file (edit the path based on the location
@@ -31,10 +31,10 @@ following structure::
3131
./Contents/Resources/my_script.py
3232

3333
Where in ``my_script.py`` you can access the ``cacerts.txt`` file using a relative path to pass it
34-
into the Shotgun connection's constructor::
34+
into the ShotGrid connection's constructor::
3535

3636
ca_certs = os.path.join(os.path.dirname(__file__), 'shotgun_api3', 'cacerts.txt')
37-
sg = shotgun_api3.Shotgun('https://yoursite.shotgunstudio.com', 'script_name', 'script_key',
37+
sg = shotgun_api3.Shotgun('https://my-site.shotgrid.autodesk.com', 'script_name', 'script_key',
3838
ca_certs=ca_certs)
3939

4040
The process for py2exe should be similar.

docs/authentication.rst

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -2,64 +2,64 @@
22
Authentication
33
##############
44

5-
In order to communicate with your Shotgun server via the API, you must provide valid authentication credentials. The API allows you to authenticate with user-based, or script-based credentials.
5+
In order to communicate with your ShotGrid server via the API, you must provide valid authentication credentials. The API allows you to authenticate with user-based, or script-based credentials.
66

77
*************************
88
User-based Authentication
99
*************************
10-
When authenticating as a user, you provide your normal login and password when instantiating your :class:`shotgun_api3.Shotgun` object. The actions performed by this instance will be limited to your permission level just as they are in the Shotgun web application. ::
10+
When authenticating as a user, you provide your normal login and password when instantiating your :class:`shotgun_api3.Shotgun` object. The actions performed by this instance will be limited to your permission level just as they are in the web application. ::
1111

12-
sg = shotgun_api3.Shotgun("https://piedpiper.shotgunstudio.com",
12+
sg = shotgun_api3.Shotgun("https://my-site.shotgrid.autodesk.com",
1313
login="rhendriks",
1414
password="c0mPre$Hi0n")
1515

1616

1717
***************************
1818
Script-based Authentication
1919
***************************
20-
In order to authenticate as a script, your script must be :ref:`registered with Shotgun and have a valid API key <setting_up_shotgun>`. When creating your :class:`shotgun_api3.Shotgun` object, provide the ``script_name`` and ``api_key``.::
20+
In order to authenticate as a script, your script must be :ref:`registered with ShotGrid and have a valid API key <setting_up_shotgrid>`. When creating your :class:`shotgun_api3.Shotgun` object, provide the ``script_name`` and ``api_key``.::
2121

22-
sg = shotgun_api3.Shotgun("https://piedpiper.shotgunstudio.com",
22+
sg = shotgun_api3.Shotgun("https://my-site.shotgrid.autodesk.com",
2323
script_name="compress",
2424
api_key="0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef")
2525

26-
.. note:: When using script-based authentication, we **strongly** recommend you register each script separately with Shotgun and have individual API keys for each. This allows you to track down each of your scripts and the actions they are performing much more accurately in the event logs.
26+
.. note:: When using script-based authentication, we **strongly** recommend you register each script separately with ShotGrid and have individual API keys for each. This allows you to track down each of your scripts and the actions they are performing much more accurately in the event logs.
2727

2828

29-
.. _setting_up_shotgun:
29+
.. _setting_up_shotgrid:
3030

3131
Adding Script Users
3232
===================
33-
If you'll be using script-based authentication, you need to create a Script entity in Shotgun. To create a new key, click the + button on the "Scripts" page in the Admin section and give your script a useful name. It's a good idea to add any other relevant information that be be helpful to your other friendly Shotgun users such as a description of what the script does that is using this key, the email address of the maintainer, etc.:
33+
If you'll be using script-based authentication, you need to create a Script entity in ShotGrid. To create a new key, click the + button on the "Scripts" page in the Admin section and give your script a useful name. It's a good idea to add any other relevant information that be be helpful to your other friendly ShotGrid users such as a description of what the script does that is using this key, the email address of the maintainer, etc.:
3434

3535
.. image:: images/scripts_page.png
3636

37-
Once you save your new Script entity, Shotgun will automatically generate an application key which will act as the script's password. The key will look something like this: ``0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef``.
37+
Once you save your new Script entity, ShotGrid will automatically generate an application key which will act as the script's password. The key will look something like this: ``0123456789abcdef0123456789abcdef0123456789abcdef0123456789abcdef``.
3838

3939
Why have different application keys for different scripts?
4040
==========================================================
4141
We recommend you create a new Script entity (and application key) for each script that is using script-based authentication so you can accurately log what scripts are doing what in case one of them causes problems. This will also allow you to better see what scripts are performing what actions in the EventLog. We've found that even though you may *think* you'll probably never need to know, the extra 2 minutes of setup now can prevent hours of headache in the future.
4242

4343
Event Logging
4444
=============
45-
By default, events generated by scripts using an script-based authentication are logged in Shotgun's event log. You can turn this off by un-checking the "Generate Events" checkbox either in the script detail page or from the main Scripts admin page in Shotgun.
45+
By default, events generated by scripts using an script-based authentication are logged in ShotGrid's event log. You can turn this off by un-checking the "Generate Events" checkbox either in the script detail page or from the main Scripts admin page in ShotGrid.
4646

4747
.. note:: Turning off event logging will also prevent any email notifications from being triggered by your scripts since the email notifier relies on the event log to find events to notify for.
4848

49-
Scripts using user-based authentication will generate events similarly to if you were performing the same actions in the Shotgun web application, though there is some additional metadata stored in the ``EventLogEntry`` that identifies the event as created from a script acting on behalf of the user.
49+
Scripts using user-based authentication will generate events similarly to if you were performing the same actions in the ShotGrid web application, though there is some additional metadata stored in the ``EventLogEntry`` that identifies the event as created from a script acting on behalf of the user.
5050

5151
Why would you want to turn event logging off for scripts?
5252
---------------------------------------------------------
53-
It is an optimization that is not used often, but some users have integration scripts that are pushing data into Shotgun just for reference, like publishes from their asset management system. This publish data is never changed later, so the data itself has the entire history, and the events would just clutter the event log. The event log can grow very large. So if you have no need to audit the history of what your script does, and it's generating an large amount of event log entries, you may find it's not necessary to create these events.
53+
It is an optimization that is not used often, but some users have integration scripts that are pushing data into ShotGrid just for reference, like publishes from their asset management system. This publish data is never changed later, so the data itself has the entire history, and the events would just clutter the event log. The event log can grow very large. So if you have no need to audit the history of what your script does, and it's generating an large amount of event log entries, you may find it's not necessary to create these events.
5454

5555
***********
5656
Permissions
5757
***********
58-
Users and scripts are both bound by the restrictions of their permission role in Shotgun. The permission role is assigned by the **Permission Role** field for each entity type.
58+
Users and scripts are both bound by the restrictions of their permission role in ShotGrid. The permission role is assigned by the **Permission Role** field for each entity type.
5959

60-
For Scripts, the default permission role is "API Admin User" which allows full access to create, update, and delete entities and fields, including editing the "date created" audit field and creating event log entries. If you have other permission roles for ApiUsers, you can set the default role that will be assigned when a new script is created, in your Shotgun site preferences.
60+
For Scripts, the default permission role is "API Admin User" which allows full access to create, update, and delete entities and fields, including editing the "date created" audit field and creating event log entries. If you have other permission roles for ApiUsers, you can set the default role that will be assigned when a new script is created, in your ShotGrid site preferences.
6161

62-
When using user-based authentication in your script, it will be bound by the permission role assigned to you in Shotgun. For example, if you don't have access to edit the status field on Shots, your script won't be able to either. Attempting to perform actions that are prohibited by permissions will raise an appropriate exception.
62+
When using user-based authentication in your script, it will be bound by the permission role assigned to you in ShotGrid. For example, if you don't have access to edit the status field on Shots, your script won't be able to either. Attempting to perform actions that are prohibited by permissions will raise an appropriate exception.
6363

64-
.. seealso:: `Shotgun Support: Permissions <https://help.autodesk.com/view/SGSUB/ENU/?guid=SG_Administrator_ar_site_configuration_ar_permissions_html>`_
64+
.. seealso:: `Permissions Documentation <https://help.autodesk.com/view/SGSUB/ENU/?guid=SG_Administrator_ar_site_configuration_ar_permissions_html>`_
6565

docs/cookbook.rst

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ and paste any of these into your own scripts.
2929
.. rubric:: Working With Files
3030

3131
You'll probably be doing some work with files at your studio. This is a deep dive into some of
32-
the inners of how Shotgun handles files (also called Attachments) and the different ways to link
32+
the inners of how ShotGrid handles files (also called Attachments) and the different ways to link
3333
to them.
3434

3535
.. toctree::
@@ -39,9 +39,9 @@ to them.
3939

4040
.. rubric:: Working With Tasks
4141

42-
Scheduling is a complex beast. Shotgun can handle lots of different types of functionality around
42+
Scheduling is a complex beast. ShotGrid can handle lots of different types of functionality around
4343
scheduling like split tasks, dependencies, and more. These docs walk you through the details of
44-
how Shotgun thinks when it's handling Task changes and how you can make your scripts do what you
44+
how ShotGrid thinks when it's handling Task changes and how you can make your scripts do what you
4545
need to do.
4646

4747
.. toctree::
@@ -52,7 +52,7 @@ need to do.
5252
.. rubric:: Smart Cut Fields
5353

5454
Smart Cut Fields are deprecated in favor of the
55-
`new cut support added in Shotgun v7.0 <https://knowledge.autodesk.com/support/shotgrid/learn-explore/caas/CloudHelp/cloudhelp/ENU/SG-Editorial/files/SG-Editorial-ed-cut-schema-html-html.html>`_.
55+
`new cut support added in ShotGrid v7.0 <https://knowledge.autodesk.com/support/shotgrid/learn-explore/caas/CloudHelp/cloudhelp/ENU/SG-Editorial/files/SG-Editorial-ed-cut-schema-html-html.html>`_.
5656
This documentation remains only to support studios who may not have upgraded to the new cut support
5757
features.
5858

0 commit comments

Comments
 (0)