{"id":21470126,"url":"https://github.com/eoxserver/pyows","last_synced_at":"2025-07-15T07:31:05.908Z","repository":{"id":36448473,"uuid":"218005699","full_name":"EOxServer/pyows","owner":"EOxServer","description":"OWS request/response encoding/decoding","archived":false,"fork":false,"pushed_at":"2024-07-11T10:47:54.000Z","size":164,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-11-09T17:18:17.610Z","etag":null,"topics":["ogc-services","ows","python","xml"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EOxServer.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-10-28T09:01:51.000Z","updated_at":"2024-07-11T10:47:56.000Z","dependencies_parsed_at":"2022-08-17T23:30:18.733Z","dependency_job_id":null,"html_url":"https://github.com/EOxServer/pyows","commit_stats":null,"previous_names":[],"tags_count":15,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EOxServer%2Fpyows","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EOxServer%2Fpyows/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EOxServer%2Fpyows/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EOxServer%2Fpyows/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EOxServer","download_url":"https://codeload.github.com/EOxServer/pyows/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":226024791,"owners_count":17561711,"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":["ogc-services","ows","python","xml"],"created_at":"2024-11-23T09:23:38.106Z","updated_at":"2024-11-23T09:23:38.657Z","avatar_url":"https://github.com/EOxServer.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyows\n[![Build Status](https://github.com/EOxServer/pyows/actions/workflows/test.yaml/badge.svg)](https://github.com/EOxServer/pyows/actions/workflows/test.yaml)\n[![PyPI version](https://badge.fury.io/py/pyows.svg)](https://badge.fury.io/py/pyows)\n[![Documentation Status](https://readthedocs.org/projects/pyows/badge/?version=latest)](https://pyows.readthedocs.io/en/latest/?badge=latest)\n\n`pyows` is a library to help building an OWS compatible service or client. It helps building requests and parsing them and also provides object types to be serialized and sent as responses.\n\n## Installation\n\nUse the package manager [pip](https://pip.pypa.io/en/stable/) to install pyows.\n\n```bash\npip install pyows\n```\n\n## Usage\n\n`pyows` can be used to both parse/encode OWS requests and to parse/encode objects for the various services.\n\nExample: Parsing a WCS 2.0 GetCoverage request:\n\n```python\n\u003e\u003e\u003e from ows.wcs.v20.decoders import xml_decode_get_coverage\n\u003e\u003e\u003e\n\u003e\u003e\u003e request = b\"\"\"\u003c?xml version=\"1.0\" encoding=\"UTF-8\"?\u003e\n... \u003cwcs:GetCoverage\n...     xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'\n...     xsi:schemaLocation=\"http://www.opengis.net/wcs/2.0 http://schemas.opengis.net/wcs/2.0/wcsAll.xsd\"\n...     xmlns=\"http://www.opengis.net/wcs/2.0\"\n...     xmlns:wcs=\"http://www.opengis.net/wcs/2.0\"\n...     service=\"WCS\"\n...     version=\"2.0.1\"\u003e\n...     \u003cwcs:CoverageId\u003ea\u003c/wcs:CoverageId\u003e\n... \u003c/wcs:GetCoverage\u003e\n... \"\"\"\n\u003e\u003e\u003e print(xml_decode_get_coverage(request))\nGetCoverageRequest(coverage_id='a', format=None, mediatype=None, subsetting_crs=None, output_crs=None, subsets=[], scalefactor=None, scales=[], interpolation=None, axis_interpolations=[], range_subset=None)\n```\n\nThe other way around:\n\n```python\n\u003e\u003e\u003e from ows.wcs.v20 import GetCoverageRequest, Trim, Slice\n\u003e\u003e\u003e request = GetCoverageRequest(\n...     coverage_id='a',\n...     subsets=[\n...         Trim(dimension='x', low=1.2, high=2.2),\n...         Trim(dimension='y', low=3),\n...         Slice(dimension='time', point='2018-05-07')\n...     ]\n... )\n\u003e\u003e\u003e print(xml_encode_get_coverage(request, pretty_print=True).value.decode('utf-8'))\n\u003cwcs:GetCoverage xmlns:crs=\"http://www.opengis.net/wcs/crs/1.0\" xmlns:eop=\"http://www.opengis.net/eop/2.0\" xmlns:gml=\"http://www.opengis.net/gml/3.2\" xmlns:gmlcov=\"http://www.opengis.net/gmlcov/1.0\" xmlns:int=\"http://www.opengis.net/wcs/interpolation/1.0\" xmlns:ogc=\"http://www.opengis.net/ogc\" xmlns:om=\"http://www.opengis.net/om/2.0\" xmlns:ows=\"http://www.opengis.net/ows/2.0\" xmlns:rsub=\"http://www.opengis.net/wcs/range-subsetting/1.0\" xmlns:scal=\"http://www.opengis.net/wcs/scaling/1.0\" xmlns:swe=\"http://www.opengis.net/swe/2.0\" xmlns:wcs=\"http://www.opengis.net/wcs/2.0\" xmlns:wcseo=\"http://www.opengis.net/wcs/wcseo/1.0\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" service=\"WCS\" version=\"2.0.1\"\u003e\n  \u003cwcs:CoverageId\u003ea\u003c/wcs:CoverageId\u003e\n  \u003cwcs:DimensionTrim\u003e\n    \u003cwcs:Dimension\u003ex\u003c/wcs:Dimension\u003e\n    \u003cwcs:TrimLow\u003e1.2\u003c/wcs:TrimLow\u003e\n    \u003cwcs:TrimHigh\u003e2.2\u003c/wcs:TrimHigh\u003e\n  \u003c/wcs:DimensionTrim\u003e\n  \u003cwcs:DimensionTrim\u003e\n    \u003cwcs:Dimension\u003ey\u003c/wcs:Dimension\u003e\n    \u003cwcs:TrimLow\u003e3\u003c/wcs:TrimLow\u003e\n  \u003c/wcs:DimensionTrim\u003e\n  \u003cwcs:DimensionSlice\u003e\n    \u003cwcs:Dimension\u003etime\u003c/wcs:Dimension\u003e\n    \u003cwcs:SlicePoint\u003e2018-05-07\u003c/wcs:SlicePoint\u003e\n  \u003c/wcs:DimensionSlice\u003e\n\u003c/wcs:GetCoverage\u003e\n```\n\n### Currently supported OWS\n\n- OWS common\n    - 2.0:\n        - Capabilities related encoding\n- WCS\n    - 2.0:\n        - Request encoding/decoding for (both XML/KVP)\n            - GetCapabilities\n            - DescribeCoverage\n            - GetCoverage\n        - Response encoding\n            - Capabilities\n            - CoverageDescriptions\n    - 2.1\n        - Response encoding for\n            - CoverageDescriptions\n- WMS\n    - 1.3:\n        - Request encoding/decoding KVP\n            - GetCapabilities\n            - GetMap\n            - GetFeatureInfo\n        - Response encoding\n            - Capabilities\n\n\n## Roadmap\n\n- Full support of WCS 2.x including EO-WCS application profile and all extensions\n- Support for WPS 2.0 requests and responses\n- Support for WMS request and responses for all versions\n\n## Contributing\n\nPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.\n\nPlease make sure to update tests as appropriate.\n\n## License\n\n[MIT](https://choosealicense.com/licenses/mit/)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feoxserver%2Fpyows","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feoxserver%2Fpyows","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feoxserver%2Fpyows/lists"}