shotgun-extensions


Nameshotgun-extensions JSON
Version 1.0.5 PyPI version JSON
download
home_pagehttps://github.com/mbsurfer/shotgun-extensions
Summaryshotgun_extensions extends the functionality of shotgun_api3 Python package
upload_time2024-08-21 21:44:34
maintainerNone
docs_urlNone
authorRyan Neldner
requires_python>=3.7.0
licenseNone
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # shotgun_extensions

shotgun_extensions extends the functionality of shotgun_api3 Python package.

Quick example:

```python
>> > from shotgun_api3 import Shotgun
>> > from shotgun_extensions import sge_find_one
>> > sg = Shotgun('https://your-server.com', script_name='Script Name', api_key='scrip_api_key')
>> > my_shot = sge_find_one(sg, entity_type='Shot',
                            filters=[['code', 'is', '101_001_0001']],
                            fields=['name', 'query_field'])
>> > print(my_shot)

[{'name': '101_001_0001', 'query_field': 'value'}]
```

## Supported Features

### Query Fields

Currently, the ShotGun API does not support requesting query field values in the response from methods such as find and
find_one.

In order to get these values, you must request the entity schema and parse the response to generate additional queries
to the API.

See https://community.shotgridsoftware.com/t/api-to-get-query-field-values/11263 for details.

The query_fields module provides two methods that are meant to replace the find and find_one methods from the
shotgun_api3 package:

- sge_find
- sge_find_one

There is an optional parameter you can use with these functions called "logged_in_user." This is for you to pass a user
entity that will be used whenever you are referencing "Me" in one of your query fields in ShotGun.

The expected format is as follows:

```python
{
    'type': 'HumanUser',
    'id': 1234
}
```

## Install

You need Python 3.7 or newer.

You can install the library like this (preferably in a [virtualenv](https://virtualenv.pypa.io/en/stable/)):

```
pip install shotgun-extensions
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/mbsurfer/shotgun-extensions",
    "name": "shotgun-extensions",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.7.0",
    "maintainer_email": null,
    "keywords": null,
    "author": "Ryan Neldner",
    "author_email": "rneldner@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/60/9f/fcedd111e6498dbc9c501865d349a8d4ee4249746f55a887a925b630d8ff/shotgun_extensions-1.0.5.tar.gz",
    "platform": null,
    "description": "# shotgun_extensions\r\n\r\nshotgun_extensions extends the functionality of shotgun_api3 Python package.\r\n\r\nQuick example:\r\n\r\n```python\r\n>> > from shotgun_api3 import Shotgun\r\n>> > from shotgun_extensions import sge_find_one\r\n>> > sg = Shotgun('https://your-server.com', script_name='Script Name', api_key='scrip_api_key')\r\n>> > my_shot = sge_find_one(sg, entity_type='Shot',\r\n                            filters=[['code', 'is', '101_001_0001']],\r\n                            fields=['name', 'query_field'])\r\n>> > print(my_shot)\r\n\r\n[{'name': '101_001_0001', 'query_field': 'value'}]\r\n```\r\n\r\n## Supported Features\r\n\r\n### Query Fields\r\n\r\nCurrently, the ShotGun API does not support requesting query field values in the response from methods such as find and\r\nfind_one.\r\n\r\nIn order to get these values, you must request the entity schema and parse the response to generate additional queries\r\nto the API.\r\n\r\nSee https://community.shotgridsoftware.com/t/api-to-get-query-field-values/11263 for details.\r\n\r\nThe query_fields module provides two methods that are meant to replace the find and find_one methods from the\r\nshotgun_api3 package:\r\n\r\n- sge_find\r\n- sge_find_one\r\n\r\nThere is an optional parameter you can use with these functions called \"logged_in_user.\" This is for you to pass a user\r\nentity that will be used whenever you are referencing \"Me\" in one of your query fields in ShotGun.\r\n\r\nThe expected format is as follows:\r\n\r\n```python\r\n{\r\n    'type': 'HumanUser',\r\n    'id': 1234\r\n}\r\n```\r\n\r\n## Install\r\n\r\nYou need Python 3.7 or newer.\r\n\r\nYou can install the library like this (preferably in a [virtualenv](https://virtualenv.pypa.io/en/stable/)):\r\n\r\n```\r\npip install shotgun-extensions\r\n```\r\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "shotgun_extensions extends the functionality of shotgun_api3 Python package",
    "version": "1.0.5",
    "project_urls": {
        "Homepage": "https://github.com/mbsurfer/shotgun-extensions"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "3cee2eb9fbcdb0276c6242b47679144fe63d71ed6f1ab0e561cc9409af6f7982",
                "md5": "9da3d11c6a0b6ca37dca64b161345818",
                "sha256": "ad3310a60636b4ca8fe2cdaf7292737c84be98f41f1d6a6d20078d373effa583"
            },
            "downloads": -1,
            "filename": "shotgun_extensions-1.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9da3d11c6a0b6ca37dca64b161345818",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.7.0",
            "size": 7877,
            "upload_time": "2024-08-21T21:44:33",
            "upload_time_iso_8601": "2024-08-21T21:44:33.321875Z",
            "url": "https://files.pythonhosted.org/packages/3c/ee/2eb9fbcdb0276c6242b47679144fe63d71ed6f1ab0e561cc9409af6f7982/shotgun_extensions-1.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "609ffcedd111e6498dbc9c501865d349a8d4ee4249746f55a887a925b630d8ff",
                "md5": "8090bef94e5319f5c20d7ea42e94e79c",
                "sha256": "46e3be18f23ba1c9eea501afae62954d98dab3c650aae3a5a739297ababab601"
            },
            "downloads": -1,
            "filename": "shotgun_extensions-1.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "8090bef94e5319f5c20d7ea42e94e79c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.7.0",
            "size": 6961,
            "upload_time": "2024-08-21T21:44:34",
            "upload_time_iso_8601": "2024-08-21T21:44:34.338733Z",
            "url": "https://files.pythonhosted.org/packages/60/9f/fcedd111e6498dbc9c501865d349a8d4ee4249746f55a887a925b630d8ff/shotgun_extensions-1.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-08-21 21:44:34",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "mbsurfer",
    "github_project": "shotgun-extensions",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "shotgun-extensions"
}
        
Elapsed time: 0.58810s