fastquadtree 1.2.1__cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl → 1.2.3__cp38-abi3-manylinux_2_17_aarch64.manylinux2014_aarch64.whl

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.

Potentially problematic release.


This version of fastquadtree might be problematic. Click here for more details.

@@ -18,6 +18,8 @@ from ._item import Item # base class for PointItem and RectItem
18
18
  from ._obj_store import ObjStore
19
19
 
20
20
  if TYPE_CHECKING:
21
+ from typing import Self # Only in Python 3.11+
22
+
21
23
  from numpy.typing import NDArray
22
24
 
23
25
  Bounds = Tuple[float, float, float, float]
@@ -59,6 +61,10 @@ class _BaseQuadTree(Generic[G, HitT, ItemType], ABC):
59
61
  def _new_native(self, bounds: Bounds, capacity: int, max_depth: int | None) -> Any:
60
62
  """Create the native engine instance."""
61
63
 
64
+ @classmethod
65
+ def _new_native_from_bytes(cls, data: bytes) -> Any:
66
+ """Create the native engine instance from serialized bytes."""
67
+
62
68
  @staticmethod
63
69
  @abstractmethod
64
70
  def _make_item(id_: int, geom: G, obj: Any | None) -> ItemType:
@@ -132,7 +138,7 @@ class _BaseQuadTree(Generic[G, HitT, ItemType], ABC):
132
138
  return pickle.dumps(self.to_dict())
133
139
 
134
140
  @classmethod
