{"id":24456123,"url":"https://github.com/arthurdjn/geoserver-py","last_synced_at":"2025-04-13T02:29:33.290Z","repository":{"id":242961064,"uuid":"811086057","full_name":"arthurdjn/geoserver-py","owner":"arthurdjn","description":"Unofficial GeoServer python client. Manage workspaces, permissions, upload vectors, rasters and more.","archived":false,"fork":false,"pushed_at":"2025-04-07T16:45:53.000Z","size":2085,"stargazers_count":16,"open_issues_count":3,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-07T17:42:28.381Z","etag":null,"topics":["api","client","geoserver","geospatial","gis","ogc","python","rasters","requests","rest","vectors"],"latest_commit_sha":null,"homepage":"https://arthurdjn.github.io/geoserver-py/","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/arthurdjn.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-05T22:53:10.000Z","updated_at":"2025-03-29T13:35:01.000Z","dependencies_parsed_at":"2024-06-22T19:22:32.360Z","dependency_job_id":"e5a05c6a-541b-4b5e-b546-4c6d3f89809d","html_url":"https://github.com/arthurdjn/geoserver-py","commit_stats":null,"previous_names":["arthurdjn/geoserver-py"],"tags_count":3,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurdjn%2Fgeoserver-py","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurdjn%2Fgeoserver-py/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurdjn%2Fgeoserver-py/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/arthurdjn%2Fgeoserver-py/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/arthurdjn","download_url":"https://codeload.github.com/arthurdjn/geoserver-py/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247703862,"owners_count":20982286,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","client","geoserver","geospatial","gis","ogc","python","rasters","requests","rest","vectors"],"created_at":"2025-01-21T02:15:26.259Z","updated_at":"2025-04-13T02:29:33.252Z","avatar_url":"https://github.com/arthurdjn.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\" style=\"width: 100%; margin: auto\"\u003e\n  \u003ca href=\"\" rel=\"noopener\"\u003e\u003cimg src=\"https://raw.githubusercontent.com/arthurdjn/geoserver-py/main/medias/geoserver-py.png\" alt=\"Banner\"\u003e\u003c/a\u003e\n\n[![python](https://img.shields.io/badge/python-3.8_%7C_3.9_%7C_3.10_%7C_3.11_%7C_3.12-red.svg?color=009ACF\u0026labelColor=6DBA65\u0026logo=python\u0026logoColor=white)](https://www.python.org/)\n[![ruff](https://img.shields.io/badge/ruff-linter-red.svg?color=009ACF\u0026labelColor=6DBA65\u0026logo=ruff\u0026logoColor=white)](https://docs.astral.sh/ruff)\n[![mypy](https://img.shields.io/badge/mypy-typing-red.svg?color=009ACF\u0026labelColor=6DBA65)](https://mypy-lang.org)\n[![poetry](https://img.shields.io/badge/poetry-dependencies-red.svg?color=009ACF\u0026labelColor=6DBA65\u0026logo=poetry\u0026logoColor=white)](https://python-poetry.org)\n[![pytest](https://img.shields.io/badge/pytest-testing-red.svg?color=009ACF\u0026labelColor=6DBA65\u0026logo=pytest\u0026logoColor=white)](https://pytest.org)\n\n\u003c/div\u003e\n\n______________________________________________________________________\n\n\u003cp align=\"center\"\u003e\n    Unofficial GeoServer python client. Manage workspaces, permissions, upload vectors, rasters and more. Check out the \u003ca href=\"https://arthurdjn.github.io/geoserver-py\"\u003edocumentation\u003c/a\u003e for more information! \u003cbr\u003e\n    \u003ci\u003eWe are looking for contributors and feedbacks!\u003c/i\u003e\n\u003c/p\u003e\n\n\u003cbr\u003e\n\n## ❓ About\n\nThis python package provides a simple interface to communicate with GeoServer. It implements most of the GeoServer REST API endpoints, allowing users to interact with GeoServer programmatically.\n\n### Why?\n\nThe purpose of this package is to implement the REST API endpoints with **full type hints** and **[documentation](https://arthurdjn.github.io/geoserver-py)**. This package does not aim to provide a high-level abstraction over the GeoServer REST API, thus it is expected that you have some knowledge of the GeoServer REST API.\n\n### Features\n\nThis package supports both **JSON** and **XML** requests and responses. It provides type hints for all the methods and classes, making it easier to work with the package.\n\n\u003e \\[!NOTE\\]\n\u003e This package only relies on `requests` as a dependency, which make it extremely lightweight and easy to install: no need to install GDAL!\n\n#### Get requests\n\n```python\n# As JSON\nworkspaces = geoserver.get_workspaces()  # default is \"json\"\n\n# As XML\nworkspaces = geoserver.get_workspaces(format=\"xml\")\n```\n\n#### Post requests\n\n```python\n# As JSON\ngeoserver.create_workspace(body={\"workspace\": {\"name\": \"new_workspace\"}})\n\n# As XML\ngeoserver.create_workspace(body=\"\u003cworkspace\u003e\u003cname\u003enew_workspace\u003c/name\u003e\u003c/workspace\u003e\")\n```\n\n### Documentation\n\nWe provide several [examples](./notebooks) and a [documentation](https://arthurdjn.github.io/geoserver-py) to help you get started,\n\n\u003cbr\u003e\n\n## 🚀 Quick Start\n\nThis section will guide you on how to setup and use the package.\n\n### Installation\n\n```bash\npip install geoserver-py\n```\n\n### Usage\n\n```python\nfrom geoserver import GeoServer\n\n# Connect to a GeoServer instance\ngeoserver = GeoServer(\n    service_url=\"http://localhost:8080/geoserver\",\n    username=\"admin\",\n    password=\"geoserver\"\n)\n\n# Get all workspaces\nworkspaces = geoserver.get_workspaces()\n\n# Create a workspace\ngeoserver.create_workspace_from_name(name=\"my_workspace\")\n# or geoserver.create_workspace(body={\"workspace\": {\"name\": \"my_workspace\"}})\n\n# Get all datastores\ndatastores = geoserver.get_data_stores(workspace=\"my_workspace\")\n\n# Upload a Shapefile\ngeoserver.upload_data_store(file=\"path/to/file.shp\", workspace=\"my_workspace\")\n\n# Upload a GeoTIFF\ngeoserver.upload_coverage_store(file=\"path/to/file.tif\", format=\"geotiff\", workspace=\"my_workspace\")\n\n# Upload a style\ngeoserver.upload_style(file=\"path/to/file.sld\", workspace=\"my_workspace\")\n\n# etc.\n```\n\n\u003cbr\u003e\n\n## 📚 Examples\n\nWe provide several examples in the [notebooks](./notebooks) folder. These examples are based on the [GeoServer REST API documentation](https://docs.geoserver.org/main/en/user/rest/index.html).\n\n\u003cbr\u003e\n\n## 🤗 Contributing\n\nWe welcome any contributions, from bug reports to new features! If you want to contribute to the package, please read the [For Developers](#-for-developers) section.\n\nIf you simply find the package useful, please consider giving it a star ⭐️ on GitHub.\n\n\u003cbr\u003e\n\n## 🧑‍💻 For Developers\n\nThis section if for advanced users who want to contribute to the package. It will guide you on how to setup the package for development.\n\n### Local installation\n\n1. First, clone the repository and install the dependencies:\n\n   ```bash\n   git clone https://github.com/arthurdjn/geoserver-py\n   cd geoserver-py\n   ```\n\n1. Install the dependencies (we recommend using [`poetry`](https://python-poetry.org/) for this)\n\n   ```bash\n   poetry install\n   ```\n\n\u003e \\[!NOTE\\]\n\u003e The usual workflow is to create a fork of the repository, clone it, and then install the dependencies.\n\n### Testing\n\nFirst, make sure you have a running GeoServer instance. You can run one using the provided `docker-compose` file:\n\n```bash\ndocker-compose up -d\n```\n\nThen, you can run the tests using the following command:\n\n```bash\nmake tests\n```\n\n### Linting, formatting and typing\n\nYou can run the linters, formatters and type checkers using the following command:\n\n```bash\nmake lint     # Run all the below commands\nmake format   # Format the code using black\nmake type     # Type check the code using mypy\nmake isort    # Sort the imports using isort\nmake all      # Run all the above commands\n```\n\n### Before committing\n\nMake sure to run the `pre-commit` hook before committing, which will check that the formatting, linting and typing are correct:\n\n```bash\nmake pre-commit\n```\n\n\u003e \\[!NOTE\\]\n\u003e Also make sure the tests are passing.\n\nOnce everything is correct, please **create a pull request** to the repository from your local fork.\n\n### About versioning\n\nWe follow the [Semantic Versioning](https://semver.org/) guidelines for versioning the package. The version number is defined in the `pyproject.toml` file.\n\nThere are some utility commands to automate the versioning and publish associated tags:\n\n```bash\nmake patch    # Bump the patch version\nmake minor    # Bump the minor version\nmake major    # Bump the major version\n```\n\n\u003cbr\u003e\n\n## 👉 Similar Projects\n\nThere are several alternatives to this package, some of them are:\n\n- [`geoserver-rest`](https://github.com/gicait/geoserver-rest) is a Python library for management for geospatial data in GeoServer.\n- [`geoserver-restconfig`](https://github.com/GeoNode/geoserver-restconfig) is a python library for manipulating a GeoServer instance via the GeoServer RESTConfig API.\n\nWhile these packages are great and well-maintained, they do not provide full type hints and customizations over the GeoServer REST API. This library aims to provide a closer API to the GeoServer REST API, making it easier to work with the package.\n\n_We would like to thank the authors of these packages for their contributions to the community, which have inspired us to create `geoserver-py`._\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurdjn%2Fgeoserver-py","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Farthurdjn%2Fgeoserver-py","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Farthurdjn%2Fgeoserver-py/lists"}