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
DISNEY_ADVENTURE_WORLD Disney Adventure World 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.1.0.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.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dlpwait-1.1.0.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.1.0.tar.gz
Algorithm Hash digest
SHA256 9b7ed3b25f47ff2b1736b1adf5a73e039b3fea5d41b80c3263d7b518205cd60a
MD5 fbd6f39b46fba241769b6e8f2e2bf663
BLAKE2b-256 11ca3dcf7e9f0266840a9246ac8b552f5dfb869c9529e06bda545ade65a6eb96

See more details on using hashes here.

Provenance

The following attestation bundles were made for dlpwait-1.1.0.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.1.0-py3-none-any.whl.

File metadata

  • Download URL: dlpwait-1.1.0-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.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f7bdc6fc34e713624b63106c73eb2d5a9977975d9be8d0c2af544a1fbd20381f
MD5 1d9f6a744fb5e04204b5c0e4c67ed37f
BLAKE2b-256 05fe1aaa1b1b2e3d8ba1faeee752be7f1accc005eba749772e9eeb1041ba4a8a

See more details on using hashes here.

Provenance

The following attestation bundles were made for dlpwait-1.1.0-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