MouseTools 4.0.0b1__tar.gz → 4.0.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (31) hide show
  1. {mousetools-4.0.0b1 → mousetools-4.0.2}/LICENSE +1 -1
  2. mousetools-4.0.2/PKG-INFO +117 -0
  3. mousetools-4.0.2/README.md +92 -0
  4. mousetools-4.0.2/mousetools/__init__.py +4 -0
  5. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools/channels/__init__.py +1 -0
  6. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools/channels/enums.py +5 -0
  7. mousetools-4.0.2/mousetools/channels/facilities/__init__.py +856 -0
  8. mousetools-4.0.2/mousetools/channels/facilitystatus/__init__.py +266 -0
  9. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools/mixins/disney.py +2 -1
  10. mousetools-4.0.2/mousetools.egg-info/PKG-INFO +117 -0
  11. mousetools-4.0.2/mousetools.egg-info/requires.txt +4 -0
  12. {mousetools-4.0.0b1 → mousetools-4.0.2}/pyproject.toml +11 -6
  13. {mousetools-4.0.0b1 → mousetools-4.0.2}/tests/test_mixins.py +13 -0
  14. mousetools-4.0.0b1/PKG-INFO +0 -80
  15. mousetools-4.0.0b1/README.md +0 -62
  16. mousetools-4.0.0b1/mousetools/__init__.py +0 -7
  17. mousetools-4.0.0b1/mousetools/channels/facilities/__init__.py +0 -520
  18. mousetools-4.0.0b1/mousetools/channels/facilitystatus/__init__.py +0 -153
  19. mousetools-4.0.0b1/mousetools.egg-info/PKG-INFO +0 -80
  20. mousetools-4.0.0b1/mousetools.egg-info/requires.txt +0 -3
  21. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools/api/__init__.py +0 -0
  22. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools/api/menu.py +0 -0
  23. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools/auth.py +0 -0
  24. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools/channels/facilities/enums.py +0 -0
  25. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools/mixins/__init__.py +0 -0
  26. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools/mixins/couchbase.py +0 -0
  27. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools/resources/environments.bin +0 -0
  28. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools.egg-info/SOURCES.txt +0 -0
  29. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools.egg-info/dependency_links.txt +0 -0
  30. {mousetools-4.0.0b1 → mousetools-4.0.2}/mousetools.egg-info/top_level.txt +0 -0
  31. {mousetools-4.0.0b1 → mousetools-4.0.2}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 Scott Caratozzolo
