shotgun
This is a object-oriented wrapper around the shotun api3 Python API, that includes classes for each shotgun entity type with convenience methods.
Installation
The easiest way to install:
$ pip install shotgunwrapper
Alternatively, use distman to dist to a deployment area using options defined
in the dist.json:
$ distman [-d]
Files and directories can be distributed from any folder or git repo containing
a dist.json file.
Configuration
Default settings are stored in an env stack .env file. They can be stored in the
default stack, or in a namespaced shotgunwrapper.env stack file to keep settings
separate.
Start by renaming or copying the example_stack.env file:
$ cp example_stack.env shotgunwrapper.env
and editing it's contents with the appropriate values:
LOG_LEVEL: INFO
SG_SCRIPT_URL: https://example.shotgunstudio.com
SG_SCRIPT_NAME: script_name
SG_SCRIPT_KEY: XXXXXX
Usage
Basic usage:
>>> from shotgun import Shotgun
>>> sg = Shotun()
>>> show = sg.get_projects("Demo: Animation")[0]
>>> shot = show.get_shots("bunny_080_0200")[0]
>>> tasks = shot.get_tasks()
Core API
The Shotgun class is a subclass of shotgun_api3.Shotgun, so you can drop down to the core API at any time or from any object:
>>> sg.find(filters, fields)
>>> shot.api().find("Task", [["id", "is", 12345]])
[{'type': 'Task', 'id': 12345}]
Download Versions
>>> version = sg.get_projects(show)[0].get_shots(shot)[0].get_versions()[0]
>>> version.movie
<Movie "bunny_080_0200_v001.mov">
>>> version.movie.download("/var/tmp")
Metadata
Release files for shotgunwrapper 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| shotgunwrapper-0.1.0.tar.gz | 11.5 kB | Without provenance | Details for shotgunwrapper-0.1.0.tar.gz |
Release files / shotgunwrapper-0.1.0.tar.gz
| Download URL | shotgunwrapper-0.1.0.tar.gz |
|---|---|
| Size | 11.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c27c1be5842221cb6e13f3a4085e4f348be64ca1dbc71348ea902048672a3d81
|
|
BLAKE2b-256 checksum How to use checksums |
5b0ad53576e6c297620d362c3cc45335ebdbc4c0cc921ac2eba3a6902d7bffe3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.8.10
|
Security for shotgunwrapper 0.1.0
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.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.