Skip to main content

VFX Platform pypi PyPI pyversions Tests coverage pre-commit Code style: black Ruff Checked with mypy

pyshotgrid is a python package that gives you a pythonic and object-oriented way to talk to Autodesk Flow Production Tracking (formerly known as ShotGrid or Shotgun).

Quickstart

Install pyshotgrid via pip:

pip install pyshotgrid

You are now ready to use it in your project (For other installation methods see the Installation section in the documentation)! Here is a quick example to list the "code" (aka. "name") of all shots from all projects:

import pyshotgrid as pysg

site = pysg.new_site(base_url='https://example.shotgunstudio.com',
                     script_name='Some User',
                     api_key='$ome_password')

for project in site.projects():
    print(project["name"].get())
    for shot in project.shots():
        print(shot["code"].get())

Features

In pyshotgrid you are working with SGEntity instances which each represent exactly one entity in ShotGrid. Any operation on it is reflected to ShotGrid. So for example you can :

  • Get entity fields in ShotGrid

    # Get the value of a field ...
    print(sg_project["name"].get())  # "foobar"
    # ... or get multiple fields at once.
    print(sg_project.get(["name", "tank_name"]))  # {"name": "foobar", "tank_name": "fb"}
    
  • Update entity fields in ShotGrid

    # Set the value of a field ...
    sg_project["name"].set("foobar")
    # ... or set multiple fields at once.
    sg_project.set({"name": "foobar", "tank_name": "fb"})
    
  • Values are automatically converted to pyshotgrid objects which makes it possible to chain queries together.

    # Name of the first Version in a Playlist.
    print(sg_playlist["versions"].get()[0]["code"].get())
    
  • Get information about a field

    print(sg_project["name"].data_type)     # "text"
    print(sg_project["name"].description)   # "The name of the project."
    print(sg_project["name"].display_name)  # "Project Name"
    
  • Upload/Download to/from a field

    sg_version['sg_uploaded_movie'].upload('/path/to/movie.mov')
    sg_version['sg_uploaded_movie'].download('/path/to/download/to/')
    
  • Get the URL of the entity

    print(sg_project.url)  # https://example.shotgunstudio.com/detail/Project/1
    
  • Convert it to a regular dict, to use it in Autodesk shotgun_api3.

    sg_project.to_dict()  # {"type": "Project", "id": 1}
    
  • Iterate over all fields

    # Iterate over the fields directly to get some information about them...
    for field, value in sg_project.fields().items():
         print(field.display_name)
    # ... or iterate over the fields and values at the same time.
    for field_name, value in sg_project.all_field_values().items():
         print(field_name, value)
    
  • Do you keep forgetting which field is the "name" of an entity? (was it "code" or "name"?) Just use the "SGEntity.name" property:

    sg_project.name  # returns the "name" field.    Same as:  sg_project["name"]
    sg_shot.name     # returns the "code" field.    Same as:  sg_shot["code"]
    sg_task.name     # returns the "content" field. Same as:  sg_task["content"]
    
  • It is possible to inherit from SGEntity and create implementations for specific entity types. pyshotgrid ships with a few common entities by default. For example the implementation for the Project entity (SGProject) gives you additional functions to query shots, assets or publishes:

    sg_project.shots()
    sg_project.assets()
    sg_project.publishes()
    

    Checkout the overview of all the default entities and the API documentation for all the extra functionality! As an additional bonus: You can customize and extend all these classes to your hearts content. Have a look at How to add custom entities in the docs.

FAQ

Is it faster than shotgun_api3?

No, and since it is build on top of shotgun_api3, it never will be. pyshotgrid is syntactic sugar that hopefully enables you to develop better and faster. :)

Is pyshotgrid replacing shotgun_api3?

No, quite the opposite. It is meant to be used in conjunction with shotgun_api3 and improve handling and writing code with it. Its main goal is to make it easier to write code for common scenarios and leave the special cases for shotgun_api3. That said, it is totally possible to write pyshotgrid code without using shotgun_api3.

I have some custom entity setup in ShotGrid. Can this be reflected in pyshotgrid?

Yes, it can! By default pyshotgrid returns any entity as SGEntity to provide a minimum of functionality in all cases. However, you can write your own class that inherits from SGEntity and register that to pyshotgrid. After that, pyshotgrid will use your custom entity whenever you ask for it. With this method you can even overwrite default classes that ship with pyshotgrid.

Is this an official project from Autodesk?

No, just a brainchild from me, Fabian Geisler. I am a Pipeline Developer based in Berlin. Feel free to follow me on GitHub. :)

How will the rebranding from "ShotGrid" to "Flow Production Tracking" affect this project?

There will be no code-breaking name changes and pyshotgrid will not be rebranded. Only docs and docstrings will use the new name.

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template (but was heavily modified in the meantime).

Metadata

Release files for pyshotgrid 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyshotgrid 2.1.0
File Size Uploaded
pyshotgrid-2.1.0.tar.gz 137.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyshotgrid 2.1.0
File Interpreter ABI Platform
pyshotgrid-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 159.0 kB

Release files / pyshotgrid-2.1.0.tar.gz

Download URL pyshotgrid-2.1.0.tar.gz
Size 137.9 kB
Tags Source
SHA-256 checksum
How to use checksums
0e89eeba8c46824ed4aef5ba7903be5d0b2ddc1676c2715f1320240dcc16a06a
BLAKE2b-256 checksum
How to use checksums
559f98290fe234ef6ba01659cd38c41f491dd2a915879b25a9e330dd92392d62
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 25, 2026.

Transparency log

Release files / pyshotgrid-2.1.0-py3-none-any.whl

Download URL pyshotgrid-2.1.0-py3-none-any.whl
Size 21.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a869b935979c73f30c3a46e3c8b87941a79f4e6c0a43baa273b550fd3722f7c9
BLAKE2b-256 checksum
How to use checksums
386cec75a227c7a3dc01c0b356a7c0b9e2c0d4aaf447a3ed2cb533ac636c39f7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.2

2 release files

2.0.0

2 release files

1.1.0

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.15.0

2 release files

0.14.0

2 release files

0.13.0

2 release files

0.12.0

2 release files

0.10.0

2 release files

0.9.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.7.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page