async-tiff 0.3.0__cp310-cp310-win_amd64.whl → 0.4.0b1__cp310-cp310-win_amd64.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.
async_tiff/_array.pyi ADDED
@@ -0,0 +1,39 @@
1
+ from collections.abc import Buffer
2
+
3
+ class Array(Buffer):
4
+ """A 3D array that implements Python's buffer protocol.
5
+
6
+ This allows zero-copy interoperability with numpy via `np.asarray(arr)`.
7
+ The array is immutable and exposes a read-only buffer.
8
+
9
+ Example:
10
+
11
+ ```python
12
+ import numpy as np
13
+ from async_tiff import Array
14
+
15
+ # Create from raw bytes
16
+ data = bytes([1, 2, 3, 4, 5, 6])
17
+ arr = Array(data, shape=(1, 2, 3), format="<B") # 1x2x3 uint8 array
18
+
19
+ # Convert to numpy (zero-copy view)
20
+ np_arr = np.asarray(arr)
21
+ assert np_arr.shape == (1, 2, 3)
22
+ assert np_arr.dtype == np.uint8
23
+ ```
24
+ """
25
+
26
+ def __init__(
27
+ self, data: Buffer, shape: tuple[int, int, int], format: str
28
+ ) -> None: ...
29
+ def __buffer__(self, flags: int) -> memoryview[int]: ...
30
+ @property
31
+ def shape(self) -> tuple[int, int, int]:
32
+ """The shape of the array.
33
+
34
+ The interpretation depends on the PlanarConfiguration:
35
+
36
+ - PlanarConfiguration=1 (chunky): (height, width, bands)
37
+ - PlanarConfiguration=2 (planar): (bands, height, width)
38
+ """
39
+ ...
Binary file
@@ -1,8 +1,9 @@
1
+ from ._array import Array as Array
1
2
  from ._decoder import Decoder as Decoder
2
3
  from ._decoder import DecoderRegistry as DecoderRegistry
3
4
  from ._geo import GeoKeyDirectory as GeoKeyDirectory
4
5
  from ._ifd import ImageFileDirectory as ImageFileDirectory
5
6
  from ._thread_pool import ThreadPool as ThreadPool
6
- from ._tiff import ObspecInput as ObspecInput
7
7
  from ._tiff import TIFF as TIFF
8
+ from ._tiff import ObspecInput as ObspecInput
8
9
  from ._tile import Tile as Tile
async_tiff/_ifd.pyi CHANGED
@@ -114,4 +114,8 @@ class ImageFileDirectory:
114
114
  @property
115
115
  def model_tiepoint(self) -> list[float] | None: ...
116
116
  @property
117
+ def gdal_nodata(self) -> str | None: ...
118
+ @property
119
+ def gdal_metadata(self) -> str | None: ...
120
+ @property
117
121
  def other_tags(self) -> dict[int, Value]: ...
async_tiff/_tile.pyi CHANGED
@@ -1,5 +1,6 @@
1
1
  from collections.abc import Buffer
2
2
 
3
+ from ._array import Array
3
4
  from .enums import CompressionMethod
4
5
  from ._decoder import DecoderRegistry
5
6
  from ._thread_pool import ThreadPool
@@ -23,7 +24,7 @@ class Tile:
23
24
  *,
24
25
  decoder_registry: DecoderRegistry | None = None,
25
26
  pool: ThreadPool | None = None,
26
- ) -> Buffer:
27
+ ) -> Array:
27
28
  """Decode this tile's data.
28
29
 
29
30
  Keyword Args:
@@ -31,5 +32,5 @@ class Tile:
31
32
  pool: the thread pool on which to run decompression. Defaults to None.
32
33
 
33
34
  Returns:
34
- Decoded tile data as a buffer.
35
+ Decoded tile data as an Array instance.
35
36
  """
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: async-tiff
3
- Version: 0.3.0
3
+ Version: 0.4.0b1
4
4
  Classifier: Programming Language :: Rust
5
5
  Classifier: Programming Language :: Python :: Implementation :: CPython
6
6
  Classifier: Programming Language :: Python :: Implementation :: PyPy
