Skip to main content

A simple connection maker for ShotGrid

Project description

ShotGrid Flow

A simple Python package to establish connections to ShotGrid, whether from within a DCC (Digital Content Creation) application or standalone.

Installation

pip install flow

Or to install from the source directory:

pip install -e .

Usage

Basic Usage

from flow import Flow

# Connect using the current desktop user
flow = Flow.connect(user=True)

# Use the Shotgrid API
projects = flow.api.find("Project", [], ["name"])
print(projects)

Connect With Script Key

from flow import Flow

# Connect using a script key (environment variable SCRIPT_KEY_NUKE must be set)
flow = Flow.connect(script_key="NUKE")

# Use the Shotgrid API
projects = flow.api.find("Project", [], ["name"])
print(projects)

Using with .env file

Create a .env file in your project root:

SHOTGUN_HOST=https://your-studio.shotgunstudio.com
SCRIPT_KEY_NUKE=your-api-key-here

The package will automatically find and load this file when you call Flow.connect(). You can also specify a different path to your .env file:

flow = Flow.connect(script_key="NUKE", dotenv_path="/path/to/your/.env")
### Connect From a Path

```python
from flow import Flow

# Connect using a path inside a project
flow = Flow.connect(user=True, path="/path/to/project")

# Use the toolkit
current_context = flow.tk.context_from_path(path)
print(current_context)

Requirements

  • Python 3.6+
  • Shotgrid Toolkit (sgtk)

License

MIT License

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

shotgrid_flow-0.1.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

shotgrid_flow-0.1.0-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file shotgrid_flow-0.1.0.tar.gz.

File metadata

  • Download URL: shotgrid_flow-0.1.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.7 Linux/6.11.0-21-generic

File hashes

Hashes for shotgrid_flow-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2a56679cfec3017608c9a740c06799cf7e84dcb2002de77a32e29bb82bea1885
MD5 b55177c5c7b723602154655e7d6fb7f6
BLAKE2b-256 5bdf1d52a9d48f6858a7914125cb389f2d92778994edbce568f30f71fd04afa4

See more details on using hashes here.

File details

Details for the file shotgrid_flow-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: shotgrid_flow-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/2.1.2 CPython/3.12.7 Linux/6.11.0-21-generic

File hashes

Hashes for shotgrid_flow-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8d274c9c41accf8419d0a281bec0f011ce01f400832d62d1a720a9d4bf7be88c
MD5 e77b8258a237860f78fbfacde5009703
BLAKE2b-256 c0094368751ae970dd4bd11d59d8a1bcd801dcc07f1c6abcbcde07381f2c9880

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page