<p align="center">
<img width="500" src="https://github.com/stac-utils/titiler-pgstac/assets/10407788/24a64ea9-fede-4ee8-ab8d-625c9e94db44"/>
<p align="center">Connect PgSTAC and TiTiler.</p>
</p>
<p align="center">
<a href="https://github.com/stac-utils/titiler-pgstac/actions?query=workflow%3ACI" target="_blank">
<img src="https://github.com/developmentseed/titiler/workflows/CI/badge.svg" alt="Test">
</a>
<a href="https://codecov.io/gh/stac-utils/titiler-pgstac" target="_blank">
<img src="https://codecov.io/gh/stac-utils/titiler-pgstac/branch/main/graph/badge.svg" alt="Coverage">
</a>
<a href="https://pypi.org/project/titiler.pgstac" target="_blank">
<img src="https://img.shields.io/pypi/v/titiler.pgstac?color=%2334D058&label=pypi%20package" alt="Package version">
</a>
<a href="https://github.com/stac-utils/titiler-pgstac/blob/main/LICENSE" target="_blank">
<img src="https://img.shields.io/github/license/stac-utils/titiler-pgstac.svg" alt="License">
</a>
</p>
---
**Documentation**: <a href="https://stac-utils.github.io/titiler-pgstac/" target="_blank">https://stac-utils.github.io/titiler-pgstac/</a>
**Source Code**: <a href="https://github.com/stac-utils/titiler-pgstac" target="_blank">https://github.com/stac-utils/titiler-pgstac</a>
---
**TiTiler-PgSTAC** is a [TiTiler](https://github.com/developmentseed/titiler) extension that connects to a [PgSTAC](https://github.com/stac-utils/pgstac) database to create dynamic **mosaics** based on [search queries](https://github.com/radiantearth/stac-api-spec/tree/master/item-search).
## Installation
To install from PyPI and run:
```bash
# Make sure to have pip up to date
$ python -m pip install -U pip
# Install `psycopg` or `psycopg["binary"]` or `psycopg["c"]`
$ python -m pip install psycopg["binary"]
$ python -m pip install titiler.pgstac
```
To install from sources and run for development:
```
$ git clone https://github.com/stac-utils/titiler-pgstac.git
$ cd titiler-pgstac
$ python -m pip install -e .
```
### `PgSTAC` version
`titiler.pgstac` depends on `pgstac >=0.3.4` (https://github.com/stac-utils/pgstac/blob/main/CHANGELOG.md#v034).
### `psycopg` requirement
`titiler.pgstac` depends on the `psycopg` library. Because there are three ways of installing this package (`psycopg` or , `psycopg["c"]`, `psycopg["binary"]`), the user must install this separately from `titiler.pgstac`.
- `psycopg`: no wheel, pure python implementation. It requires the `libpq` installed in the system.
- `psycopg["binary"]`: binary wheel distribution (shipped with libpq) of the `psycopg` package and is simpler for development. It requires development packages installed on the client machine.
- `psycopg["c"]`: a C (faster) implementation of the libpq wrapper. It requires the `libpq` installed in the system.
`psycopg[c]` or `psycopg` are generally recommended for production use.
In `titiler.pgstac` setup.py, we have added three options to let users choose which psycopg install to use:
- `pip install titiler.pgstac["psycopg"]`: pure python
- `pip install titiler.pgstac["psycopg-c"]`: use the C wrapper (requires development packages installed on the client machine)
- `pip install titiler.pgstac["psycopg-binary"]`: binary wheels
## Launch
You'll need to have `POSTGRES_USER`, `POSTGRES_PASS`, `POSTGRES_DBNAME`, `POSTGRES_HOST`, `POSTGRES_PORT` variables set in your environment pointing to your Postgres database where pgstac has been installed.
```
export POSTGRES_USER=username
export POSTGRES_PASS=password
export POSTGRES_DBNAME=postgis
export POSTGRES_HOST=database
export POSTGRES_PORT=5432
```
```
$ pip install uvicorn
$ uvicorn titiler.pgstac.main:app --reload
```
### Using Docker
```
$ git clone https://github.com/stac-utils/titiler-pgstac.git
$ cd titiler-pgstac
$ docker-compose up --build tiler
```
It runs `titiler.pgstac` using Gunicorn web server. To run Uvicorn based version:
```
$ docker-compose up --build tiler-uvicorn
```
## Contribution & Development
See [CONTRIBUTING.md](https://github.com//stac-utils/titiler-pgstac/blob/main/CONTRIBUTING.md)
## License
See [LICENSE](https://github.com//stac-utils/titiler-pgstac/blob/main/LICENSE)
## Authors
See [contributors](https://github.com/stac-utils/titiler-pgstac/graphs/contributors) for a listing of individual contributors.
## Changes
See [CHANGES.md](https://github.com/stac-utils/titiler-pgstac/blob/main/CHANGES.md).
Raw data
{
"_id": null,
"home_page": "",
"name": "titiler.pgstac",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": "",
"keywords": "COG,STAC,MosaicJSON,Fastapi,Dynamic tile server,pgSTAC",
"author": "",
"author_email": "Vincent Sarago <vincent@developmentseed.com>,David Bitner <david@developmentseed.com>",
"download_url": "https://files.pythonhosted.org/packages/1d/39/1dde7a4e3fe65f3cee04e1e836efb298acc3bc6b3d796647ddcd143e55aa/titiler.pgstac-1.2.2.tar.gz",
"platform": null,
"description": "<p align=\"center\">\n <img width=\"500\" src=\"https://github.com/stac-utils/titiler-pgstac/assets/10407788/24a64ea9-fede-4ee8-ab8d-625c9e94db44\"/>\n <p align=\"center\">Connect PgSTAC and TiTiler.</p>\n</p>\n\n<p align=\"center\">\n <a href=\"https://github.com/stac-utils/titiler-pgstac/actions?query=workflow%3ACI\" target=\"_blank\">\n <img src=\"https://github.com/developmentseed/titiler/workflows/CI/badge.svg\" alt=\"Test\">\n </a>\n <a href=\"https://codecov.io/gh/stac-utils/titiler-pgstac\" target=\"_blank\">\n <img src=\"https://codecov.io/gh/stac-utils/titiler-pgstac/branch/main/graph/badge.svg\" alt=\"Coverage\">\n </a>\n <a href=\"https://pypi.org/project/titiler.pgstac\" target=\"_blank\">\n <img src=\"https://img.shields.io/pypi/v/titiler.pgstac?color=%2334D058&label=pypi%20package\" alt=\"Package version\">\n </a>\n <a href=\"https://github.com/stac-utils/titiler-pgstac/blob/main/LICENSE\" target=\"_blank\">\n <img src=\"https://img.shields.io/github/license/stac-utils/titiler-pgstac.svg\" alt=\"License\">\n </a>\n</p>\n\n---\n\n**Documentation**: <a href=\"https://stac-utils.github.io/titiler-pgstac/\" target=\"_blank\">https://stac-utils.github.io/titiler-pgstac/</a>\n\n**Source Code**: <a href=\"https://github.com/stac-utils/titiler-pgstac\" target=\"_blank\">https://github.com/stac-utils/titiler-pgstac</a>\n\n---\n\n**TiTiler-PgSTAC** is a [TiTiler](https://github.com/developmentseed/titiler) extension that connects to a [PgSTAC](https://github.com/stac-utils/pgstac) database to create dynamic **mosaics** based on [search queries](https://github.com/radiantearth/stac-api-spec/tree/master/item-search).\n\n## Installation\n\nTo install from PyPI and run:\n\n```bash\n# Make sure to have pip up to date\n$ python -m pip install -U pip\n\n# Install `psycopg` or `psycopg[\"binary\"]` or `psycopg[\"c\"]`\n$ python -m pip install psycopg[\"binary\"]\n\n$ python -m pip install titiler.pgstac\n```\n\nTo install from sources and run for development:\n\n```\n$ git clone https://github.com/stac-utils/titiler-pgstac.git\n$ cd titiler-pgstac\n$ python -m pip install -e .\n```\n\n### `PgSTAC` version\n\n`titiler.pgstac` depends on `pgstac >=0.3.4` (https://github.com/stac-utils/pgstac/blob/main/CHANGELOG.md#v034).\n\n### `psycopg` requirement\n\n`titiler.pgstac` depends on the `psycopg` library. Because there are three ways of installing this package (`psycopg` or , `psycopg[\"c\"]`, `psycopg[\"binary\"]`), the user must install this separately from `titiler.pgstac`.\n\n- `psycopg`: no wheel, pure python implementation. It requires the `libpq` installed in the system.\n- `psycopg[\"binary\"]`: binary wheel distribution (shipped with libpq) of the `psycopg` package and is simpler for development. It requires development packages installed on the client machine.\n- `psycopg[\"c\"]`: a C (faster) implementation of the libpq wrapper. It requires the `libpq` installed in the system.\n\n`psycopg[c]` or `psycopg` are generally recommended for production use.\n\nIn `titiler.pgstac` setup.py, we have added three options to let users choose which psycopg install to use:\n\n- `pip install titiler.pgstac[\"psycopg\"]`: pure python\n- `pip install titiler.pgstac[\"psycopg-c\"]`: use the C wrapper (requires development packages installed on the client machine)\n- `pip install titiler.pgstac[\"psycopg-binary\"]`: binary wheels\n\n## Launch\n\nYou'll need to have `POSTGRES_USER`, `POSTGRES_PASS`, `POSTGRES_DBNAME`, `POSTGRES_HOST`, `POSTGRES_PORT` variables set in your environment pointing to your Postgres database where pgstac has been installed.\n\n```\nexport POSTGRES_USER=username\nexport POSTGRES_PASS=password\nexport POSTGRES_DBNAME=postgis\nexport POSTGRES_HOST=database\nexport POSTGRES_PORT=5432\n```\n\n```\n$ pip install uvicorn\n$ uvicorn titiler.pgstac.main:app --reload\n```\n\n### Using Docker\n\n```\n$ git clone https://github.com/stac-utils/titiler-pgstac.git\n$ cd titiler-pgstac\n$ docker-compose up --build tiler\n```\n\nIt runs `titiler.pgstac` using Gunicorn web server. To run Uvicorn based version:\n\n```\n$ docker-compose up --build tiler-uvicorn\n```\n\n## Contribution & Development\n\nSee [CONTRIBUTING.md](https://github.com//stac-utils/titiler-pgstac/blob/main/CONTRIBUTING.md)\n\n## License\n\nSee [LICENSE](https://github.com//stac-utils/titiler-pgstac/blob/main/LICENSE)\n\n## Authors\n\nSee [contributors](https://github.com/stac-utils/titiler-pgstac/graphs/contributors) for a listing of individual contributors.\n\n## Changes\n\nSee [CHANGES.md](https://github.com/stac-utils/titiler-pgstac/blob/main/CHANGES.md).\n\n",
"bugtrack_url": null,
"license": "",
"summary": "Connect PgSTAC and TiTiler.",
"version": "1.2.2",
"project_urls": {
"Changelog": "https://stac-utils.github.io/titiler-pgstac/release-notes/",
"Documentation": "https://stac-utils.github.io/titiler-pgstac/",
"Homepage": "https://stac-utils.github.io/titiler-pgstac/",
"Issues": "https://github.com/stac-utils/titiler-pgstac/issues",
"Source": "https://github.com/stac-utils/titiler-pgstac"
},
"split_keywords": [
"cog",
"stac",
"mosaicjson",
"fastapi",
"dynamic tile server",
"pgstac"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "33d43c4e02536e3b4006a4ecca0692f5ba3f2cac7edb3e4f04da54908fb87209",
"md5": "3e430ce5f942e4e3cda03156cec0c5a8",
"sha256": "ab092ace9cdb9dbd3126319dbe6d29ef975312f4f272cbff073f5da1bd1a1ee3"
},
"downloads": -1,
"filename": "titiler.pgstac-1.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "3e430ce5f942e4e3cda03156cec0c5a8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 36291,
"upload_time": "2024-02-21T20:01:37",
"upload_time_iso_8601": "2024-02-21T20:01:37.984400Z",
"url": "https://files.pythonhosted.org/packages/33/d4/3c4e02536e3b4006a4ecca0692f5ba3f2cac7edb3e4f04da54908fb87209/titiler.pgstac-1.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1d391dde7a4e3fe65f3cee04e1e836efb298acc3bc6b3d796647ddcd143e55aa",
"md5": "c789fad71830aa12f6a9128a19022e12",
"sha256": "bcaf0260e247dec081faf21c339bcea75e897fb6d66a9f32d9ab220ebb1b4129"
},
"downloads": -1,
"filename": "titiler.pgstac-1.2.2.tar.gz",
"has_sig": false,
"md5_digest": "c789fad71830aa12f6a9128a19022e12",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 32762,
"upload_time": "2024-02-21T20:01:40",
"upload_time_iso_8601": "2024-02-21T20:01:40.040236Z",
"url": "https://files.pythonhosted.org/packages/1d/39/1dde7a4e3fe65f3cee04e1e836efb298acc3bc6b3d796647ddcd143e55aa/titiler.pgstac-1.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-02-21 20:01:40",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "stac-utils",
"github_project": "titiler-pgstac",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "titiler.pgstac"
}