135
- def from_bytes(cls, data: bytes) -> _BaseQuadTree[G, HitT, ItemType]:
141
+ def from_bytes(cls, data: bytes) -> Self:
136
142
  """
137
143
  Deserialize a quadtree from bytes.
138
144
 
Binary file
@@ -49,18 +49,6 @@ class QuadTree(_BaseQuadTree[Point, _IdCoord, PointItem]):
49
49
  track_objects=track_objects,
50
50
  )
51
51
 
52
- @classmethod
53
- def from_bytes(cls, data: bytes) -> QuadTree:
54
- """
55
- Create a QuadTree instance from serialized bytes.
56
-
57
- Args:
58
- data: Serialized byte data from `to_bytes()`.
59
- Returns:
60
- A QuadTree instance.
61
- """
62
- return super().from_bytes(data)
63
-
64
52
  @overload
65
53
  def query(
66
54
  self, rect: Bounds, *, as_items: Literal[False] = ...
@@ -50,18 +50,6 @@ class RectQuadTree(_BaseQuadTree[Bounds, _IdRect, RectItem]):
50
50
  track_objects=track_objects,
51
51
  )
52
52
 
53
- @classmethod
54
- def from_bytes(cls, data: bytes) -> RectQuadTree:
55
- """
56
- Create a RectQuadTree instance from serialized bytes.
57
-
58
- Args:
59
- data: Serialized byte data from `to_bytes()`.
60
- Returns:
61
- A RectQuadTree instance.
62
- """
63
- return super().from_bytes(data)
64
-
65
53
  @overload
66
54
  def query(
67
55
  self, rect: Bounds, *, as_items: Literal[False] = ...
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fastquadtree
3
- Version: 1.2.1
3
+ Version: 1.2.3
4
4
  Classifier: Programming Language :: Python :: 3
5
5
  Classifier: Programming Language :: Python :: 3 :: Only
6
6
  Classifier: Programming Language :: Rust
@@ -31,7 +31,7 @@ License-File: LICENSE
31
31
  Summary: Rust-accelerated quadtree for Python with fast inserts, range queries, and k-NN search.
32
32
  Keywords: quadtree,spatial-index,geometry,rust,pyo3,nearest-neighbor,k-nn
33
33
  Author: Ethan Anderson
34
- Requires-Python: >=3.8
34
+ Requires-Python: >=3.9
35
35
  Description-Content-Type: text/markdown
36
36
  Project-URL: Homepage, https://github.com/Elan456/fastquadtree
37
37
  Project-URL: Repository, https://github.com/Elan456/fastquadtree
@@ -45,6 +45,8 @@ Project-URL: Issues, https://github.com/Elan456/fastquadtree/issues
45
45
 
46
46
  Rust-optimized quadtree with a clean Python API
47
47
 
48
+ 👉 **Check out the Docs:** https://elan456.github.io/fastquadtree/
49
+
48
50
  [![PyPI](https://img.shields.io/pypi/v/fastquadtree.svg)](https://pypi.org/project/fastquadtree/)
49
51
  [![Python versions](https://img.shields.io/pypi/pyversions/fastquadtree.svg)](https://pypi.org/project/fastquadtree/)
50
52
  [![Downloads](https://static.pepy.tech/personalized-badge/fastquadtree?period=total&units=INTERNATIONAL_SYSTEM&left_color=GRAY&right_color=BLUE&left_text=Total%20Downloads)](https://pepy.tech/projects/fastquadtree)
@@ -64,7 +66,7 @@ Rust-optimized quadtree with a clean Python API
64
66
 
65
67
  ## Why use fastquadtree
66
68
 
67
- - Clean [Python API](https://elan456.github.io/fastquadtree/api/quadtree/) with no external dependencies and modern typing hints
69
+ - Clean [Python API](https://elan456.github.io/fastquadtree/api/quadtree/) with **no external dependencies** and modern typing hints
68
70
  - The fastest quadtree Python package ([>10x faster](https://elan456.github.io/fastquadtree/benchmark/) than pyqtree)
69
71
  - Prebuilt wheels for Windows, macOS, and Linux
70
72
  - Support for [inserting bounding boxes](https://elan456.github.io/fastquadtree/api/rect_quadtree/) or points
@@ -76,7 +78,6 @@ Rust-optimized quadtree with a clean Python API
76
78
 
77
79
  ----
78
80
 
79
- 👉 **Docs:** https://elan456.github.io/fastquadtree/
80
81
 
81
82
  ## Examples
82
83
  See examples of how fastquadtree can be used in the [runnables](https://elan456.github.io/fastquadtree/runnables/) section.
@@ -0,0 +1,13 @@
1
+ fastquadtree-1.2.3.dist-info/METADATA,sha256=e0f4sEJZ-BgTh9khREHE9BtckrlT0k1fMg2JvW5NWis,9633
2
+ fastquadtree-1.2.3.dist-info/WHEEL,sha256=cqfH6P_NujaeOc1olR46J5a7YgoxWJnrr5iZ1_DMqps,129
3
+ fastquadtree-1.2.3.dist-info/licenses/LICENSE,sha256=pRuvcuqIMtEUBMgvP1Bc4fOHydzeuA61c6DQoQ1pb1w,1071
4
+ fastquadtree/__init__.py,sha256=rtkveNz7rScRasTRGu1yEqzeoJfLfreJNxg21orPL-U,195
5
+ fastquadtree/_base_quadtree.py,sha256=-umYxuVnKXd7jXcCU2VU2E55kdfUraVrhoN2lpbPQFI,15262
6
+ fastquadtree/_item.py,sha256=EDS3nJHdVtjDsuTqTZKGTZH8iWJIQ-TKxLXqvMScNPA,2405
7
+ fastquadtree/_native.abi3.so,sha256=SXIDwHEqzK8j1UK4kOwfg7ayZ23MFqV8hYWvvk8BFlo,540600
8
+ fastquadtree/_obj_store.py,sha256=HeYFGUPYhvxBzL7Js0g0jsIxflpZS6RsXNk50rGeNlA,6522
9
+ fastquadtree/point_quadtree.py,sha256=AQKZaO14wrf2PX9QLV_mAC5EjqSOQ_csmzeKAK4fZHw,5632
10
+ fastquadtree/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
+ fastquadtree/pyqtree.py,sha256=2Khh1gCPalD4z0gb3EmqtzMoga08E9BkB0j5bwkiRPU,6076
12
+ fastquadtree/rect_quadtree.py,sha256=JN72J8kXasl9JHL3qgiDUBNRL2H-TnkB_mgRIUYzyfE,3482
13
+ fastquadtree-1.2.3.dist-info/RECORD,,
@@ -1,13 +0,0 @@
1
- fastquadtree-1.2.1.dist-info/METADATA,sha256=IYzvJNOV07j4qtOFQqryt15YjrnuWrSjJpK0NUDe-1E,9614
2
- fastquadtree-1.2.1.dist-info/WHEEL,sha256=cqfH6P_NujaeOc1olR46J5a7YgoxWJnrr5iZ1_DMqps,129
3
- fastquadtree-1.2.1.dist-info/licenses/LICENSE,sha256=pRuvcuqIMtEUBMgvP1Bc4fOHydzeuA61c6DQoQ1pb1w,1071
4
- fastquadtree/__init__.py,sha256=rtkveNz7rScRasTRGu1yEqzeoJfLfreJNxg21orPL-U,195
5
- fastquadtree/_base_quadtree.py,sha256=NhUkMulVa2ItCtx5rEnE_asHY3aGN0XxG6m-AYJk7CE,15091
6
- fastquadtree/_item.py,sha256=EDS3nJHdVtjDsuTqTZKGTZH8iWJIQ-TKxLXqvMScNPA,2405
7
- fastquadtree/_native.abi3.so,sha256=KowjAh4FNt39FRoddwNjgcSWSG1tGRV7McT8WWRO8aE,540600
8
- fastquadtree/_obj_store.py,sha256=HeYFGUPYhvxBzL7Js0g0jsIxflpZS6RsXNk50rGeNlA,6522
9
- fastquadtree/point_quadtree.py,sha256=BM6mxw2pSmAKkOgXnosREfC6WOXCgEYNeQDlvnlEbKQ,5945
10
- fastquadtree/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
11
- fastquadtree/pyqtree.py,sha256=2Khh1gCPalD4z0gb3EmqtzMoga08E9BkB0j5bwkiRPU,6076
12
- fastquadtree/rect_quadtree.py,sha256=82IygiEmJ4JdA6LBDXq288cs9VfS3LpdJdkjCPcYCKM,3807
13
- fastquadtree-1.2.1.dist-info/RECORD,,