Skip to content

Instantly share code, notes, and snippets.

View thebeeland's full-sized avatar

Jeffery Beeland thebeeland

  • Autodesk
  • Seattle, WA
View GitHub Profile
@thebeeland
thebeeland / sg_rest_api_pagination_post_example.py
Created October 25, 2019 00:02
An example of how to make use of pagination with Shotgun's rest api when doing a POST
import requests
import pprint
import json
import os
site_url = os.environ["SHOTGUN_SITE_URL"] # ie: https://foobar.shotgunstudio.com
headers = {
"Accept": "application/json",
"Content-Type": "application/x-www-form-urlencoded"

What doesn't (but should) work

If a user wanted to output multiple filetypes from Photoshop via the publish2 app, they should be able to do the following in their config:

core/templates.yml

# Add templates for each file type that they want to output. You're just copy/pasting
# the photoshop_asset_publish template, renaming it, and changing the extension on the
# path. In this case, we're setting up additional templates for png and jpg files.