Skip to main content

Python SDK for cinema platform APIs. Type-safe async-first client with authentication, rate limiting, retry logic, and mock mode.

Project description

Theatrical SDK for Python

Type-safe async-first Python client for cinema platform APIs. Part of the Theatrical polyglot SDK.

Install

pip install theatrical

Status

Alpha — all 8 resource modules implemented with full TS API parity. 332 pytest tests passing. mypy strict clean, ruff clean.

Requirements

  • Python 3.10+
  • httpx >= 0.27.0
  • pydantic >= 2.0.0

Quick Start

from theatrical import TheatricalClient, TheatricalConfig, TheatricalEnvironment

async with TheatricalClient(TheatricalConfig(
    api_key="your-api-key",
    environment=TheatricalEnvironment.SANDBOX,
)) as client:
    sessions = await client.sessions.list()

Mock Mode

client = TheatricalClient.create_mock()
# Returns pre-defined NZ cinema fixture data — no API key needed

Singleton Pattern

# At startup:
TheatricalClient.set_global(TheatricalConfig(api_key="key"))

# Anywhere:
client = TheatricalClient.global_instance()

Features

  • Async-first design with httpx and context manager support
  • pydantic v2 models with automatic camelCase alias support
  • 8 resource modules: sessions, sites, films, orders, loyalty, subscriptions, pricing, F&B
  • Typed error hierarchy: AuthenticationError, NotFoundError, RateLimitError, ValidationError
  • Mock mode with NZ cinema fixture data for offline development
  • PEP 561 compliant — ships py.typed for downstream type checking
  • 332 tests, mypy strict, ruff clean

Development

pip install -e ".[dev]"
make check  # runs typecheck, lint, test

Disclaimer

This project is an independent, open-source developer toolkit for cinema platform APIs. It is not affiliated with, endorsed by, or officially connected to Vista Group International Ltd or any of its subsidiaries. All product names, trademarks, and registered trademarks are property of their respective owners.

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

theatrical-0.1.0.tar.gz (26.6 kB view details)

Uploaded Source

Built Distribution

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

theatrical-0.1.0-py3-none-any.whl (40.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: theatrical-0.1.0.tar.gz
  • Upload date:
  • Size: 26.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for theatrical-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2cfc78b451147e9b3c78ad7c3d006a1e7f6f84aaecaed94d50db99174daf5893
MD5 ec435c159773b4425dae6e0e2d04a6e8
BLAKE2b-256 768c3780a9a785b9a0f13c35e06a0393bc1ad69e8ffc084dc8ab159aab69df78

See more details on using hashes here.

Provenance

The following attestation bundles were made for theatrical-0.1.0.tar.gz:

Publisher: publish-python.yml on brunohart/theatrical

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: theatrical-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 40.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for theatrical-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 49125c93c88c7a75e40468f82cc607fd3770971019d688aca2f7c808b9831fa6
MD5 0da26b47a5503912273e8571fe537974
BLAKE2b-256 3fc14a9b3b04f60f8adbdcf44052b9534f83f4c42eedd3fa0a161c42a6bc5821

See more details on using hashes here.

Provenance

The following attestation bundles were made for theatrical-0.1.0-py3-none-any.whl:

Publisher: publish-python.yml on brunohart/theatrical

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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