Skip to main content

Official Python SDK for SeatData API

Project description

SeatData Python SDK

PyPI version Tests Python Support License: MIT

Official Python SDK for SeatData API - access ticket sales data, event listings, and search functionality.

API Documentation: https://app.swaggerhub.com/apis-docs/seatdata/SeatDataAPI/

Installation

pip install seatdata-sdk

Quick Start

Sync

from seatdata import SeatDataClient

client = SeatDataClient(api_key="your_64_char_api_key")

# Verify auth + see your plans and rate limits
account = client.get_account()
print(account["plans"])

# Search events (v1) - returns list of items from one page
events = client.search_events(venue_name="Madison Square Garden", venue_city="New York")

# Or iterate all matching events across pages
for event in client.iter_search_events(event_name="Taylor Swift"):
    print(event["event_id"], event["event_name"])

# Get event-level price/listing time series
for snapshot in client.iter_event_stats(event_id=12345):
    print(snapshot["timestamp"], snapshot["get_in"], snapshot["avg_price"])

# v0.x endpoints continue to work
sales = client.get_sales_data(event_id="1234567")
listings = client.get_listings(event_id="1234567")
csv = client.download_daily_csv()  # latest day

Async

import asyncio
from seatdata import AsyncSeatDataClient


async def main():
    async with AsyncSeatDataClient(api_key="your_64_char_api_key") as client:
        events = await client.search_events(event_name="Taylor Swift")
        if events:
            event_id = str(events[0]["event_id"])
            sales = await client.get_sales_data(event_id=event_id)
            print(f"{len(sales)} sales records for event {event_id}")


asyncio.run(main())

Migrating from v0.3.x

  • search_events() now calls GET /v1/events/search and returns the v1 envelope's data. The legacy POST /v0.3.1/events/search is available as search_events_legacy() (deprecated, removed in v1.1).
  • event_request_addcreate_event_request. event_request_statusget_event_request_status. Old names remain as deprecated aliases.
  • Exceptions gained richer attributes: SeatDataRateLimitError.retry_after, SeatDataInvalidRequestError.param, CursorExpiredError.items_yielded / .last_cursor. Legacy exception names (AuthenticationError, RateLimitError, etc.) are preserved as aliases.
  • The HTTP layer is now httpx. If you caught requests.exceptions.* directly, switch to seatdata.SeatDataError.

API Key

Contact support@seatdata.io to obtain an API key.

Development

# Clone the repository
git clone https://github.com/SeatDataIO/python-sdk.git
cd python-sdk

# Install development dependencies
pip install -r requirements.txt

# Run tests
pytest

# Run integration tests (requires API key)
export SEATDATA_API_KEY="your_api_key"
pytest -m integration

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

seatdata_sdk-1.0.0.tar.gz (22.4 kB view details)

Uploaded Source

Built Distribution

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

seatdata_sdk-1.0.0-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file seatdata_sdk-1.0.0.tar.gz.

File metadata

  • Download URL: seatdata_sdk-1.0.0.tar.gz
  • Upload date:
  • Size: 22.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for seatdata_sdk-1.0.0.tar.gz
Algorithm Hash digest
SHA256 b057337209f1fd32d565957f67ea5d538af7795f2c370ffbfed2fdad79f41054
MD5 d00f07f52bad34feabf032a175b63ab1
BLAKE2b-256 d116e0fe71589d0005f7b5eecdce3311a0c2f630817f57952b6cb72a9d7f66ee

See more details on using hashes here.

File details

Details for the file seatdata_sdk-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: seatdata_sdk-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.10.20

File hashes

Hashes for seatdata_sdk-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ec15be208a35587c96ff26df34c66ebb622fbc98d163f03768b8157fd0ea9fbe
MD5 6d14f1f72b5b40ffe26c0d5a664fceac
BLAKE2b-256 a1d5c8cfe11270a2c163d926c4c21ce951cd58b12d2b1313734e87d7829ee1d5

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