Developer Training: Shotgun

Updated: 2018/3/30

Shotgun Learning is a training initiative focused on getting helpful and valuable information to the Shotgun community. We plan to iterate existing content and cover new topics over time, so be sure to follow this article by clicking Follow Updates below (just above the comments) to be notified when new or updated content is available. Interested in another topic? Let us know via this quick survey.

This Developer Training series focuses on what you need to know as a developer using Shotgun. Topics include things like “How do I write scripts and build tools for Shotgun?” and “How do I integrate my existing workflows with Shotgun?” If you're looking for developer training related to Toolkit, click this link.

Developer Training Course Playlist 

 

Developer Training Videos 

1: A developer's intro to Shotgun (19m)

Answering What is Shotgun? with an overview of basic Shotgun concepts, ecosystem, and how they relate to a developer.

 

 

2: The Shotgun Tech Stack & Security (17m)

An in-depth overview of the Shotgun tech stack and security. Many of Shotgun's components are appropriately hidden from artists and producers—but developers should have a working understanding how Shotgun operates under the hood, and what the building blocks are.

 

Chapters
0:38 - Shotgun features
01:03 - The database: Postgres
1:44 - The application server: Ruby
2:15 - Web front end: Javascript & your browser
3:59 - Transcoding
4:30 - AWS S3: Amazon Simple Storage Service
5:33 - Web accelerator
6:16 - The Shotgun Python API
7:10 - The Shotgun Event Daemon
8:08 - Custom scripts & tools
8:36 - Artist tools
9:03 - Shotgun integrations and Toolkit
11:20 - Shotgun Desktop
12:57 - RV
13:47 - Shotgun Review for iOS
14:11 - Security
16:33 - Conclusion

Supplemental Material
Security white paper
DIY transcoding
AWS S3 regions
Selecting an S3 storage geolocation
AWS S3 Transfer Acceleration (Shotgun)
AWS S3 Transfer Acceleration (Amazon)

3: The Web GUI (24m)

A closer look at the Shotgun web GUI with a priority on things a developer would want to know about. Topics covered include an overview of entities, workflows, and permissions.

 

Chapters
0:05 - Intro
0:46 - Entity types
8:41 - Everything is an entity
16:22 - Custom entities
20:51 - Entity-specific workflows
22:21 - Permissions

4: Resources (9m)

Stuck on a problem or task? You’re not on your own! In this video, we cover where to find help from our support site, the community, and Street Team.

 

Chapters
0:05 - Intro
1:20 - Shotgun Developer Hub
1:35 - Platforms
4:28 - The Shotgun community
6:49 - Get support from us!

 

5: Basics of the Shotgun API (7m)

There are several ways developers interact with Shotgun through the Shotgun Python API. It's important to have easy access to that API in a Python console so you can test commands while you are learning or building tools for Shotgun.

 

 

6: Interacting with the Shotgun API and CRUD (9m)

The Shotgun Python API contains several sets of methods—this video focuses on the most useful methods in the CRUD set. Learn how to create a Shot in Shotgun, find an existing Shot and its details, update a Shot, and delete a Shot, all from the API.

 

 

7: Script keys and automation (9m)

This video looks at the Script entity in Shotgun and how a Script entity’s Application Key can be used to authenticate a Shotgun Python API session, as an alternative to user-based credentials—which can be too restrictive when used with automation.

 

 

8: Creating, Testing, and Debugging Action Menu Items (31m)

Action Menu Items—or AMIs, for short—are a lightweight alternative to Toolkit Actions. AMIs let you send information from a Shotgun page to a script via a specified protocol, like HTTP or HTTPS, or a custom protocol. This video covers multiple AMI examples and implementations.

 

Chapters
0:05 - Intro
1:45 - AMIs with PHP
5:28 - AMIs with Flask
13:45 - AMIs with Django
26:02 - Debugging AMIs

 

9: The Python API—Schema Methods (20m)

