Skip to main content

Python client for the StraightAhead production tracker API

Project description

StraightAhead Python SDK

Python client for the StraightAhead production tracker API. Submit renders, animation passes, and other deliverables directly from your pipeline scripts, render farm, or CI system. The file lands in the correct shot and department, the task moves to In Review, and a supervisor can approve or retake it immediately.

Installation

pip install straightahead

Quick start

from straightahead import StraightAhead

client = StraightAhead(api_key="sk_your_key", base_url="https://your-studio.example.com")
result = client.submit(shot_code="EP01_SQ0010_SH0040", department="Animation", file="/renders/sh0040_v003.mp4")
print(result)  # Version 42 submitted: EP01_SQ0010_SH0040 / Animation

Validate before submitting

Use validate() to confirm the shot and department exist before sending a file.

info = client.validate(shot_code="EP01_SQ0010_SH0040", department="Animation")
if info.has_task:
    result = client.submit(shot_code=info.shot_code, department="Animation", file=render_path)

Error handling

All errors inherit from StraightAheadError with a .message and .status_code.

from straightahead import StraightAhead, StraightAheadError, StraightAheadNotFoundError

client = StraightAhead(api_key="sk_your_key", base_url="https://your-studio.example.com")
try:
    client.submit(shot_code="EP01_SQ0010_SH9999", department="Animation", file="render.mp4")
except StraightAheadNotFoundError:
    print("Shot or department not found")
except StraightAheadError as e:
    print(f"Submission failed: {e.message} (HTTP {e.status_code})")
Exception HTTP When
StraightAheadAuthError 401 API key missing, invalid, or revoked
StraightAheadNotFoundError 404 Shot code or department not found
StraightAheadValidationError 422 No task for shot+department, or no file provided
StraightAheadFileTooLargeError 413 File exceeds 50 MB
StraightAheadConnectionError - Network timeout, refused, DNS failure

Environment variables

The example script at examples/submit_render.py reads credentials from the environment:

export SA_API_KEY=sk_your_key_here
export SA_BASE_URL=https://your-studio.example.com

License

MIT

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

straightahead-0.1.0.tar.gz (4.1 kB view details)

Uploaded Source

Built Distribution

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

straightahead-0.1.0-py3-none-any.whl (4.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: straightahead-0.1.0.tar.gz
  • Upload date:
  • Size: 4.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.1

File hashes

Hashes for straightahead-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6d5badb0ae359204a0c72cdd799d6e4e5d2d26ccf41548f9b600a23704ed040f
MD5 6bd66e69ae4cf0c709c83d561942aae8
BLAKE2b-256 670a91ce222c7e425feaa694f413862d6436406ee527b7ff8dd9328df83641aa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: straightahead-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.1

File hashes

Hashes for straightahead-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ea6794cebee46dd5278b982d30f9b8ea4bbf421c182e52aa898ef5b85e544710
MD5 fbefaa494ef9a138863d1fe06a4d8f25
BLAKE2b-256 b038584c2e1f9c229c33f750130db3ccac48f5233f899927a53e2f91e3b7eb97

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