Metadata-Version: 2.3
Name: async-pmtiles
Version: 0.1.0b1
Summary: Async version of protomaps/PMTiles.
Author: Vincent Sarago, Kyle Barron
Author-email: Vincent Sarago <vincent@developmentseed.com>, Kyle Barron <kyle@developmentseed.org>
License: MIT License
         
         Copyright (c) 2023 Development Seed
         
         Permission is hereby granted, free of charge, to any person obtaining a copy
         of this software and associated documentation files (the "Software"), to deal
         in the Software without restriction, including without limitation the rights
         to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
         copies of the Software, and to permit persons to whom the Software is
         furnished to do so, subject to the following conditions:
         
         The above copyright notice and this permission notice shall be included in all
         copies or substantial portions of the Software.
         
         THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
         IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
         FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
         AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
         LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
         OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
         SOFTWARE.
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: BSD License
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Topic :: Scientific/Engineering :: GIS
Requires-Dist: obspec>=0.1.0
Requires-Dist: pmtiles>=3.4.1
Requires-Python: >=3.11
Project-URL: Documentation, https://developmentseed.org/async-pmtiles/
Project-URL: Source, https://github.com/developmentseed/async-pmtiles
Description-Content-Type: text/markdown

# aiopmtiles

<p align="center">
  <em>Async Version of Python PMTiles Reader.</em>
</p>
<p align="center">
  <a href="https://github.com/developmentseed/aiopmtiles/actions?query=workflow%3ACI" target="_blank">
      <img src="https://github.com/developmentseed/aiopmtiles/workflows/CI/badge.svg" alt="Test">
  </a>
  <a href="https://codecov.io/gh/developmentseed/aiopmtiles" target="_blank">
      <img src="https://codecov.io/gh/developmentseed/aiopmtiles/branch/main/graph/badge.svg" alt="Coverage">
  </a>
  <a href="https://pypi.org/project/aiopmtiles" target="_blank">
      <img src="https://img.shields.io/pypi/v/aiopmtiles?color=%2334D058&label=pypi%20package" alt="Package version">
  </a>
  <a href="https://pypistats.org/packages/aiopmtiles" target="_blank">
      <img src="https://img.shields.io/pypi/dm/aiopmtiles.svg" alt="Downloads">
  </a>
  <a href="https://github.com/developmentseed/aiopmtiles/blob/main/LICENSE" target="_blank">
      <img src="https://img.shields.io/github/license/developmentseed/aiopmtiles.svg" alt="Downloads">
  </a>
</p>

---

**Documentation**: <a href="https://developmentseed.org/aiopmtiles/" target="_blank">https://developmentseed.org/aiopmtiles/</a>

**Source Code**: <a href="https://github.com/developmentseed/aiopmtiles" target="_blank">https://github.com/developmentseed/aiopmtiles</a>

---

`aiopmtiles` is a python `Async I/O` version of the great [PMTiles](https://github.com/protomaps/PMTiles) python reader.

The [**PMTiles**](https://github.com/protomaps/PMTiles) format is a *Cloud-optimized + compressed single-file tile archives for vector and raster maps*.

## Installation

```bash
$ python -m pip install pip -U

# From Pypi
$ python -m pip install aiopmtiles

# Or from source
$ python -m pip install git+http://github.com/developmentseed/aiopmtiles
```

## Example

```python
from async_pmtiles import PMTilesReader
from obstore.store import HTTPStore

store = HTTPStore("https://r2-public.protomaps.com/protomaps-sample-datasets")
src = await PMTilesReader.open("cb_2018_us_zcta510_500k.pmtiles", store=store)

# PMTiles Metadata
meta = await src.metadata()

# Spatial Metadata
bounds = src.bounds
minzoom, maxzoom = src.minzoom, src.maxzoom

# Is the data a Vector Tile Archive
assert src.is_vector

# PMTiles tiles type
src.tile_type

# Tile Compression
src.tile_compression

# Get Tile
data = await src.get_tile(x=0, y=0, z=0)
```

## Contribution & Development

See [CONTRIBUTING.md](https://github.com/developmentseed/aiopmtiles/blob/main/CONTRIBUTING.md)

## Authors

See [contributors](https://github.com/developmentseed/aiopmtiles/graphs/contributors)

## Changes

See [CHANGES.md](https://github.com/developmentseed/aiopmtiles/blob/main/CHANGES.md).

## License

See [LICENSE](https://github.com/developmentseed/aiopmtiles/blob/main/LICENSE)
