python-ballchasing 0.5.0__tar.gz → 0.5.1__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.
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/PKG-INFO +1 -1
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/api.py +13 -2
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/pyproject.toml +1 -1
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/python_ballchasing.egg-info/PKG-INFO +1 -1
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/LICENSE +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/README.md +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/__init__.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/constants.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/stats_info.tsv +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/typed/__init__.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/typed/deep_group.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/typed/deep_replay.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/typed/shallow_group.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/typed/shallow_replay.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/typed/shared.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/util/__init__.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/util/dates.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/util/iterators.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/util/replays.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/ballchasing/util/stats.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/python_ballchasing.egg-info/SOURCES.txt +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/python_ballchasing.egg-info/dependency_links.txt +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/python_ballchasing.egg-info/requires.txt +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/python_ballchasing.egg-info/top_level.txt +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/scripts/get_maps.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/scripts/make_types.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/scripts/test.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/scripts/test_typed.py +0 -0
- {python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/setup.cfg +0 -0
|
@@ -207,6 +207,7 @@ class BallchasingApi:
|
|
|
207
207
|
deep: bool = False,
|
|
208
208
|
typed: bool | None = None,
|
|
209
209
|
deduplicate: bool = False,
|
|
210
|
+
disable_prefetch: bool | None = None,
|
|
210
211
|
) -> Iterator[dict | ShallowReplay | DeepReplay]:
|
|
211
212
|
"""
|
|
212
213
|
This endpoint lets you filter and retrieve replays. The implementation returns an iterator.
|
|
@@ -242,6 +243,7 @@ class BallchasingApi:
|
|
|
242
243
|
:param deep: whether to get full stats for each replay (will be much slower).
|
|
243
244
|
:param typed: whether to return a typed object (default is self.typed).
|
|
244
245
|
:param deduplicate: whether to deduplicate replays that seem to be the same game.
|
|
246
|
+
:param disable_prefetch: whether to disable prefetching replays.
|
|
245
247
|
:return: an iterator over the replays returned by the API.
|
|
246
248
|
"""
|
|
247
249
|
url = f"{self.base_url}/replays"
|
|
@@ -256,7 +258,10 @@ class BallchasingApi:
|
|
|
256
258
|
if typed is None:
|
|
257
259
|
typed = self.typed
|
|
258
260
|
|
|
259
|
-
|
|
261
|
+
if disable_prefetch is None:
|
|
262
|
+
disable_prefetch = deep
|
|
263
|
+
|
|
264
|
+
iterator = self._iterable_from_request(url, params, prefetch=not disable_prefetch)
|
|
260
265
|
if deep:
|
|
261
266
|
iterator = (self.get_replay(r["id"]) for r in iterator)
|
|
262
267
|
if deduplicate:
|
|
@@ -336,6 +341,7 @@ class BallchasingApi:
|
|
|
336
341
|
sort_dir: AnySortDir = SortDir.DESCENDING,
|
|
337
342
|
deep: bool = False,
|
|
338
343
|
typed: bool | None = None,
|
|
344
|
+
disable_prefetch: bool | None = None,
|
|
339
345
|
) -> Iterator[dict | ShallowGroup | DeepGroup]:
|
|
340
346
|
"""
|
|
341
347
|
This endpoint lets you filter and retrieve replay groups.
|
|
@@ -354,12 +360,17 @@ class BallchasingApi:
|
|
|
354
360
|
:param sort_dir: Sort direction.
|
|
355
361
|
:param deep: whether to get full stats for each group (will be much slower).
|
|
356
362
|
:param typed: whether to return a typed object (default is self.typed).
|
|
363
|
+
:param disable_prefetch: whether to disable prefetching.
|
|
357
364
|
:return: an iterator over the groups returned by the API.
|
|
358
365
|
"""
|
|
359
366
|
url = f"{self.base_url}/groups/"
|
|
360
367
|
params = {"name": name, "creator": creator, "group": group, "created-before": to_rfc3339(created_before),
|
|
361
368
|
"created-after": to_rfc3339(created_after), "count": count, "sort-by": sort_by, "sort-dir": sort_dir}
|
|
362
|
-
|
|
369
|
+
|
|
370
|
+
if disable_prefetch is None:
|
|
371
|
+
disable_prefetch = deep
|
|
372
|
+
|
|
373
|
+
iterator = self._iterable_from_request(url, params, prefetch=not disable_prefetch)
|
|
363
374
|
if typed is None:
|
|
364
375
|
typed = self.typed
|
|
365
376
|
if deep:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/python_ballchasing.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/python_ballchasing.egg-info/requires.txt
RENAMED
|
File without changes
|
{python_ballchasing-0.5.0 → python_ballchasing-0.5.1}/python_ballchasing.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|