shotgunwrapper


Nameshotgunwrapper JSON
Version 0.1.0 PyPI version JSON
download
home_pagehttp://github.com/rsgalloway/shotgunwrapper
SummaryPythonic Shotgun API wrapper
upload_time2024-11-19 04:15:48
maintainerNone
docs_urlNone
authorRyan Galloway
requires_python>=3.8
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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:

```bash
$ pip install shotgunwrapper
```

Alternatively, use distman to dist to a deployment area using options defined
in the `dist.json`:

```bash
$ 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:

```bash
$ cp example_stack.env shotgunwrapper.env
```

and editing it's contents with the appropriate values:

```yaml
LOG_LEVEL: INFO
SG_SCRIPT_URL: https://example.shotgunstudio.com
SG_SCRIPT_NAME: script_name
SG_SCRIPT_KEY: XXXXXX
```

## Usage

Basic usage:

```python
>>> 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:

```python
>>> sg.find(filters, fields)
>>> shot.api().find("Task", [["id", "is", 12345]])
[{'type': 'Task', 'id': 12345}]
```

#### Download Versions

```python
>>> 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")
```

            

Raw data

            {
    "_id": null,
    "home_page": "http://github.com/rsgalloway/shotgunwrapper",
    "name": "shotgunwrapper",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": null,
    "keywords": null,
    "author": "Ryan Galloway",
    "author_email": "ryan@rsgalloway.com",
    "download_url": "https://files.pythonhosted.org/packages/5b/0a/d53576e6c297620d362c3cc45335ebdbc4c0cc921ac2eba3a6902d7bffe3/shotgunwrapper-0.1.0.tar.gz",
    "platform": null,
    "description": "shotgun\n=======\n\nThis is a object-oriented wrapper around the shotun api3 Python API, that\nincludes classes for each shotgun entity type with convenience methods.\n\n## Installation\n\nThe easiest way to install:\n\n```bash\n$ pip install shotgunwrapper\n```\n\nAlternatively, use distman to dist to a deployment area using options defined\nin the `dist.json`:\n\n```bash\n$ distman [-d]\n```\n\nFiles and directories can be distributed from any folder or git repo containing\na `dist.json` file.\n\n## Configuration\n\nDefault settings are stored in an env stack .env file. They can be stored in the\ndefault stack, or in a namespaced `shotgunwrapper.env` stack file to keep settings\nseparate.\n\nStart by renaming or copying the `example_stack.env` file:\n\n```bash\n$ cp example_stack.env shotgunwrapper.env\n```\n\nand editing it's contents with the appropriate values:\n\n```yaml\nLOG_LEVEL: INFO\nSG_SCRIPT_URL: https://example.shotgunstudio.com\nSG_SCRIPT_NAME: script_name\nSG_SCRIPT_KEY: XXXXXX\n```\n\n## Usage\n\nBasic usage:\n\n```python\n>>> from shotgun import Shotgun\n>>> sg = Shotun()\n>>> show = sg.get_projects(\"Demo: Animation\")[0]\n>>> shot = show.get_shots(\"bunny_080_0200\")[0]\n>>> tasks = shot.get_tasks()\n```\n\n#### Core API\n\nThe Shotgun class is a subclass of shotgun_api3.Shotgun, so you can drop down\nto the core API at any time or from any object:\n\n```python\n>>> sg.find(filters, fields)\n>>> shot.api().find(\"Task\", [[\"id\", \"is\", 12345]])\n[{'type': 'Task', 'id': 12345}]\n```\n\n#### Download Versions\n\n```python\n>>> version = sg.get_projects(show)[0].get_shots(shot)[0].get_versions()[0]\n>>> version.movie\n<Movie \"bunny_080_0200_v001.mov\">\n>>> version.movie.download(\"/var/tmp\")\n```\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "Pythonic Shotgun API wrapper",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "http://github.com/rsgalloway/shotgunwrapper"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "5b0ad53576e6c297620d362c3cc45335ebdbc4c0cc921ac2eba3a6902d7bffe3",
                "md5": "cecb25a13350324191f688cf13dd3578",
                "sha256": "c27c1be5842221cb6e13f3a4085e4f348be64ca1dbc71348ea902048672a3d81"
            },
            "downloads": -1,
            "filename": "shotgunwrapper-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "cecb25a13350324191f688cf13dd3578",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 11474,
            "upload_time": "2024-11-19T04:15:48",
            "upload_time_iso_8601": "2024-11-19T04:15:48.556016Z",
            "url": "https://files.pythonhosted.org/packages/5b/0a/d53576e6c297620d362c3cc45335ebdbc4c0cc921ac2eba3a6902d7bffe3/shotgunwrapper-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-11-19 04:15:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "rsgalloway",
    "github_project": "shotgunwrapper",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "shotgunwrapper"
}
        
Elapsed time: 0.34182s