titiler-pgstac


Nametitiler-pgstac JSON
Version 1.6.0 PyPI version JSON
download
home_pageNone
SummaryConnect PgSTAC and TiTiler.
upload_time2025-01-13 16:01:47
maintainerNone
docs_urlNone
authorNone
requires_python>=3.9
licenseMIT License Copyright (c) Microsoft Corporation and other contributors. 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.
keywords cog stac mosaicjson fastapi dynamic tile server pgstac
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <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/stac-utils/titiler-pgstac/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": null,
    "name": "titiler-pgstac",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.9",
    "maintainer_email": null,
    "keywords": "COG, STAC, MosaicJSON, Fastapi, Dynamic tile server, pgSTAC",
    "author": null,
    "author_email": "Vincent Sarago <vincent@developmentseed.com>, David Bitner <david@developmentseed.com>",
    "download_url": "https://files.pythonhosted.org/packages/9d/95/b3437877f82d1132815111e98c40584201987874f6fc7323c1ca3a375c66/titiler_pgstac-1.6.0.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/stac-utils/titiler-pgstac/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",
    "bugtrack_url": null,
    "license": "MIT License  Copyright (c) Microsoft Corporation and other contributors.  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. ",
    "summary": "Connect PgSTAC and TiTiler.",
    "version": "1.6.0",
    "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": "2f82eb6ca038b59b33841401a76bccf6ec4fb62468014a897a9f270092e0d601",
                "md5": "6c366530a4e528e2278023067c265155",
                "sha256": "5598128b4af7314eb645db143f5ac445a100baff8a02437c7800643c0f58fc31"
            },
            "downloads": -1,
            "filename": "titiler_pgstac-1.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "6c366530a4e528e2278023067c265155",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.9",
            "size": 42099,
            "upload_time": "2025-01-13T16:01:46",
            "upload_time_iso_8601": "2025-01-13T16:01:46.211775Z",
            "url": "https://files.pythonhosted.org/packages/2f/82/eb6ca038b59b33841401a76bccf6ec4fb62468014a897a9f270092e0d601/titiler_pgstac-1.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "9d95b3437877f82d1132815111e98c40584201987874f6fc7323c1ca3a375c66",
                "md5": "635a346a5f173793bfe4321dbf29c58c",
                "sha256": "fd4eaca3c01c8c6a4d021446525d659fff367104cbce94bfd4198a9c57a956c3"
            },
            "downloads": -1,
            "filename": "titiler_pgstac-1.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "635a346a5f173793bfe4321dbf29c58c",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.9",
            "size": 38421,
            "upload_time": "2025-01-13T16:01:47",
            "upload_time_iso_8601": "2025-01-13T16:01:47.325043Z",
            "url": "https://files.pythonhosted.org/packages/9d/95/b3437877f82d1132815111e98c40584201987874f6fc7323c1ca3a375c66/titiler_pgstac-1.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-01-13 16:01:47",
    "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"
}
        
Elapsed time: 0.44731s