Shotgun’s Python API is explored in more detail with a focus on schema methods. The video covers topics like defining schemas, how they work with Shotgun, and known limitations.

 

Chapters
0:05 - Intro
0:22 - What is a schema
1:31 - Schema secrets
4:14 - Connection entities
7:53 - CRUD with API schema methods
8:20 - schema_entity_read
10:25 - schema_field_read
13:55 - schema_field_create
16:36 - schema_field_update
17:59 - schema_field_delete
18:30 - Limitations

 

 

10: The Python API—Upload/Download (31m)

This Shotgun Python API video covers common commands related to uploading and downloading with the API with a focus on media stored, transcoded, and tracked with Shotgun.

 

Chapters
1:04 - Uploading Files from the GUI
5:04 - Linking Files to entities
8:12 - Image and video transcoding
16:04 - Uploading with the API
19:30 - Downloading with the API
21:30 - Downloading media
22:25 - Downloading thumbnails and filmstrips
24:32 - Downloading files outside Shotgun
24:59 - Choosing not to transfer
26:08 - Local file linking
28:03 - Path to movie/frames

 

 

11: The Python API—Best Practices (25m)

Now that you’re up and running with the Shotgun API, level up your api-fu with best practices collected from the Shotgun team.

 

Chapters
0:48 - Boilerplate CLI
3:09 - Basic mistakes
5:19 - The batch command
7:04 - The find_one command
11:45 - Less event logs
14:38 - Event log entities
17:26 - schema_field_create
20:44 - schema_field_read.keys() with find
22:10 - Good shortcuts
24:12 - Documentation

 

 

12: Event Daemon, Triggers, and Automation (37m)

Shotgun ships with built-in workflow automations designed to speed up production—like Task Templates and Dependencies—but it can also be extended to create custom automations. This video covers the Shotgun Event Daemon and how to create custom triggers.


*Please be aware that this is not a video for Python or Shotgun beginners. It is a good idea to watch the proceeding videos in the Developer Training Series first, as event daemon plugins can decrease performance on your Shotgun site if implemented incorrectly.*

 

Chapters
1:28 - Installing the daemon
5:11 - Logging events
8:09 - Filtering for events
13:15 - Processing events
16:10 - Validation
23:06 - A real example
27:42 - Best practices
29:26 - Managing the event backlog
32:14 - Example plugins
36:28 - Documentation

Supplemental Material
Refactored code featured in video
ShotgunEvents GitHub Repository

 

Have feedback or want a different topic covered? Take a quick survey to let us know!

Follow

5 Comments

  • 1
    Avatar
    Johnny Duguid

    Be sure to Follow Updates (by clicking the button just above and to the right of this comment) to receive notifications when new or updated content is posted.

  • 1
    Avatar
    Johnny Duguid

     

    I've just published additional training content for this course. 

    What’s new in v2?

    - Brand new training videos covering:

        - The Web GUI

        - Resources

        - The Python API, Schema Methods

        - The Python API, Upload/Download

    - A refreshed edition of Creating, Testing, and Debugging Action Menu Items with additional debugging content

    - A playlist containing all videos in course order is now available on YouTube

    -ZenDesk article has been updated with embedded course playlist and chapter markers for new videos

  • 2
    Avatar
    Subramanian T

    Very Useful contents !

  • 0
    Avatar
    Johnny Duguid

    Another awesome update courtesy of Raphael!

    What’s new in v3?

    - Brand new training videos covering:

        - The Shotgun Tech Stack & Security (w/supplemental materials)

        - The Python API—Best Practices

        - Event Daemon, Triggers, and Automation (w/supplemental materials)

    - The YouTube Playlist has been updated to include new content

    We'll officially announce on Monday (2/26), but as a follower of this article you're getting an early sneak peak.

  • 0
    Avatar
    Johnny Duguid

    Hey all,

    Heads up that we've posted the first video in a new series focused on Toolkit. Click here to check it out!

Please sign in to leave a comment.