Skip to main content

Asynchronous Python client for Disneyland Paris park data

Project description

DLPWait API Client

An asynchronous Python client for fetching real-time Disneyland Paris park and attraction data via the DLPWait API. This lightweight library provides methods for retrieving park hours, attractions, and standby wait times.

Features

  • Asynchronous communication using aiohttp
  • Fetch park hours and operating schedules
  • Fetch attractions
  • Get real-time standby wait times
  • Built-in error handling for connection and parsing failures
  • Designed for easy integration into automation tools or async workflows

Requirements

  • Python 3.11+
  • aiohttp library

Usage Example

import asyncio
from dlpwait import DLPWaitAPI, DLPWaitConnectionError, Parks

async def main():
    client = DLPWaitAPI()

    try:
        await client.update()  # Fetch all park data

        for park in Parks:
            park_data = client.parks[Parks(park)]
            print(f"{park_data.slug} is open from {park_data.opening_time} to {park_data.closing_time}")
            print("Attractions:")
            for attraction_id, name in park_data.attractions.items():
                wait_time = park_data.standby_wait_times.get(attraction_id, "N/A")
                print(f"  {name}: {wait_time} min")

    except DLPWaitConnectionError as err:
        print(f"Error fetching park data: {err}")

    finally:
        await client.close()

asyncio.run(main())

API Reference

Class: DLPWaitAPI

Initialization

DLPWaitAPI(session: aiohttp.ClientSession | None = None)
  • session (optional) – existing aiohttp.ClientSession to reuse.

Fetch & Update Methods

Method Description
update() Fetch and parse all park data
close() Close the HTTP session to free resources

Models

Parks Enum

Member Description
DISNEYLAND Disneyland Park
WALT_DISNEY_STUDIOS Walt Disney Studios Park

Park Dataclass

Field Type Description
slug Parks Park identifier
opening_time datetime Park opening time
closing_time datetime Park closing time
attractions dict[str, str] Attraction IDs mapped to names
standby_wait_times dict[str, int | None] Attraction IDs mapped to wait times (minutes)

Exception Handling

All exceptions inherit from DLPWaitError.

Exception Description
DLPWaitError Base exception for DLPWait client
DLPWaitConnectionError Connection-related errors (timeouts, bad responses)

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

dlpwait-1.0.1.tar.gz (7.1 kB view details)

Uploaded Source

Built Distribution

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

dlpwait-1.0.1-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

Details for the file dlpwait-1.0.1.tar.gz.

File metadata

  • Download URL: dlpwait-1.0.1.tar.gz
  • Upload date:
  • Size: 7.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dlpwait-1.0.1.tar.gz
Algorithm Hash digest
SHA256 8423e005807ccfc2742e26dbd48c242011cf62fc9df509af461ebf3624ce573f
MD5 00d48c38b2e286e1159e135b459847c7
BLAKE2b-256 c827100f2efd1ae3f0200f3d994a62df957498f2c776851c1655c22038a29333

See more details on using hashes here.

Provenance

The following attestation bundles were made for dlpwait-1.0.1.tar.gz:

Publisher: publish.yml on glenndehaan/python-dlpwait

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

File details

Details for the file dlpwait-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: dlpwait-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for dlpwait-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1bce97244bfa3a5b1dabbc5d6e9740f0948866ab026a2ab7e475329615c3ffde
MD5 89380817164f1a08b3094c9cded38eb8
BLAKE2b-256 afcab9b0efac8825a15c0768582ea51b3f1721443bb31cfe9d2d41a811de17a6

See more details on using hashes here.

Provenance

The following attestation bundles were made for dlpwait-1.0.1-py3-none-any.whl:

Publisher: publish.yml on glenndehaan/python-dlpwait

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