3
+ Copyright (c) 2018-2025 Scott Caratozzolo
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,117 @@
1
+ Metadata-Version: 2.4
2
+ Name: mousetools
3
+ Version: 4.0.2
4
+ Summary: An unofficial Python wrapper for Disney's API
5
+ Author: Scott Caratozzolo
6
+ License-Expression: MIT
7
+ Project-URL: repository, https://gitlab.com/caratozzoloxyz/public/MouseTools
8
+ Project-URL: documentation, https://caratozzoloxyz.gitlab.io/public/MouseTools/
9
+ Project-URL: issues, https://gitlab.com/caratozzoloxyz/public/MouseTools/-/issues
10
+ Classifier: Programming Language :: Python :: 3
11
+ Classifier: Programming Language :: Python :: 3.9
12
+ Classifier: Programming Language :: Python :: 3.10
13
+ Classifier: Programming Language :: Python :: 3.11
14
+ Classifier: Programming Language :: Python :: 3.12
15
+ Classifier: Programming Language :: Python :: 3.13
16
+ Classifier: Operating System :: OS Independent
17
+ Requires-Python: <4.0,>=3.9
18
+ Description-Content-Type: text/markdown
19
+ License-File: LICENSE
20
+ Requires-Dist: httpx>=0.27.2
21
+ Requires-Dist: pycryptodome>=3.22.0
22
+ Requires-Dist: python-dateutil>=2.9.0.post0
23
+ Requires-Dist: tzdata>=2025.2
24
+ Dynamic: license-file
25
+
26
+ # MouseTools
27
+
28
+ [![PyPI version](https://badge.fury.io/py/MouseTools.svg)](https://badge.fury.io/py/MouseTools) [![Downloads](https://pepy.tech/badge/mousetools)](https://pepy.tech/project/mousetools)
29
+
30
+
31
+ An unofficial Python wrapper for the Disney API. Data is pulled directly from Disney. This package supports Walt Disney World and Disneyland Resort.
32
+
33
+ This package makes no attempt to access data that would require individual user authentication. All data is pulled using public channels.
34
+
35
+ ## Installation
36
+ You can install using pip:
37
+ ```bash
38
+ pip install mousetools
39
+ ```
40
+ You can also install directly from this repo in case of any changes not uploaded to Pypi.
41
+ ```bash
42
+ pip install git+https://gitlab.com/caratozzoloxyz/public/MouseTools
43
+ ```
44
+
45
+ # Usage
46
+
47
+ The Disney API considers everything an entity. Attractions, resorts, restaurants, etc, are all entities. Entities belong to channels, or a group of entities.
48
+
49
+ ## Getting Started
50
+
51
+ You'll want to create a facility channel object.
52
+
53
+ ```python
54
+ from mousetools.channels.facilities import AttractionFacilityChild
55
+
56
+ pirates = AttractionFacilityChild("wdw.facilities.1_0.en_us.attraction.80010177;entityType=Attraction")
57
+ ```
58
+
59
+
60
+ All Facility Entities inherit from FacilityChildChannel.
61
+
62
+ ```python
63
+ print(pirates.name)
64
+ # 'Pirates of the Caribbean'
65
+
66
+ print(pirates.ancestor_theme_park_id)
67
+ # '80007944;entityType=theme-park'
68
+ ```
69
+
70
+ In order to access a facility's live data, you'll need a FacilityStatusChildChannel. Fortunately for you, this can be quickly done from the facility object.
71
+ ```python
72
+ fs = pirates.get_facility_status_channel()
73
+ print(fs.get_wait_time())
74
+ # 15
75
+
76
+ print(fs.get_status())
77
+ # 'Operating'
78
+ ```
79
+
80
+ Alternatively, you can create the object yourself.
81
+ ```python
82
+ from mousetools.channels.facilitystatus import FacilityStatusChannel
83
+
84
+ fsc = FacilityStatusChannel("wdw.facilitystatus.1_0.80010177;entityType=Attraction", lazy_load=False)
85
+ print(fs.last_update)
86
+ # 2025-05-15 22:52:52.176069-04:00
87
+ ```
88
+
89
+ ***NOTE: All channels are lazy loaded, meaning there is no request sent to load the data until an object's attributes are accessed. This allows objects to be created faster, and reduce requests to Disney's servers until the data is actually needed.***
90
+
91
+
92
+ For ease of use, you can use the available channel enums or facility enums to get access to a destination facility's children channels.
93
+
94
+ ```python
95
+ from mousetools.channels.facilities import FacilityChannel, ThemeParkFacilityChild
96
+ from mousetools.channel.facilities.enums import WaltDisneyWorldParkChannelIds
97
+ from mousetools.channels.facilitystatus import FacilityStatusChannel
98
+ from mousetools.channels.enums import WDWCouchbaseChannels, DLRCouchbaseChannels
99
+
100
+ wdw = FacilityChannel(WDWCouchbaseChannels.FACILITIES)
101
+ print(list(wdw.get_children_attractions()))
102
+ # [Attraction(wdw.facilities.1_0.en_us.123), Attraction(wdw.facilities.1_0.en_us.456), ...]
103
+
104
+ dlr = FacilityStatusChannel(DLRCouchbaseChannels.FACILITY_STATUS)
105
+ print(dlr.get_children_channel_ids())
106
+ # ["dlr.facilitystatus.1_0.123", "dlr.facilitystatus.1_0.456", ...]
107
+
108
+ mk = ThemeParkFacilityChild(WaltDisneyWorldParkChannelIds.MAGIC_KINGDOM, lazy_load=False)
109
+ print(mk.description)
110
+ # "Enter a Land Where Fantasy Reigns"
111
+ ```
112
+
113
+ ### License
114
+ This project is distributed under the MIT license. For more information see [LICENSE](https://gitlab.com/caratozzoloxyz/public/MouseTools/-/blob/master/LICENSE?ref_type=heads)
115
+
116
+ ### Disclaimer
117
+ This project is in no way affiliated with The Walt Disney Company and all use of Disney Services is subject to the [Disney Terms of Use](https://disneytermsofuse.com/).
@@ -0,0 +1,92 @@
1
+ # MouseTools
2
+
3
+ [![PyPI version](https://badge.fury.io/py/MouseTools.svg)](https://badge.fury.io/py/MouseTools) [![Downloads](https://pepy.tech/badge/mousetools)](https://pepy.tech/project/mousetools)
4
+
5
+
6
+ An unofficial Python wrapper for the Disney API. Data is pulled directly from Disney. This package supports Walt Disney World and Disneyland Resort.
7
+
8
+ This package makes no attempt to access data that would require individual user authentication. All data is pulled using public channels.
9
+
10
+ ## Installation
11
+ You can install using pip:
12
+ ```bash
13
+ pip install mousetools
14
+ ```
15
+ You can also install directly from this repo in case of any changes not uploaded to Pypi.
16
+ ```bash
17
+ pip install git+https://gitlab.com/caratozzoloxyz/public/MouseTools
18
+ ```
19
+
20
+ # Usage
21
+
22
+ The Disney API considers everything an entity. Attractions, resorts, restaurants, etc, are all entities. Entities belong to channels, or a group of entities.
23
+
24
+ ## Getting Started
25
+
26
+ You'll want to create a facility channel object.
27
+
28
+ ```python
29
+ from mousetools.channels.facilities import AttractionFacilityChild
30
+
31
+ pirates = AttractionFacilityChild("wdw.facilities.1_0.en_us.attraction.80010177;entityType=Attraction")
32
+ ```
33
+
34
+
35
+ All Facility Entities inherit from FacilityChildChannel.
36
+
37
+ ```python
38
+ print(pirates.name)
39
+ # 'Pirates of the Caribbean'
40
+
41
+ print(pirates.ancestor_theme_park_id)
42
+ # '80007944;entityType=theme-park'
43
+ ```
44
+
45
+ In order to access a facility's live data, you'll need a FacilityStatusChildChannel. Fortunately for you, this can be quickly done from the facility object.
46
+ ```python
47
+ fs = pirates.get_facility_status_channel()
48
+ print(fs.get_wait_time())
49
+ # 15
50
+
51
+ print(fs.get_status())
52
+ # 'Operating'
53
+ ```
54
+
55
+ Alternatively, you can create the object yourself.
56
+ ```python
57
+ from mousetools.channels.facilitystatus import FacilityStatusChannel
58
+
59
+ fsc = FacilityStatusChannel("wdw.facilitystatus.1_0.80010177;entityType=Attraction", lazy_load=False)
60
+ print(fs.last_update)
61
+ # 2025-05-15 22:52:52.176069-04:00
62
+ ```
63
+
64
+ ***NOTE: All channels are lazy loaded, meaning there is no request sent to load the data until an object's attributes are accessed. This allows objects to be created faster, and reduce requests to Disney's servers until the data is actually needed.***
65
+
66
+
67
+ For ease of use, you can use the available channel enums or facility enums to get access to a destination facility's children channels.
68
+
69
+ ```python
70
+ from mousetools.channels.facilities import FacilityChannel, ThemeParkFacilityChild
71
+ from mousetools.channel.facilities.enums import WaltDisneyWorldParkChannelIds
72
+ from mousetools.channels.facilitystatus import FacilityStatusChannel
73
+ from mousetools.channels.enums import WDWCouchbaseChannels, DLRCouchbaseChannels
74
+
75
+ wdw = FacilityChannel(WDWCouchbaseChannels.FACILITIES)
76
+ print(list(wdw.get_children_attractions()))
77
+ # [Attraction(wdw.facilities.1_0.en_us.123), Attraction(wdw.facilities.1_0.en_us.456), ...]
78
+
79
+ dlr = FacilityStatusChannel(DLRCouchbaseChannels.FACILITY_STATUS)
80
+ print(dlr.get_children_channel_ids())
81
+ # ["dlr.facilitystatus.1_0.123", "dlr.facilitystatus.1_0.456", ...]
82
+
83
+ mk = ThemeParkFacilityChild(WaltDisneyWorldParkChannelIds.MAGIC_KINGDOM, lazy_load=False)
84
+ print(mk.description)
85
+ # "Enter a Land Where Fantasy Reigns"
86
+ ```
87
+
88
+ ### License
89
+ This project is distributed under the MIT license. For more information see [LICENSE](https://gitlab.com/caratozzoloxyz/public/MouseTools/-/blob/master/LICENSE?ref_type=heads)
90
+
91
+ ### Disclaimer
92
+ This project is in no way affiliated with The Walt Disney Company and all use of Disney Services is subject to the [Disney Terms of Use](https://disneytermsofuse.com/).
@@ -0,0 +1,4 @@
1
+ import logging
2
+
3
+ logger = logging.getLogger(__name__)
4
+ logger.addHandler(logging.NullHandler())
@@ -35,6 +35,7 @@ class CouchbaseChannel(CouchbaseMixin):
35
35
  """Pulls initial data if none exists or if it is older than the refresh interval"""
36
36
  if self._cb_data is None or datetime.now(tz=self._tz.value) - self.last_update > self._refresh_interval:
37
37
  self._cb_data = self.get_channel_changes(self.channel_id)
38
+ self.last_update = datetime.now(tz=self._tz.value)
38
39
 
39
40
  def get_children_channel_ids(self) -> list[str]:
40
41
  """Returns a list of child channel ids for the channel."""
@@ -13,6 +13,7 @@ class CouchbaseChannels(str, Enum):
13
13
  CALENDAR = "calendar"
14
14
  FORECASTED_WAIT_TIME = "forecastedwaittimes"
15
15
  TODAY = "today"
16
+ CHARACTERS = "characters"
16
17
 
17
18
 
18
19
  def get_complete_channel_id(
@@ -41,6 +42,8 @@ class WDWCouchbaseChannels(str, Enum):
41
42
  """Walt Disney World Forecasted Wait Time Channel"""
42
43
  TODAY = get_complete_channel_id(DestinationShort.WALT_DISNEY_WORLD, CouchbaseChannels.TODAY, "1_0", False)
43
44
  """Walt Disney World Today Channel"""
45
+ CHARACTERS = get_complete_channel_id(DestinationShort.WALT_DISNEY_WORLD, CouchbaseChannels.CHARACTERS, "1_0", False)
46
+ """Walt Disney World Characters Channel"""
44
47
 
45
48
 
46
49
  class DLRCouchbaseChannels(str, Enum):
@@ -58,6 +61,8 @@ class DLRCouchbaseChannels(str, Enum):
58
61
  """Disneyland Resort Forecasted Wait Time Channel"""
59
62
  TODAY = get_complete_channel_id(DestinationShort.DISNEYLAND_RESORT, CouchbaseChannels.TODAY, "1_0", False)
60
63
  """Disneyland Resort Today Channel"""
64
+ CHARACTERS = get_complete_channel_id(DestinationShort.DISNEYLAND_RESORT, CouchbaseChannels.CHARACTERS, "1_0", False)
65
+ """Disneyland Resort Characters Channel"""
61
66
 
62
67
 
63
68
  class DestinationTimezones(Enum):