Skip to main content

Opinionated Autodesk Shotgun/ShotGrid API Wrapper.

Project description

konbini

おまえはもうショットいる。なに?!

Opinionated wrapper for Autodesk Shotgun I mean ShotGrid Python API because the API usage requirements is 便利じゃないでしょう?

コンビニね~ As there is an existing PyPI project using konbini name, this repo project name on PyPI will be konbinine.

How to Use

For Python 3.8 and newer! While Autodesk made shotgun_api3 to be compatible with Python 2 and 3, konbinine uses dataclass that is only available in Python 3.7 onwards. Starting with v0.1.6, Python 3.8 will be the minimum version due to the usage of TypedDict.

konbinine is designed to be used with web framework (such as Django, Flask, etc.) that interacts with ShotGrid. This library has not been tested inside Digital Content Creation (DCC) software such as Maya, 3ds Max or Houdini.

Technically it should just work but that is outside the scope of this library.

New Project

First time setup

  1. Add konbinine to your project's requirements.txt.
  2. ???
  3. Profit (in improving code readability and debugging)

Using konbinine

I recommend configuring the environment variables before running the following code.

Set it using your .env file or through the shell session etc.

# if your studio subscribed to Shotgun prior to the ShotGrid rename, the URL should
# looks like https://yourstudioname.shotgunstudio.com or something 
KONBINI_BASE_URL=https://yourstudioname.shotgrid.autodesk.com
KONBINI_SCRIPT_NAME=YOURSHOTGRIDAPISCRIPTNAMEHERE
KONBINI_API_KEY=YOURSHOTGRIDAPIKEYHERE
from konbinine import Konbini
from konbinine.enums import SgEntity

kon = Konbini()
booking_schemas = kon.get_sg_entity_schema_fields(SgEntity.BOOKING)
# whatever booking schemas results here

Existing Project that Uses shotgun_api3

You will need to... rewrite/refactor your code to use konbinine! Pretty much the main reason why konbinine was created is to improve the Developer Experience (DX) when interacting with ShotGrid.

Quickstart for Developers

pip install -r requirements.txt

Extending konbinine

Coming soon!

TODO

  1. Implement Sequence dataclass
  2. Handle Image/Movie upload gracefully (currently for Project entity only)

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

konbinine-0.2.1.tar.gz (17.3 kB view details)

Uploaded Source

Built Distribution

konbinine-0.2.1-py3-none-any.whl (17.0 kB view details)

Uploaded Python 3

File details

Details for the file konbinine-0.2.1.tar.gz.

File metadata

  • Download URL: konbinine-0.2.1.tar.gz
  • Upload date:
  • Size: 17.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for konbinine-0.2.1.tar.gz
Algorithm Hash digest
SHA256 995dd2d8ea6e7d599f9bea8633c1fda00bfb8f6511e4093998f0d394c9cfb718
MD5 f5464a4fb412615e5187563360739e4a
BLAKE2b-256 753102425f729ac8bf29ee49fdee9ef57faa0a53a5d3737ace4c459e9e5802db

See more details on using hashes here.

File details

Details for the file konbinine-0.2.1-py3-none-any.whl.

File metadata

  • Download URL: konbinine-0.2.1-py3-none-any.whl
  • Upload date:
  • Size: 17.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.12

File hashes

Hashes for konbinine-0.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 babec104f0ddcccb16e586e2fdd4acbaa6aff1197d6d7f885e0248a65669df09
MD5 d988104ebe2d793c14682a83a5dd2017
BLAKE2b-256 71a0e5f257e1f65541e307b39fbe4d5665c3eb749b67538b796906e11e7d42dc

See more details on using hashes here.

Supported by

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