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] 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.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.0.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: dlpwait-1.0.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.0.0.tar.gz
Algorithm Hash digest
SHA256 9d759a45c5398bbbce63b2615e8a7c7b1652d8f963a5d3d98518df73a1ca63c0
MD5 a4bc39861b336f8b5a9ac01fdcb9ccf6
BLAKE2b-256 1b5cc07a86c8cad361de83466024b6d00614eebdf898f80e69736fa9d32afce0

See more details on using hashes here.

Provenance

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

File metadata

  • Download URL: dlpwait-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 fc0466530a786cbfa85048ade716e132e6e27aa3c234f6dedbced45daf7a1af6
MD5 59dc5986c8c573e393682c6ec311830e
BLAKE2b-256 3397a0e73a106edd1b7db433b7cc3685da8f0d379a83f7cdd74647d90d576c8f

See more details on using hashes here.

Provenance

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