@@ -0,0 +1,15 @@
1
+ async_tiff\__init__.py,sha256=hfG4M-ebgb-3JYmkoqk8IftZ1Etu_PwyyizCPZPbw9Y,182
2
+ async_tiff\_array.pyi,sha256=-NBlApERjVRjR0_393xeGolLJsy3JJfZLoq8ORixSnM,1157
3
+ async_tiff\_async_tiff.cp310-win_amd64.pyd,sha256=e_RzNt0XOL8LeeWWyC82W-I42sq0vYbd7UHd1uehycg,8723456
4
+ async_tiff\_async_tiff.pyi,sha256=5aJxlpnSMf287Mk7l7VRq7cVLRf4rZQtZPVisbV9Xlw,415
5
+ async_tiff\_decoder.pyi,sha256=LiK_iwhaT4ydR8yGYCwI855OSJSBvgsHUMrT7Chlsko,1072
6
+ async_tiff\_geo.pyi,sha256=Hu39c7XYkvUi09XHRHFUiYKGfEYp-VMijaOiu64x83c,3553
7
+ async_tiff\_ifd.pyi,sha256=0LLCta6UyasdJJV-dkQgDPtEulay3T4BMVlkTAM8nTA,4025
8
+ async_tiff\_thread_pool.pyi,sha256=7jJy_rc3DMxH7jGTeDLbfyunrRH0TeF44owGmb3Rnu4,185
9
+ async_tiff\_tiff.pyi,sha256=NEw49KQHwSa8PSnK54UZFKjw3OjyipLS1bGLGI3qehQ,2221
10
+ async_tiff\_tile.pyi,sha256=vXPkAnHOcD8CaUpTLvgOofL-vu5hZvNx2SIMfrNQCbs,1172
11
+ async_tiff\enums.py,sha256=3Js1T6sTMlr2ZUZZQ6KV3Fm2ZcfVfbsDVUOx5624jfs,1044
12
+ async_tiff\py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
13
+ async_tiff-0.4.0b1.dist-info\METADATA,sha256=fRD7hNm-CbFYgZzFVg4FrgzkTjdpmBrGq1KRqn-qum4,293
14
+ async_tiff-0.4.0b1.dist-info\WHEEL,sha256=L_nHnx2hhpjVM_Xfu45p0kXGA_F4gVVL8EpDS6M9jpM,97
15
+ async_tiff-0.4.0b1.dist-info\RECORD,,
@@ -1,4 +1,4 @@
1
1
  Wheel-Version: 1.0
2
- Generator: maturin (1.10.2)
2
+ Generator: maturin (1.11.5)
3
3
  Root-Is-Purelib: false
4
4
  Tag: cp310-cp310-win_amd64
@@ -1,14 +0,0 @@
1
- async_tiff-0.3.0.dist-info/METADATA,sha256=PTm7vdwh4yt5Y9ZWHHE6qeCj0zt363Ks4UPUA4Sc00U,291
2
- async_tiff-0.3.0.dist-info/WHEEL,sha256=diOBRAksuY94NOBHQsE7IIvZ4t9p1N5ocYOeLLhP3Ts,97
3
- async_tiff/__init__.py,sha256=hfG4M-ebgb-3JYmkoqk8IftZ1Etu_PwyyizCPZPbw9Y,182
4
- async_tiff/_async_tiff.cp310-win_amd64.pyd,sha256=XhToaBzL11FrbuHdLCxabjhrThtWnpK4b-4l3kIVJ4g,8422912
5
- async_tiff/_async_tiff.pyi,sha256=v4AXqfB_QEax21713pKufeuQ0UNffp_0IwAZgY1RWVU,379
6
- async_tiff/_decoder.pyi,sha256=LiK_iwhaT4ydR8yGYCwI855OSJSBvgsHUMrT7Chlsko,1072
7
- async_tiff/_geo.pyi,sha256=Hu39c7XYkvUi09XHRHFUiYKGfEYp-VMijaOiu64x83c,3553
8
- async_tiff/_ifd.pyi,sha256=U0ax_hrWaZG6SggaKClcU4DUBQmseFTgZ726essLjoI,3901
9
- async_tiff/_thread_pool.pyi,sha256=7jJy_rc3DMxH7jGTeDLbfyunrRH0TeF44owGmb3Rnu4,185
10
- async_tiff/_tiff.pyi,sha256=NEw49KQHwSa8PSnK54UZFKjw3OjyipLS1bGLGI3qehQ,2221
11
- async_tiff/_tile.pyi,sha256=Ni9_ytktsQE-YeUwlePH3KY88XcOx2lSUkodEMf2-XY,1137
12
- async_tiff/enums.py,sha256=3Js1T6sTMlr2ZUZZQ6KV3Fm2ZcfVfbsDVUOx5624jfs,1044
13
- async_tiff/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
14
- async_tiff-0.3.0.dist-info/RECORD,,