geoserver-rest


Namegeoserver-rest JSON
Version 2.6.0 PyPI version JSON
download
home_pagehttps://github.com/iamtekson/geoserver-rest-python
SummaryPackage for GeoServer rest API
upload_time2024-01-26 22:25:50
maintainer
docs_urlNone
authorTek Kshetri
requires_python>=3.6
licenseMIT License
keywords geoserver-rest-python geoserver rest python geoserver geoserver api api rest geoserver python geoserver python geoserver rest
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Python wrapper for GeoServer REST API

[![Downloads](https://pepy.tech/badge/geoserver-rest)](https://pepy.tech/project/geoserver-rest)
[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)

[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)
[![flake8](https://img.shields.io/badge/linter-flake8-green)](https://flake8.pycqa.org/)
[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)
[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)

## Full documentation

The documentation for this project is moved here: [https://geoserver-rest.readthedocs.io/](https://geoserver-rest.readthedocs.io/).

## Overview

The `geoserver-rest` package is useful for the management of geospatial data in [GeoServer](http://geoserver.org/). The package is useful for the creating, updating and deleting geoserver workspaces, stores, layers, and style files.

## Installation

```python
conda install -c conda-forge geoserver-rest
```

For the `pip` installation, check the [official documentation of geoserver-rest](https://geoserver-rest.readthedocs.io/en/latest/installation.html)

## Some examples

Please check the [https://geoserver-rest.readthedocs.io/](https://geoserver-rest.readthedocs.io/) for full documentation.

```python
# Import the library
from geo.Geoserver import Geoserver

# Initialize the library
geo = Geoserver('http://127.0.0.1:8080/geoserver', username='admin', password='geoserver')

# For creating workspace
geo.create_workspace(workspace='demo')

# For uploading raster data to the geoserver
geo.create_coveragestore(layer_name='layer1', path=r'path\to\raster\file.tif', workspace='demo')

# For creating postGIS connection and publish postGIS table
geo.create_featurestore(store_name='geo_data', workspace='demo', db='postgres', host='localhost', pg_user='postgres',
                        pg_password='admin')
geo.publish_featurestore(workspace='demo', store_name='geo_data', pg_table='geodata_table_name')

# For uploading SLD file and connect it with layer
geo.upload_style(path=r'path\to\sld\file.sld', workspace='demo')
geo.publish_style(layer_name='geoserver_layer_name', style_name='sld_file_name', workspace='demo')

# For creating the style file for raster data dynamically and connect it with layer
geo.create_coveragestyle(raster_path=r'path\to\raster\file.tiff', style_name='style_1', workspace='demo',
                         color_ramp='RdYiGn')
geo.publish_style(layer_name='geoserver_layer_name', style_name='raster_file_name', workspace='demo')

# delete workspace
geo.delete_workspace(workspace='demo')

# delete layer
geo.delete_layer(layer_name='agri_final_proj', workspace='demo')

# delete style file
geo.delete_style(style_name='kamal2', workspace='demo')
```

## Contribution

Geoserver-rest is the open source library written in python and contributors are needed to keep this library moving forward. Any kind of contributions are welcome. Here are the basic rule for the new contributors:

1. Please use the request library for the http request.
2. One feature per pull request (If the PR is huge, you need to create a issue and discuss).
3. Please add the update about your PR on the [change log documentation](https://github.com/gicait/geoserver-rest/blob/master/docs/source/change_log.rst#master-branch) as well.


## Citation

Full paper is available here: https://doi.org/10.5194/isprs-archives-XLVI-4-W2-2021-91-2021

```
@Article{isprs-archives-XLVI-4-W2-2021-91-2021,
      AUTHOR = {Tek Bahadur Kshetri, Angsana Chaksana and Shraddha Sharma},
      TITLE = {THE ROLE OF OPEN-SOURCE PYTHON PACKAGE GEOSERVER-REST IN WEB-GIS DEVELOPMENT},
      JOURNAL = {The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences},
      VOLUME = {XLVI-4/W2-2021},
      YEAR = {2021},
      PAGES = {91--96},
      URL = {https://www.int-arch-photogramm-remote-sens-spatial-inf-sci.net/XLVI-4-W2-2021/91/2021/},
      DOI = {10.5194/isprs-archives-XLVI-4-W2-2021-91-2021}
  }
```


            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/iamtekson/geoserver-rest-python",
    "name": "geoserver-rest",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.6",
    "maintainer_email": "",
    "keywords": "geoserver-rest-python,geoserver rest,python geoserver,geoserver api,api,rest geoserver,python,geoserver python,geoserver rest",
    "author": "Tek Kshetri",
    "author_email": "iamtekson@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/23/92/ca2f113f4c4a8c0e2dfc712496e0388a7ae9c83026f0221a3fea7dc781db/geoserver-rest-2.6.0.tar.gz",
    "platform": null,
    "description": "# Python wrapper for GeoServer REST API\n\n[![Downloads](https://pepy.tech/badge/geoserver-rest)](https://pepy.tech/project/geoserver-rest)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n\n[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)\n[![flake8](https://img.shields.io/badge/linter-flake8-green)](https://flake8.pycqa.org/)\n[![Imports: isort](https://img.shields.io/badge/%20imports-isort-%231674b1?style=flat&labelColor=ef8336)](https://pycqa.github.io/isort/)\n[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)](https://github.com/pre-commit/pre-commit)\n\n## Full documentation\n\nThe documentation for this project is moved here: [https://geoserver-rest.readthedocs.io/](https://geoserver-rest.readthedocs.io/).\n\n## Overview\n\nThe `geoserver-rest` package is useful for the management of geospatial data in [GeoServer](http://geoserver.org/). The package is useful for the creating, updating and deleting geoserver workspaces, stores, layers, and style files.\n\n## Installation\n\n```python\nconda install -c conda-forge geoserver-rest\n```\n\nFor the `pip` installation, check the [official documentation of geoserver-rest](https://geoserver-rest.readthedocs.io/en/latest/installation.html)\n\n## Some examples\n\nPlease check the [https://geoserver-rest.readthedocs.io/](https://geoserver-rest.readthedocs.io/) for full documentation.\n\n```python\n# Import the library\nfrom geo.Geoserver import Geoserver\n\n# Initialize the library\ngeo = Geoserver('http://127.0.0.1:8080/geoserver', username='admin', password='geoserver')\n\n# For creating workspace\ngeo.create_workspace(workspace='demo')\n\n# For uploading raster data to the geoserver\ngeo.create_coveragestore(layer_name='layer1', path=r'path\\to\\raster\\file.tif', workspace='demo')\n\n# For creating postGIS connection and publish postGIS table\ngeo.create_featurestore(store_name='geo_data', workspace='demo', db='postgres', host='localhost', pg_user='postgres',\n                        pg_password='admin')\ngeo.publish_featurestore(workspace='demo', store_name='geo_data', pg_table='geodata_table_name')\n\n# For uploading SLD file and connect it with layer\ngeo.upload_style(path=r'path\\to\\sld\\file.sld', workspace='demo')\ngeo.publish_style(layer_name='geoserver_layer_name', style_name='sld_file_name', workspace='demo')\n\n# For creating the style file for raster data dynamically and connect it with layer\ngeo.create_coveragestyle(raster_path=r'path\\to\\raster\\file.tiff', style_name='style_1', workspace='demo',\n                         color_ramp='RdYiGn')\ngeo.publish_style(layer_name='geoserver_layer_name', style_name='raster_file_name', workspace='demo')\n\n# delete workspace\ngeo.delete_workspace(workspace='demo')\n\n# delete layer\ngeo.delete_layer(layer_name='agri_final_proj', workspace='demo')\n\n# delete style file\ngeo.delete_style(style_name='kamal2', workspace='demo')\n```\n\n## Contribution\n\nGeoserver-rest is the open source library written in python and contributors are needed to keep this library moving forward. Any kind of contributions are welcome. Here are the basic rule for the new contributors:\n\n1. Please use the request library for the http request.\n2. One feature per pull request (If the PR is huge, you need to create a issue and discuss).\n3. Please add the update about your PR on the [change log documentation](https://github.com/gicait/geoserver-rest/blob/master/docs/source/change_log.rst#master-branch) as well.\n\n\n## Citation\n\nFull paper is available here: https://doi.org/10.5194/isprs-archives-XLVI-4-W2-2021-91-2021\n\n```\n@Article{isprs-archives-XLVI-4-W2-2021-91-2021,\n      AUTHOR = {Tek Bahadur Kshetri, Angsana Chaksana and Shraddha Sharma},\n      TITLE = {THE ROLE OF OPEN-SOURCE PYTHON PACKAGE GEOSERVER-REST IN WEB-GIS DEVELOPMENT},\n      JOURNAL = {The International Archives of the Photogrammetry, Remote Sensing and Spatial Information Sciences},\n      VOLUME = {XLVI-4/W2-2021},\n      YEAR = {2021},\n      PAGES = {91--96},\n      URL = {https://www.int-arch-photogramm-remote-sens-spatial-inf-sci.net/XLVI-4-W2-2021/91/2021/},\n      DOI = {10.5194/isprs-archives-XLVI-4-W2-2021-91-2021}\n  }\n```\n\n",
    "bugtrack_url": null,
    "license": "MIT License",
    "summary": "Package for GeoServer rest API",
    "version": "2.6.0",
    "project_urls": {
        "Homepage": "https://github.com/iamtekson/geoserver-rest-python"
    },
    "split_keywords": [
        "geoserver-rest-python",
        "geoserver rest",
        "python geoserver",
        "geoserver api",
        "api",
        "rest geoserver",
        "python",
        "geoserver python",
        "geoserver rest"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "bec61df195d901e6c62f6e628e23d2b048c70947001c42cea0e3ad329834daae",
                "md5": "3b0d48aa20a416a0e219190bbf820112",
                "sha256": "9da03d7d2335d2131c34656b3320ff509a8a9a4fd57faffce7965e93b3045870"
            },
            "downloads": -1,
            "filename": "geoserver_rest-2.6.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "3b0d48aa20a416a0e219190bbf820112",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.6",
            "size": 20588,
            "upload_time": "2024-01-26T22:25:48",
            "upload_time_iso_8601": "2024-01-26T22:25:48.653622Z",
            "url": "https://files.pythonhosted.org/packages/be/c6/1df195d901e6c62f6e628e23d2b048c70947001c42cea0e3ad329834daae/geoserver_rest-2.6.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "2392ca2f113f4c4a8c0e2dfc712496e0388a7ae9c83026f0221a3fea7dc781db",
                "md5": "248ec4797eeea3d5ebab834a5560554e",
                "sha256": "37e5f396e8991c6f678a8e7fa3be4e60581306d80cf21e39023537c775dc5151"
            },
            "downloads": -1,
            "filename": "geoserver-rest-2.6.0.tar.gz",
            "has_sig": false,
            "md5_digest": "248ec4797eeea3d5ebab834a5560554e",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.6",
            "size": 25006,
            "upload_time": "2024-01-26T22:25:50",
            "upload_time_iso_8601": "2024-01-26T22:25:50.753792Z",
            "url": "https://files.pythonhosted.org/packages/23/92/ca2f113f4c4a8c0e2dfc712496e0388a7ae9c83026f0221a3fea7dc781db/geoserver-rest-2.6.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-01-26 22:25:50",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "iamtekson",
    "github_project": "geoserver-rest-python",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "geoserver-rest"
}
        
Elapsed time: 0.22299s